The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
Alright I am trying to swap an image out and for the life of me I think this should work but it doesn't and I cannto figure out why can anyone else spot it?
This is the image in the page its supposed to be updating:
<img src="images/OilAd.png" id="CouponPicture" alt="Click to Print Special!" /></a>
Thanks for the help.
Jeff
Code:
<script language="javascript" type="text/javascript">
function gup(name) { name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); var regexS = "[\\?&]" + name + "=([^#]*)"; var regex = new RegExp(regexS); var results = regex.exec(window.location.href); if (results == null) return ""; else return results[1]; }
function setimg() {
adclicked = gup('ad');
if (adclicked == 'Oil')
document.getElementById('CouponPicture').src = 'images/OilAd.png';
if (adclicked == 'Radiator')
document.getElementById('CouponPicture').src = 'images/Radiator.gif';
if (adclicked == 'Windshield')
document.getElementById('CouponPicture').src = 'images/Windshield.gif';
if (adclicked == 'Headlights')
document.getElementById('CouponPicture').src = 'images/Headlights.gif';
}
</script>
This is the image in the page its supposed to be updating:
<img src="images/OilAd.png" id="CouponPicture" alt="Click to Print Special!" /></a>
Thanks for the help.
Jeff