how can I change "ford" into simply ford ? in one part of my code: ford.src will change an image.
<script language="JavaScript"> <!-- preload blank image -->
function change()
{
ford.src= "images/" + pres_name + ".jpg"
}
</script>
but I need to use a string variable (to account for all the presidents)
using "ford".src does not work. ford is the image name (see below)
here is my call from an href:
<a href='javascript:change(get_pres())' >
<img class=m1 src="images/blank.jpg" name="ford">
<a>
NOTE: get_pres() works fine
Thanks
<script language="JavaScript"> <!-- preload blank image -->
function change()
{
ford.src= "images/" + pres_name + ".jpg"
}
</script>
but I need to use a string variable (to account for all the presidents)
using "ford".src does not work. ford is the image name (see below)
here is my call from an href:
<a href='javascript:change(get_pres())' >
<img class=m1 src="images/blank.jpg" name="ford">
<a>
NOTE: get_pres() works fine
Thanks