Extend Image Selector to also display different href?

Discussion in 'ASP General' started by Guest, Sep 1, 2004.

  1. Guest

    Guest Guest

    Could someone help extend this ChangeImage function to also display a
    different hyperlink underneath the newly selected image?:

    <script language="javascript">
    <!--

    /*Combo Box Image Selector:
    By JavaScript Kit (www.javascriptkit.com)
    Over 200+ free JavaScript here!
    */

    function showimage()

    {
    if (!document.images)
    return
    document.images.pictures.src=
    document.username.u_BrokerID.options[document.username.u_BrokerID.selectedIn
    dex].value
    }
    //-->
    </script>



    <form name="username" method=post action="join_step4.asp" onSubmit="return
    CheckForm();">
    <SELECT NAME='u_BrokerID' size='1' onChange='showimage()'><OPTION
    VALUE='0'>--Select a Broker--</OPTION><option
    value="/catamaranco/images/brokers/john_2.jpg">John Anderson</option><option
    value="http://www.catamaranco.com/images/brokers/staley_2.jpg">Staley
    Weidman </option>
    <input type=submit value=submit>
    </form>

    <br><br>

    <a href="Site1.asp">Change this url depending on the value of the image
    selected in the dropdown?</a>
    Guest, Sep 1, 2004
    #1
    1. Advertising

  2. You may want to try asking in a client-side scripting group such as
    microsoft.public.scripting.jscript, as this group only focuses on
    server-side ASP programming.

    Ray at work

    <> wrote in message
    news:...
    > Could someone help extend this ChangeImage function to also display a
    > different hyperlink underneath the newly selected image?:
    >
    > <script language="javascript">
    > <!--
    >
    > /*Combo Box Image Selector:
    > By JavaScript Kit (www.javascriptkit.com)
    > Over 200+ free JavaScript here!
    > */
    >
    > function showimage()
    >
    > {
    > if (!document.images)
    > return
    > document.images.pictures.src=
    > document.username.u_BrokerID.options[document.username.u_BrokerID.selectedIn
    > dex].value
    > }
    > //-->
    > </script>
    >
    >
    >
    > <form name="username" method=post action="join_step4.asp" onSubmit="return
    > CheckForm();">
    > <SELECT NAME='u_BrokerID' size='1' onChange='showimage()'><OPTION
    > VALUE='0'>--Select a Broker--</OPTION><option
    > value="/catamaranco/images/brokers/john_2.jpg">John
    > Anderson</option><option
    > value="http://www.catamaranco.com/images/brokers/staley_2.jpg">Staley
    > Weidman </option>
    > <input type=submit value=submit>
    > </form>
    >
    > <br><br>
    >
    > <a href="Site1.asp">Change this url depending on the value of the image
    > selected in the dropdown?</a>
    >
    >
    Ray Costanzo [MVP], Sep 1, 2004
    #2
    1. Advertising

  3. Guest

    Guest Guest

    Apologies...that was my intention!
    "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    message news:%...
    > You may want to try asking in a client-side scripting group such as
    > microsoft.public.scripting.jscript, as this group only focuses on
    > server-side ASP programming.
    >
    > Ray at work
    >
    > <> wrote in message
    > news:...
    > > Could someone help extend this ChangeImage function to also display a
    > > different hyperlink underneath the newly selected image?:
    > >
    > > <script language="javascript">
    > > <!--
    > >
    > > /*Combo Box Image Selector:
    > > By JavaScript Kit (www.javascriptkit.com)
    > > Over 200+ free JavaScript here!
    > > */
    > >
    > > function showimage()
    > >
    > > {
    > > if (!document.images)
    > > return
    > > document.images.pictures.src=
    > >

    document.username.u_BrokerID.options[document.username.u_BrokerID.selectedIn
    > > dex].value
    > > }
    > > //-->
    > > </script>
    > >
    > >
    > >
    > > <form name="username" method=post action="join_step4.asp"

    onSubmit="return
    > > CheckForm();">
    > > <SELECT NAME='u_BrokerID' size='1' onChange='showimage()'><OPTION
    > > VALUE='0'>--Select a Broker--</OPTION><option
    > > value="/catamaranco/images/brokers/john_2.jpg">John
    > > Anderson</option><option
    > > value="http://www.catamaranco.com/images/brokers/staley_2.jpg">Staley
    > > Weidman </option>
    > > <input type=submit value=submit>
    > > </form>
    > >
    > > <br><br>
    > >
    > > <a href="Site1.asp">Change this url depending on the value of the image
    > > selected in the dropdown?</a>
    > >
    > >

    >
    >
    Guest, Sep 1, 2004
    #3
    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. Replies:
    0
    Views:
    355
  2. CRON
    Replies:
    24
    Views:
    200,470
    Adrienne Boswell
    Jun 20, 2006
  3. Soren Vejrum
    Replies:
    4
    Views:
    530
    Lasse Reichstein Nielsen
    Jul 5, 2003
  4. saiho.yuen
    Replies:
    3
    Views:
    410
    kaeli
    Sep 14, 2004
  5. Replies:
    2
    Views:
    444
Loading...

Share This Page