change top frame location

D

drec

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.
 
A

ASM

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 said:
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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top