[Using Sakai] Web page won't open in Sakai

Steve Swinsburg s.swinsburg at lancaster.ac.uk
Thu Jul 2 08:41:20 PDT 2009


What's the path to the external Javascript resources you have in your  
HTML?

Also, you might have trouble using onload since the iframe already has  
a body onload, and you can only have one.

I'd suggest using a jQuery $(document).ready() function. You are then  
assured the DOM has finished loading. As opposed to the window.onload  
which fires when the window loads.

cheers,
Steve



On 2 Jul 2009, at 16:25, Marshall Feldman wrote:

> Hi Stephen,
>
> This works!
>
> The only problem is that the JavaScripts do not seem to be working. Is
> there another trick? (Note: The page uses several <script> statements,
> including an inline script, and window.onload to run the JavaScript.
> According to this page --
> http://stackoverflow.com/questions/679704/can-you-put-the-javascript-onload-event-anywhere-besides-in-the-body-tag
> -- this should work.)
>
> Thanks for your help.
>
>    Marsh Feldman
>
> P.S. If Sakai is smart enough to figure out that the page is xhtml +
> xml, why does it decide to set the content-disposition for downloading
> instead of display?
>
> Stephen Marquard wrote:
>> Hi,
>>
>> If you're putting this in an iframe, it's not so much what Sakai  
>> "likes" but what your browser likes. The File Type is used as the  
>> content-type when the file is served. Try text/html.
>>
>> Sakai makes some inferences based on content type as to whether the  
>> content-disposition is set or not, which triggers a download prompt  
>> if it's set to attachment.
>>
>> Regards
>> Stephen
>>
>>
>>
>>
>> Stephen Marquard, Learning Technologies Co-ordinator
>> Centre for Educational Technology, University of Cape Town
>> http://www.cet.uct.ac.za
>> Email/IM/XMPP: stephen.marquard at uct.ac.za
>> Phone: +27-21-650-5037 Cell: +27-83-500-5290
>>
>>>>> Marshall Feldman <marsh at uri.edu> 7/2/2009 3:57 PM >>>
>>>>>
>> Hi Steve,
>>
>> Thanks for getting back. I've interspersed replies.
>>
>>    Marsh Feldman
>>
>> Steve Swinsburg wrote:In Resources, choose Actions > Edit details  
>> for the file in question, and take a look at the File Type at the  
>> bottom. What type is it? Do you really need the xhtml extension? It  
>> says, "application/xhtml+xml."
>>
>> I had been thinking that Sakai may not like XHTML, but when I saw  
>> this I realized it recognizes it. The only other thing along these  
>> lines is that Sakai can handle XHTML but prefers pages with "html"  
>> as their extension instead of "xhtrml."
>> Tidy and friendly markup can still be written as html and you can  
>> still use the XHTML Strict DTD.
>>
>> Also, what version of Sakai (scroll right to the bottom and have a  
>> look in the footer, assuming that has been set correctly)
>> It's 2.5.4.
>>
>>
>>
>> cheers,
>> Steve
>>
>>
>>
>> On 2 Jul 2009, at 01:10, Marshall Feldman wrote:
>>
>>
>>
>> Hi,
>>
>> I'm having a problem opening a web page in Sakai. I used the method  
>> described on Putting Sakai to Work ( http://www.packtpub.com/article/putting-sakai-to-work 
>>  ) under "Customize the Home Page." However, when I click on the  
>> tab for the page, instead of  displaying it Firefox (both versions  
>> 3.0 and 3.5) pops open a dialog window asking whether to save the  
>> file or to open it in Firefox. If I open it in Firefox its starts a  
>> new tab but the file does not display properly, apparently since it  
>> left its support files on the Sakai server. Can anyone explain why  
>> this may be happening or suggest ways to correct Sakai's behavior?
>>
>> Thanks.
>>
>>    Marsh Feldman
>>
>> Additional BackgroundThe page works fine when I load it on my local  
>> system, so the problem is the result of its interaction with Sakai.
>>
>> The page sits in a subdirectory of the worksite's Resources. The  
>> subdirectory is called "Web" and itself contains five  
>> subdirectories: boilerplate (for standardized page content), code  
>> (for JavaScripts and other code), images (for graphics), styles  
>> (for css), and templates (for web page templates).
>>
>> The page's Doctype is DTD XHTML 1.0 Strict, and its file type  
>> (extension) is xhtml.
>>
>> In its <Head> section, the page loads five JavaScript libraries  
>> with paths in the form of 'src="code/FILENAME.js"' (uppercase  
>> denotes variable content):
>> Boutell.com's client-side include ( http://www.boutell.com/newfaq/creating/include.html 
>> . ) JavaScript for including boilerplate on the web page.
>> The b9j JavaScript toolkit ( http://appengine.bravo9.com/b9j/documentation/b9j.html 
>>  ) (for working with paths to make the page and its children  
>> portable)
>> jQuery  ( http://jquery.com/ )(for the drop shadow plugin now and  
>> for customizing page behaviors later)
>> The jQuery drop shadow plugin ( http://plugins.jquery.com/project/DropShadow 
>>  )(for cosmetic purposes)
>> Simon Willison's JavaScript loading utilities ( http://www.webreference.com/programming/javascript/onloads/ 
>>  ) (to coordinate loading functions)
>> In addition, the page has some JavaScript embedded in the page.  
>> This script does a few things:
>> Create a new "global" object that will hold various global  
>> variables; it also initializes a few of these
>> Include one piece of boilerplate html (a standard page footer)
>> Add some code to the drop shadow plugin; the code rescales the drop  
>> shadows when the current window is resized; eventually, this code  
>> will be added to the plugin.
>> Applies the dropshadow method to add drop shadows to all images on  
>> the page with class="solidShadow"
>> Assigns two functions (init and resized) as methods to the window  
>> object (i.e., window.onload = init; and window.resize = resized;)
>> The last thing in the <Head> section is a <link> statement loading  
>> a css file. The link refers to 'src="styles/FILENAME.css"  
>> media="screen".' The css code uses a few unusual (but way cool)  
>> techniques. See:
>> Perfect fluid width layout ( http://css-tricks.com/the-perfect-fluid-width-layout/ 
>>  )
>> 100% fluid full main column layout ( http://layouts.ironmyers.com/ )
>> Scalable figures with captions ( http://rjohara.net/server/css-figures-captions/ 
>>  )
>> The <Body> section uses a liquid design ( http://www.digital-web.com/articles/liquid_web_design/ 
>>  ). It uses lots of <div> and <span> elements with class and id  
>> selectors.
>>
>> Other than this, the page is not unusual (unless Sakai has problems  
>> with JavaScript and/or CSS).
>>
>>
>
> -- 
> Dr. Marshall Feldman, PhD
> Director of Research and Academic Affairs
> CUSR Logo
> Center for Urban Studies and Research
> The University of Rhode Island
> email: marsh @ uri .edu (remove spaces)
>
>
>      Contact Information:
>
>
>        Kingston:
>
> 202 Hart House
> Charles T. Schmidt Labor Research Center
> The University of Rhode Island
> 36 Upper College Road
> Kingston, RI 02881-0815
> tel. (401) 874-5953:
> fax: (401) 874-5511
>
>
>        Providence:
>
> 206E Shepard Building
> URI Feinstein Providence Campus
> 80 Washington Street
> Providence, RI 02903-1819
> tel. (401) 277-5218
> fax: (401) 277-5464
> _______________________________________________
> sakai-user mailing list
> sakai-user at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-user
>
> TO UNSUBSCRIBE: send email to sakai-user-unsubscribe at collab.sakaiproject.org 
>  with a subject of "unsubscribe"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2437 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-user/attachments/20090702/6f11a8f7/attachment.bin 


More information about the sakai-user mailing list