Click to See Complete Forum and Search --> : Using Location Object in frame


Jerryt
03-30-2000, 09:18 AM
I am using the Location object to navigate to a certain page. The following
works form me.

'''''''WORKS
<script language="VBScript">
Function GotoLInk(lc_location)
location.href=lc_location
End Function
</script>

However, I am using a frame and the button that contains this code is in
the left frame. I want the LOCATION.HREF to display the page in the right
frame.

How can I tell the LOCATION object to show the web page in the right frame?
If there a TARGET="" option anywhere?

Thanks,

Jerryt

Savant
03-31-2000, 12:04 AM
Hello Jerry,
You can achieve this by a tricky method.
Location does not have TARGET.
Do as follows
Crate a dummy form
<form name="dummy"
action="XXXXX"
TARGET="FRAMENAME">
</form>
Then just do a programatic submitlike

document.dummy.Submit();

Hope this will solve your problem
Rgds




"Jerryt" <Jerrytovar@hotmail.com> wrote:
>
>I am using the Location object to navigate to a certain page. The following
>works form me.
>
>'''''''WORKS
><script language="VBScript">
>Function GotoLInk(lc_location)
>location.href=lc_location
>End Function
></script>
>
>However, I am using a frame and the button that contains this code is in
>the left frame. I want the LOCATION.HREF to display the page in the right
>frame.
>
>How can I tell the LOCATION object to show the web page in the right frame?
>If there a TARGET="" option anywhere?
>
>Thanks,
>
>Jerryt
>
>

Matt Hodge
03-31-2000, 08:20 AM
Actually the easier method is to do something like ...

parent.[your frame name goes here].location.href = [new web page goes
here]

or something like ...

parent.document.all.[your frame name goes here].src = [new web page goes
here]

I know the second one works and I am pretty sure the first one does too but
I do not have any of my code samples to look at right now so ...

Matt

Savant <Savant.Rcs@ap.sony.com> wrote in message
news:38e423d0$1@news.devx.com...
>
> Hello Jerry,
> You can achieve this by a tricky method.
> Location does not have TARGET.
> Do as follows
> Crate a dummy form
> <form name="dummy"
> action="XXXXX"
> TARGET="FRAMENAME">
> </form>
> Then just do a programatic submitlike
>
> document.dummy.Submit();
>
> Hope this will solve your problem
> Rgds
>
>
>
>
> "Jerryt" <Jerrytovar@hotmail.com> wrote:
> >
> >I am using the Location object to navigate to a certain page. The
following
> >works form me.
> >
> >'''''''WORKS
> ><script language="VBScript">
> >Function GotoLInk(lc_location)
> >location.href=lc_location
> >End Function
> ></script>
> >
> >However, I am using a frame and the button that contains this code is in
> >the left frame. I want the LOCATION.HREF to display the page in the right
> >frame.
> >
> >How can I tell the LOCATION object to show the web page in the right
frame?
> >If there a TARGET="" option anywhere?
> >
> >Thanks,
> >
> >Jerryt
> >
> >
>