GeeCON Prague 2014*
The moose likes HTML, CSS and JavaScript and the fly likes on choosing which document to operate on Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "on choosing which document to operate on" Watch "on choosing which document to operate on" New topic
Author

on choosing which document to operate on

christine clarin
Ranch Hand

Joined: Feb 05, 2005
Posts: 106
hello, i have this problem, i am working on this document for example, i have html.htm, and i wanted to insert a row on it, so what i did was this:

var x = document.getElementById('table_2').insertRow (0);

which works well and then i wanted to put an event on it so i did this:

x.onklick = function (event) { return display (); }

my problem is that on the display function, i want to use another document, not html.htm such that when i do this :

function display () {
document.write ('hello');
}

would display on a specific document that i should supply like in html2.htm. how do i do this? do i make html2.htm an argument to the function? but how will i do that? is there any other way to do it aside from making it an argument?

thank you very much!!! i really need all the help i can get...
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I have no clue what you are asking. Do you want to display a new page?

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61298
    
  66

Is the second page loaded anywhere? If so, what is its relationship to the first page? If not, your question isn't making much sense.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
christine clarin
Ranch Hand

Joined: Feb 05, 2005
Posts: 106
hello, yes, i have this window which has 2 browsers, browser1 and browser2 (see in the image), i already put events in browser1 such that when i click any row in it, a function is performed (as of now, it's just alert). what i want to function to do is to display in browser2. how do i do that? thanks!

i tried doing this:
var newWin=window.open("html2.htm","newWin");
newWin.document.write("hello");

(html2 is loaded in browser2) but it only opens a new window. thanks.


[ May 30, 2006: Message edited by: christine clarin ]
[ May 30, 2006: Message edited by: christine clarin ]
 
Don't get me started about those stupid light bulbs.
 
subject: on choosing which document to operate on