Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Passing a search string from one frame to another

Reply
Thread Tools

Passing a search string from one frame to another

 
 
LetMeDoIt
Guest
Posts: n/a
 
      10-23-2007
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.

 
Reply With Quote
 
 
 
 
Travis Newbury
Guest
Posts: n/a
 
      10-23-2007
On Oct 23, 1:49 pm, LetMeDoIt <powercode...@yahoo.com> wrote:
> 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?

 
Reply With Quote
 
 
 
 
LetMeDoIt
Guest
Posts: n/a
 
      10-24-2007
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.

 
Reply With Quote
 
LetMeDoIt
Guest
Posts: n/a
 
      10-24-2007
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.


 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      10-25-2007
On 23 Oct, 18:49, LetMeDoIt <powercode...@yahoo.com> wrote:

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

 
Reply With Quote
 
LetMeDoIt
Guest
Posts: n/a
 
      10-25-2007
On Oct 25, 5:45 am, Andy Dingley <ding...@codesmiths.com> wrote:
> On 23 Oct, 18:49, LetMeDoIt <powercode...@yahoo.com> wrote:
>
> > 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.


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

 
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
How to get content from one frame into another frame Fokke Nauta HTML 3 04-29-2009 09:19 AM
Refresh one frame from link in another frame? Noozer HTML 0 10-22-2005 09:23 AM
Manipulating control in one frame from another frame, how? Søren M. Olesen ASP .Net 0 11-13-2003 05:37 PM
Using form data from one frame in another frame Kathryn ASP General 4 11-07-2003 02:22 PM
Passing value from one script on one page to another script on another page. Robert Cohen ASP General 3 07-15-2003 01:46 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57