Recent Widgets


Register for DashboardWidgets

Recent Forums Posts

Partners


iCompositions

MacDesktops.net

RSS Showcase
RSS Comments
RSS Forums

This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. Posted in: Widget Development

document.write function

Author Message
joerg



Joined: 27 Mar 2005
Posts: 1

Posted: Fri Dec 31, 2004 - 9:47 am    Post subject: Imported from The Dashboader Reply with quote

I want to use the document.write function in the js.file but it is not possible . I don't no why ?

or can I use a other function ?

Thanks

so long
View user's profile Send private message Widgets
mattj
Guest





Posted: Fri Dec 31, 2004 - 9:47 am    Post subject: Imported from The Dashboader Reply with quote

I'm not an expert by any means but document.write worked for my crap tests of how it should work...
Widgets
chrisb
Guest





Posted: Fri Dec 31, 2004 - 9:47 am    Post subject: Imported from The Dashboader Reply with quote

document.write doesn't work with xml so if you use and serve xhtml as xml (xhtml) you'd be out of luck. I have no idea if this is what is happening in your case or if the Dashboard server actually serves xhtml as xml. Its Developers however have recommended using XHTML 1.0 rather than HTML for reasons unspecified - so who knows.

In any case it is probably better if you learn how to use javascript's DOM functions because content placed with document.write isn't actually placed into the DOM, so subsequent access to it or manipulation of it is not possible, whereas if you use DOM functions you can pretty much re-access it at any time.

http://developer.apple.com/internet/webcontent/dom2i.html
Widgets
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

 
Powered by phpBB © 2001, 2002 phpBB Group