[Javascript] Object help

Rodney Myers rodney at aflyingstart.net
Fri Apr 26 03:37:01 CDT 2002


window.location.href="url"
works for me!

Since the selection of the new file is being done within the same frame
that you want to replace with another file that should about do it,
replacing "url" with a suitable string or string valued var.

There seems to be no need to be defining new Objects naming frames that
are or should be laready named in the HTML of the <frame > in the
frameset file. And .src is a property that I have never used for the
file content of a window. I hesitate to say categorically that it is
wrong but I have never seen it used before in such a context and there
are more accepted ways of doing it.

hth

Rodney

Steve wrote:

> 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";
> }
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript





More information about the Javascript mailing list