Passing a search string from one frame to another

L

LetMeDoIt

Greetings,
Hope someone can help with this task. I have a menu with 3
selections. Upon selecting any of the selections, the current window
(frame?) is split into 2 frames. The top frame is the button frame
(ie it contains 1 button), and the bottom frame is the Details frame.
In the frame button, users may enter information which is passed to
the Details frame, etc

The button frame is called button.asp and the bottom frame is called
detail.asp. The button frame is used to perform a retrieve (against
MSSQL) in the bottom frame.

The layout of the frames are setup the way I expect it.

The problem I'm having is I that when I enter a search string, I not
sure how the button frame communicates with the details frame. Ie if
I enter ABC and press Search, then I'd like "ABC" to be passed to the
details frame.

All works well if I embedd the button frame to the details frame.

Any help is greatly appreciated.
regards.
 
T

Travis Newbury

Greetings,
Hope someone can help with this task.
Any help is greatly appreciated.

I have created a Flash object that can communicated between instances
of itself. That is you can have one of the object in one browser and
another in a completely different browser or the same browser and
different frames, or different browsers and different frames all at
the same time. Any freaking combination of browsers and frames can
talk to each other. Anyway...

This allows a rather simple means of communicating between instances
of web pages. If you own both domains, or can put XML files in the
root of them, then you can even have them pass information between
domains

For the most part it is all just basic Flash Actionscript. But when
you need different pages to communicate in real time with other pages
or domains, it make for some very easy javascript. The best part is
probably the cross domain communications which I believe is against
the javascript rules.

Would something like this work?
 
L

LetMeDoIt

Any chance you can send a sample code in Javascript? I can give that
a shot. Keep in mind that what I'm trying to do is real simple, and
basically all I'm doing to trying to pass one string entered in one
frame into another frame. Cookies are out of the question (most users
here cannot write to their own HD). Thanks a mil.
 
L

LetMeDoIt

OK, it's 'almost' working but not quite there yet. I'm expecting to
see data returned in in strURL or in "search". this is my code:

file is called button.asp:

<form action="<%= strURL %>" method="get">
<input name="search" value="<%=strSearch%>"
onClick="parent.frames[1].location='retrieve.asp';" />
<input type="submit" />
</form>

and the retrieve.asp file contains :
....
strURL = Request.ServerVariables("URL")
Response.Write "VALUE IS... " & search & "<br />"
....

nothing is being returned in strURL... what am I doing wrong? Many
THanks.
 
A

Andy Dingley

The problem I'm having is I that when I enter a search string, I not
sure how the button frame communicates with the details frame.

Trivial JavaScript, that access other frames through the DOM. You
might find examples of this by web searching, but most web JS code
libraries are abysmally poor quality. A posting to
comp.lang.javascript might give you some better practice.

On the whole though, throw away your frames and start again. If you're
not using JS, then frames have some advantages to offer (and a whole
load of disadvantages). Once you've accepted the use of JS though, you
can do a whole pile of different techniques that aren't based around
frames and let you avoid their problems. Some of these would use AJAX
(retrieving your datasets by XML or maybe JSON) others might use an
<iframe> rather than frames, and would allow you to use pretty much
the same HTML-serving web service endpoints you're already using. The
<iframe> solution is probably your best overall - given your current
starting point. <iframe>s are _not_ the same as frames, they don't
have the same disadvanatges as frames and by the use of JS as you
describe here, you can work around most of the disadvantages that they
do share with frames.

In particular, make sure that your finished solution is RESTful (look
it up on wikipedia). The practical requirement here would be that
there were stable URLs to the overall page that retrieved the same
data query each time, not just a single URL and a need for manual
tweaking of search boxes.


Flash is entirely inappropriate here. Poor old Travis, it's all he
knows.
 
L

LetMeDoIt

Trivial JavaScript, that access other frames through the DOM. You
might find examples of this by web searching, but most web JS code
libraries are abysmally poor quality. A posting to
comp.lang.javascript might give you some better practice.

On the whole though, throw away your frames and start again. If you're
not using JS, then frames have some advantages to offer (and a whole
load of disadvantages). Once you've accepted the use of JS though, you
can do a whole pile of different techniques that aren't based around
frames and let you avoid their problems. Some of these would use AJAX
(retrieving your datasets by XML or maybe JSON) others might use an
<iframe> rather than frames, and would allow you to use pretty much
the same HTML-serving web service endpoints you're already using. The
<iframe> solution is probably your best overall - given your current
starting point. <iframe>s are _not_ the same as frames, they don't
have the same disadvanatges as frames and by the use of JS as you
describe here, you can work around most of the disadvantages that they
do share with frames.

In particular, make sure that your finished solution is RESTful (look
it up on wikipedia). The practical requirement here would be that
there were stable URLs to the overall page that retrieved the same
data query each time, not just a single URL and a need for manual
tweaking of search boxes.

Flash is entirely inappropriate here. Poor old Travis, it's all he
knows.

thank you for your input (to you also Travis), how about if I remove
the OnClick call and replace it with the asp or html equivalent?...
I'll do anything in order to avoid rewriting this whole thing (the
rest of the code works well and reeeeeaaaaaally do not want to
rewrite...)
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top