Hi, seem to be having a problem with a similar script in the same .html page. Even though I changed the function names etc. One uses page load, the other uses window.load. Only one of them will work. Does javascript have a problem with both in the same page? If so, why please. Thank you very much!
No javascript have not problems with two similar script in the same page, but, If those scripts use same variables names, functions names and more names , then we have a problem, B.T.W You can allow 2 functions to run with page load like this : <body onload="function();function_two();"> HTML:
OK, hi Morishani, thanks for the good tip. I have them named with different functions but they have alike variables. Because they are the same exact scripts connected twice externally they need to use one onload function. But read my next message below, there is still a big problem left.
OK heres another code to include more than one body onload function. <script type="text/javascript">window.onload=function(){outImage('owned');inImage('put');}</script> So both alike scripts work on the same page. But now I have to time them exactly the same. Otherwise one script is picking up the timing of the other. Even with separate function names. Anyone know how to get around this without using an I-frame? To inlcude both scripts on the same page? Thanks.