473,396 Members | 1,783 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Extend Image Selector to also display different href?

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>
Jul 19 '05 #1
2 1781
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

<ja***@catamaranco.com> wrote in message
news:uZ**************@TK2MSFTNGP11.phx.gbl...
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>

Jul 19 '05 #2
Apologies...that was my intention!
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:%2****************@TK2MSFTNGP15.phx.gbl...
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

<ja***@catamaranco.com> wrote in message
news:uZ**************@TK2MSFTNGP11.phx.gbl...
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>


Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Bill M. | last post by:
Hello, I would like to extend or sub-class the base HTMLSelectElement and add some custom properties and methods. So far this works to create a new select element. var new_select= new...
6
by: Robert Lapes | last post by:
I'm just getting into using CSS and I'm having a problem getting Opera to display a Navigation Bar in the same way as IE6. Can someone please point me in the right direction? The site I'm...
8
by: abracad | last post by:
Hi Is it possible to vertically align an image in the middle of a DIV of fixed height?
2
by: tagbert | last post by:
I'm trying to localize the setting of colors on a series of webpages by defining color palettes that will be used for various page areas. I've defined some palette classes like .clrLt, .clrMd,...
3
by: MediaDesign | last post by:
so there's the problem: my text links have background images and when I put links around images on my page, they too get the background image treatment which I do not...I have tried several...
2
by: Kevin Lyons | last post by:
Hello, Can anyone assist me with what I am trying to do with the following code (six different scenarios to try to make the functionality work correctly)? I want to always (and ONLY) display...
2
by: Poppa Pimp | last post by:
ImageResizer.php Image Resizer PLEASE HELP The URL of the page this is on in my site is http://poppa-pimps-wallpapers.com//ImageResizer.php You can click on browse and get image,but...
1
by: jorgedec | last post by:
I have two test vertical menus. If I apply a border-bottom using a selecter of div.vbar a It looks fine. If I apply the border-bottom using a selecter of div.vbar ul li a
1
by: neovantage | last post by:
Hey all, I am using a PHP script which creates headings at run time in a sense at page execution. I am stuck a with a very little problem which i am sure i will have the solution from experts. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.