Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > change top frame location

Reply
Thread Tools

change top frame location

 
 
drec
Guest
Posts: n/a
 
      11-29-2006
Is it possible using Javascript to send "Frame1" a new location or URL
when "Frame2" is loaded?

I am passing a variable through the URL using 2 php scripts (top and
bottom.php) when a user clicks a link. In my example, Users can click
on a letter of Alphabet (in top.php) and it will pass the url
"bottom.php?order=A". After this I can grab the value and have it
stored in bottom.php, but I would like to also send this value back to
top.php without any user intervention.

I have tried using topframe.location="top.php?order=$variable" but am
having no luck.

 
Reply With Quote
 
 
 
 
ASM
Guest
Posts: n/a
 
      11-29-2006
drec a écrit :
> Is it possible using Javascript to send "Frame1" a new location or URL
> when "Frame2" is loaded?


Usual double link (using at same time html and JS)

<a href=page_1.htm" target="frame_A"
onlick="parent.frame_B.location = 'page_2.htm'>menu 1</a>

> I am passing a variable through the URL using 2 php scripts (top and
> bottom.php) when a user clicks a link. In my example, Users can click
> on a letter of Alphabet (in top.php) and it will pass the url
> "bottom.php?order=A".


<a href=top.php?order=A" target="topFrame"
onlick="parent.bottomFrame.location = 'bottom.php?order=A'>A</a>
<a href=top.php?order=B" target="topFrame"
onlick="parent.bottomFrame.location = 'bottom.php?order=B'>B</a>


With a form :

<form action="top.php" method="get" target="topFrame"
onsubmit="
parent.bottomFrame.location = 'bottom.php?order='+this.order.value;
">
<select name="order">
<option value="A">A
<option value="B">B
..../...
<option value="Z">Z
</select><input type=submit value=GO>
</form>


--
Stephane Moriaux et son moins vieux Mac déjà dépassé
Stephane Moriaux and his less old Mac already out of date
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use one frame to change images in another frame. Leoa Javascript 7 06-20-2007 05:04 AM
Location, location, location =?Utf-8?B?VHJhY2V5?= Wireless Networking 2 02-17-2007 08:37 PM
How to make change one frame size (width) when I clicked a button on anothoer frame? ABC ASP .Net 0 06-28-2006 03:37 AM
How to trick a page into running at a location different from it'sphysical location? Luke Dalessandro ASP .Net 0 01-15-2006 05:59 AM
window.opener.top.location.top.close ??? find clausen Javascript 2 10-05-2003 04:35 PM



Advertisments