[Javascript] Object help

Steve extstarrfam at cox-internet.com
Fri Apr 26 00:57:50 CDT 2002


I have a main or parent page (a frames page) named
'selections_frames'.  There are two frames on this page
one is named 'selections_area' and the other is
'mainDisplay'.  When the user makes a selection from a
list that exists in a table cell on a page that is
loaded into the 'selections_area' frame, I want to load
a new page in the 'selections_area' frame named 'Rocks
Options.html'.  I have tried a lot of things to do
this.  The results have ranged from:'Object required',
'is either Null or not an Object', to 'Undefined'.  The
code below results in 'Undefined'.  If you remove the
"var newFrame .......", the result is 'is either Null
or not an Object'.  On the frames page I used
"window.name = selections_frames" to name the page.
Will someone please help me find a solution.

result = selections_frames is undefined
function parentSel(refPage ) {
 var newFrame = new
Object(selections_frames.selections_area)
 if(refPage==1) newFrame.src="Rocks Options.html";
}

or

result = selections_frames.selections_area is either
null or not an object
function parentSel(refPage ) {
 if(refPage==1)
selections_frames.selections_area.src="Rocks
Options.html";
}





More information about the Javascript mailing list