The moose likes HTML, CSS and JavaScript and the fly likes Changing the contents of an html page from another Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Changing the contents of an html page from another" Watch "Changing the contents of an html page from another" New topic
Author

Changing the contents of an html page from another

Chandhrasekar Saravanan
Ranch Hand

Joined: Jun 16, 2002
Posts: 57
How do i change the contents of an html page by clicking the button in a different html page. i know that we need to have several document.write statements. but how do we direct an document.write statement to modify the other page's content
Thnx
Chandhrasekar Saravanan
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
you are using the window open method, you got to reference it with an object
NewWindow = window.open(blah.....)
then you can do the
NewWindow.document.write('Your Text');
I personally would use an innerHTML approach on the pop up window and call the script from the opener....
NewWin.ChangeText('TheDiv','The Text');
The ChangeText Function is listed here:
http://www10.brinkster.com/a1ien51/JavaRanch/innerhtmltext.htm
Eric
 
IntelliJ Java IDE
 
subject: Changing the contents of an html page from another
 
Threads others viewed
refresh document.write()
Downloading controls in IE7.0
how to detect that browser is going to issue a write command
Changing the param of an applet with XSL or JS ...
Help with jQuery
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture