Passing a search string from one frame to another

Discussion in 'HTML' started by LetMeDoIt, Oct 23, 2007.

  1. LetMeDoIt

    LetMeDoIt Guest

    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.
     
    LetMeDoIt, Oct 23, 2007
    #1
    1. Advertising

  2. On Oct 23, 1:49 pm, LetMeDoIt <> 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?
     
    Travis Newbury, Oct 23, 2007
    #2
    1. Advertising

  3. LetMeDoIt

    LetMeDoIt Guest

    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.
     
    LetMeDoIt, Oct 24, 2007
    #3
  4. LetMeDoIt

    LetMeDoIt Guest

    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.
     
    LetMeDoIt, Oct 24, 2007
    #4
  5. LetMeDoIt

    Andy Dingley Guest

    On 23 Oct, 18:49, LetMeDoIt <> 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.
     
    Andy Dingley, Oct 25, 2007
    #5
  6. LetMeDoIt

    LetMeDoIt Guest

    On Oct 25, 5:45 am, Andy Dingley <> wrote:
    > On 23 Oct, 18:49, LetMeDoIt <> 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...)
     
    LetMeDoIt, Oct 25, 2007
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Søren M. Olesen
    Replies:
    0
    Views:
    611
    Søren M. Olesen
    Nov 13, 2003
  2. Noozer
    Replies:
    0
    Views:
    3,026
    Noozer
    Oct 22, 2005
  3. Fokke Nauta
    Replies:
    3
    Views:
    980
    Fokke Nauta
    Apr 29, 2009
  4. Kathryn
    Replies:
    4
    Views:
    386
  5. Angus the Fighter

    access another frame by one frame

    Angus the Fighter, Jul 19, 2004, in forum: Javascript
    Replies:
    2
    Views:
    113
    Angus the Fighter
    Jul 19, 2004
Loading...

Share This Page