Hi there,
Simple problem here but can't seem to fix it!
Okay, I have a select list from which people choose avatars...
the list is option values ie. <option>Worm</option> <option>Frog</option>
etc etc and is in an include file...
where the word i.e. worm sources the image ..images/worm.gif - simple so
far...
okay main problem is the onChange event in the select tag... which when you
select a new avatar on the list, the image preview should update... but it
doesn't
works on my DB update and refresh, but want it to preview as they select it
before update.
Anyone help
Thanks in Advance
Lee
<select name="SelectAvatar" class="avatar" onChange="(avatar.src =
SelectAvatar.options[SelectAvatar.selectedIndex].value) &&
(oldAvatar.value='')">
<option value="<% = strAvatar %>"><% If strAvatar = "" Then Response.Write
"None Selected" Else Response.Write strAvatar %></option>
<!-- #include file="forum/selectavatar.asp" -->
</select>
<img src="shared/avatars/<%
'If there is an avatar then display it
If strAvatar <> "" Then
Response.Write(strAvatar)
Else
Response.Write("noneselected")
End If
%>.gif" width="32" height="32" name="avatar">
<input type="hidden" name="oldAvatar" value="<% = strAvatar %>">