Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 7th, 2006, 03:21 PM
Registered User
 
Join Date: May 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default multiple documentElement (html) objects in one doc

Hey,
I just want to know if we can have multiple HTMLs (documentElements) in one DOCUMENT (in the same frame/window)? if yes, then is there any way we could write some content into the second HTML document using the script in the first HTML and WITHOUT doing any DOM manipulations.

Thanks
Asim

 
Old July 12th, 2006, 05:59 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You cannot have multiple document elements in one document. You can, however, modify the HTML in the existing document element without using DOM manipulations by using document.write() calls or by modifying document.innerHTML.

Jon Emerson
http://www.jonemerson.net/
 
Old July 14th, 2006, 02:40 PM
Registered User
 
Join Date: May 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Jon. But the problem is:
1) I cannot use innerHTML as it doesnot parse the generated Javascript (so no dynamic content could be achieved)
2) document.write() works but it overrides the entire HTML document.

I am generating an HTML page (with some javascript) using XSL and XML (retrieved using AJAX). Once i have the generated HTML, doing a document.write() overrides everything on that ASP page which has a couple of javascripts that I need for the generated HTML to work.

I have also tried to use document.open() and document.close() the problem holds even then.

Thanks anyways.
Asim






Similar Threads
Thread Thread Starter Forum Replies Last Post
reading a html doc into outlook body message matpen Word VBA 5 June 21st, 2009 10:19 PM
how to finding the Graphic objects in word doc madhan_needs_help Word VBA 2 August 8th, 2007 10:38 AM
doc to html in linux amirshahzad Assembly Language 3 March 6th, 2007 07:11 AM
How can I view an XML doc to HTML format jolo98 XML 3 July 23rd, 2004 01:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.