Wrox Programmer Forums
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To 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:11 PM
Registered User
 
Join Date: May 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Document.write

Hi,
I have an HTML page dynamically generated using XSL and XML data. There is also some dynamic javascript in that page too. Now the problem is that I can retrieve the HTML using "transformToText" method (using the zXML library provided by authors of Professional AJAX) or by transformNode method provided by I.E. Both of these methods return a string.

When I do a document.write(strHTML), it overrides everything on the page that is currently running on the browser. Is there anyway, I could append the newly generated HTML to the currently running HTML (coded in an ASP page)so that I could retain all the 'javascript includes" from it and use them with the newly generated HTML.

Your help and a quick is deeply appreciated.

Thanks,
Asim


 
Old July 8th, 2006, 09:07 AM
Friend of Wrox
 
Join Date: Nov 2005
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

Can you tell what it overrides and what are you trying to do?. If the javascript is only clientside this means that it does not see any asp code.

__________________________________________________ ________
This is my junk I'm gona eat it
 
Old July 12th, 2006, 05:20 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Look at the innerHTML property on the document object, or on any <div>-type element. I usually prefer to have a dedicated <div> for this type of design.

Jon Emerson
http://www.jonemerson.net/





Similar Threads
Thread Thread Starter Forum Replies Last Post
Write a XML Document using java. vinitpugaliya XML 0 January 8th, 2007 06:26 AM
Write Nested XML document into SQL Server tables boondocksaint20 VB.NET 0 May 2nd, 2006 12:35 PM
document.write into cell or td with Opera crmpicco Javascript How-To 0 April 11th, 2006 04:58 AM
Write a document to the server Hal Emmerich Javascript How-To 1 November 13th, 2004 07:15 AM
write() without clearing old document Snib Javascript How-To 4 January 21st, 2004 04:28 PM





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