Regarding dynamic navigation from one frame to another frame

Results 1 to 5 of 5

Thread: Regarding dynamic navigation from one frame to another frame

  1. #1
    T.Nagaraj Guest

    Default Regarding dynamic navigation from one frame to another frame

    Sir,<BR>In one of asp page, I have 2 frames. In the left frame i have a drop down menu(it&#039s name is "dist"). I have 4 values in it namely<BR>"kurnool,cuddapah,ananthapur and karimnagar".In the right frame i have one large ap.gif image.<BR> I want when i click kurnool, the ap.gif should be replaced by kurnool.gif in the right frame. Like this when i click cuddapah, ap.gif should be replaced by cuddapah.gif and so on.<BR>i have written code :<BR>&#060;form method="post" action="&#060;%=request.form("dist")&#037;&#062;"> <BR>&#060;Select name="dist"><BR>&#060;option value="kurnool">kurnool&#060;/option><BR>&#060;option value="cuddapah">cuddapah&#060;/option><BR>&#060;option value="karinmangar">karimnagar&#060;/option><BR>&#060;option value="ananthapur">ananthapur&#060;/option><BR>&#060;/select><BR>&#060;input type=submit value="Go"><BR>&#060;/form><BR>----<BR>When i clicked "Go" button, the system is giving error message.<BR>So i request you, to reply to my question as early as possible.<BR><BR>Thanking you,<BR>T.Nagaraj

  2. #2
    Chris Willey Guest

    Default RE: Regarding dynamic navigation from one frame to another frame

    This would best be handled using Javascript, so it&#039s off-topic. I hope everyone&#039s OK with that.<BR><BR>Assuming your frames are named "navframe" (the drop-down menu) and "imageframe" (the ap.gif frame), do the following:<BR><BR>1) Name your image something like "distimage"<BR>2) Take out the action parameter for your form tag, and add a name parameter (i.e.: change the form tag to read &#060;form name="form1">)<BR>3) Change your "Submit" button to just "button" (i.e.: &#060;input type="button">)<BR>4) For that button, add an "onclick" event handler that calls a Javascript function like this: &#060;input type="button" value="go" onclick="changeImage()"><BR>5) In the &#060;head>&#060;/head> area of the "navframe" frame, add the following lines:<BR>&#060;script language="Javascript"><BR>&#060;!--<BR>function changeImage() {<BR>i = document.form1.dist.selectedIndex;<BR>str = document.form1.dist.options[i].value;<BR>imageframe.document.distimage.src = str + ".gif";<BR>}<BR>//--><BR>&#060;/script><BR><BR>That should work.

  3. #3
    T.Nagaraj Guest

    Default RE: Regarding dynamic navigation from one frame to another frame

    Sir,<BR><BR>Thank for your reply.<BR>This is previous code(for your reference):<BR>In one of asp page, I have 2 frames. In the left frame i have a drop down menu(it&#039s name is "dist"). I have 4 values in it namely"kurnool,cuddapah,ananthapur and karimnagar".In the right frame i have one large ap.gif image.<BR> I want when i click kurnool, the ap.gif should be replaced by kurnool.gif in the right frame. Like this when i click cuddapah, ap.gif should be replaced by cuddapah.gif and so on.<BR> i have written code :<BR> &#060;form method="post" action="&#060;%=request.form("dist")&#037;&#062;"> <BR> &#060;Select name="dist"><BR> &#060;option value="kurnool">kurnool&#060;/option><BR> &#060;option value="cuddapah">cuddapah&#060;/option><BR> &#060;option value="karinmangar">karimnagar&#060;/option><BR> &#060;option value="ananthapur">ananthapur&#060;/option><BR> &#060;/select><BR> &#060;input type=submit value="Go"><BR> &#060;/form><BR> ----<BR>I placed your code in the asp page.When i am writing "imageframe"(i.e. ap.gif frame) the system is giving error "imageframe" is undefined.What is the solution?<BR>I will be very thankful for you.<BR>Waiting for your reply,<BR>T.Nagaraj<BR>

  4. #4
    T.Nagaraj Guest

    Default RE: Regarding dynamic navigation from one frame to another frame

    &nbsp;<BR>Sir,<BR><BR>Thank for your reply.<BR>This is previous code(for your reference):<BR>In one of asp page, I have 2 frames. In the left frame i have a drop down menu(it&#039s name is "dist"). I have 4 values in it namely"kurnool,cuddapah,ananthapur and karimnagar".In the right frame i have one large ap.gif image.<BR><BR>I want when i click kurnool, the ap.gif should be replaced by kurnool.gif in the right frame. Like this when i click cuddapah, ap.gif should be replaced by cuddapah.gif and so on.<BR> i have written code :<BR> &#060;form method="post" action="&#060;%=request.form("dist")&#037;&#062;"> <BR> &#060;Select name="dist"><BR> &#060;option value="kurnool">kurnool&#060;/option><BR> &#060;option value="cuddapah">cuddapah&#060;/option><BR> &#060;option value="karinmangar">karimnagar&#060;/option><BR> &#060;option value="ananthapur">ananthapur&#060;/option><BR> &#060;/select><BR> &#060;input type=submit value="Go"><BR> &#060;/form><BR> ----<BR>I placed your code in the asp page.When i am writing "imageframe"(i.e. ap.gif frame) the system is giving error "imageframe" is undefined.What is the solution?<BR> I will be very thankful for you if you reply to me.<BR> Waiting for your reply,<BR> T.Nagaraj<BR>


  5. #5
    Chris Willey Guest

    Default RE: Regarding dynamic navigation from one frame to another frame

    I used the names "navframe" and "imageframe" to refer to the two frames you created. You need to name them in the main frameset page (i.e.: &#060;frame name="navframe">). If you have already done so, then change the names "navframe" and "imageframe" to whatever names you chose. If you have not already named the frames, you need to do that (and you might as well use the names I chose). In my example, "navframe" refers to the frame containing the drop-down list, and "imageframe" refers to the frame with the "ap.gif" image in it.<BR><BR>Hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •