I need to change an image without changing anything else on the page from say image1.jpg to image2.jpg an it has to be done in VBScript. I can do it in Javascript but for some reason I can't get it working in VBscript.
Here is a code snippet that works for me.
Put the code into an HTML file and get two images in the same directory.
<Script Language="VBScript">
Function ChangeImg(theField)
if instr(1,theField.src,"printer.gif" <>0 then
theField.src="email.gif"
else
theField.src="printer.gif"
end if
End function
</script>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.