Extend Image Selector to also display different href?

G

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

Ray Costanzo [MVP]

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
 
G

Guest

Apologies...that was my intention!
Ray Costanzo said:
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

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>
 

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

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top