By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,568 Members | 1,713 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,568 IT Pros & Developers. It's quick & easy.

change top frame location

P: n/a
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.

Nov 29 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/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</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
Nov 29 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.