Hi, I've two Javascripts that seem to be conflicting with each other. Just of them works due to the window.onload issue: First one has "window.onload=function()" and the other one "window.onload=stripe" Is there anyway I can get both these JS to work correctly in IE/FF/Safari? Any help greatly appreciated. Many Thanks.
stripe - could you put that inside the functon in the first one? Sorry not really a js guru, just know a wee bit
If you have multiple scripts calling window.onload they're going to conflict with each other. What you need to do is create a function at the end of your script library, assign THAT function the window.onload event handler, and then call the functions from the rest of your script library inside that function instead. Here's an example: window.onload = function() { firstfunction(); secondfunction(); thirdfunction(); } Code (markup):