Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > [JAVASCRIPT, PHP, MYSQL] Pass Variable from a non-trigger frame to another.

Reply
Thread Tools

[JAVASCRIPT, PHP, MYSQL] Pass Variable from a non-trigger frame to another.

 
 
mailing@allstream.net
Guest
Posts: n/a
 
      12-16-2005
Hello, I am hoping that someone can point me in the right direction.
I have 4 frames to my site. Two Rows, Two Columns.
|--------------------------------|-------------------------|
| | |
| 1 | 2 |
| | |
|--------------------------------|-------------------------|
| | |
| | |
| 3 | 4 |
| | |
| | |
| | |
|--------------------------------|-------------------------|

Frame one is a search form - by city, province and postal code. The
results are shown in frame 4. Frame 3 is a map and frame 2 is a static
frame.

How its working now:
Once the person submits their search methond and search string
(clicking on a submit button) frame 4 will list all the locations in
that province for them to view. If a person would like to map a
specific location from frame 4, they can click on a link and it will
map it in frame #3. (All done via PHP, MYSQL, HTML and GOOGLE's API)

What I would like to happen:
Upon clicking the submit button in frame 1 (ie. say they select
province), I would like frame 3 to map all of the results listed in
frame #4. The only way I can think of accomplishing this is by, having
frame 4 refresh frame 3 and append a URL encoded string with the
coordinates.

I am a newbie when it comes to javascript and I need some help to
confirm if the following is correct.

I have the following code at the end of Frame #4 - hoping that when it
finishes displaying the results, it will reload frame 3.
================================================== ===
FRAME 4 CONTENTS (frame4.php) // frame3 is the name of the frame
================================================== ===
<script language="JavaScript" type="text/javascript">
<!--
fucntion refresh() {
parent.frames["frame3"].location.href = "frame3.php?<? echo
$URLSTRING; ?>";
}
-->
</script>
<body onLoad="javascript:refresh()">
================================================== =====

Can someone please point me in the right direction?
Thank you,
Jay Vee

 
Reply With Quote
 
 
 
 
mailing@allstream.net
Guest
Posts: n/a
 
      12-16-2005
After posting this, I realized that I spelled function wrong. I
corrected it and it worked. Silly me. Since I already posted it, is
there a way of having the values of the submit form sent to two frames
at the same time? ... I have seen a few scripts on how to do it on an
HREF, but that wont submit the form variables.

Thanks again, and sorry for my silly mistake.
Jay Vee

 
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
Re: Variable Input on procedure - pass by value or pass by reference? Reuven VHDL 0 03-19-2009 07:21 PM
Re: Variable Input on procedure - pass by value or pass by reference? Tricky VHDL 0 03-19-2009 03:59 PM
Variable Input on procedure - pass by value or pass by reference? Tricky VHDL 0 03-19-2009 03:58 PM
Trying to access a JavaScript variable in one frame from another frame. Rob Javascript 11 05-17-2006 04:25 PM
How to pass variable argument list to another function w/ variable argument list? Ben Kial C Programming 1 11-15-2004 01:51 AM



Advertisments