-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by sheridan
-
-
I am trying to finalise a co-creation website that swaps image when certain radio buttons are selected. It works in Firefox.. can anyone tell me why it is not working in Safari?The part that I feel does not connect is as below:}var sel = document.getElementById("mainimg");var s = grps+"";while (s.length < 5) s = "0" + s;sel.src = "http://www.designpartners.co.uk/resources/iPhone-skins/skin-options/iPhone_Skins_Art_Case"+s+".png";}function addmodelid() {var textbox = document.getElementById("item_number");var mainimg = document.getElementById("mainimg");var s = mainimg.srctextbox.value = s.substring(71);return true;}</script><div id="columns"><div class="right column"><p><img title="Fudged Skins" id="mainimg" alt="mainimg" src="http://www.designpartners.co.uk/resources/iPhone-skins/skin-options/iPhone_Skins_Art_Case02000.png" height="480" width="380" border="0" onsubmit="return addmodelid()"(mainimg)>
does sel.src work if safari?
in JavaScript
Posted · Edited by sheridan
Simples:The sel.src function was not changing the image file name in Safari - which was evident in the paypal post... so I knew it was not a cache problem... ! But I didnt know that Safari doesnt like onchange - it does like onclick though!!!!
Sacred is true.
Thanks!