liamloveslearning Posted January 6, 2010 Share Posted January 6, 2010 Hi everyone, On a website im building I have a live assistance button which opens a popup window for the consumer to chat with a salesperson, The code for the button is <a href="http://www.comm100.com/livechat/" onclick="comm100_Chat();return false;" target="_blank"><img id="comm100_ButtonImage" src="http://chatserver.comm100.com/BBS.aspx?siteId=1&planId=85" border="0px" /></a> <script src="http://chatserver.comm100.com/js/LiveChat.js?siteId=18077&planId=85" type="text/javascript"></script> I want to insert my own rollover image in place of the one they have hosted only no matter what I try I cant seem to get it to function correctly, Ive tried <a href="http://www.comm100.com/livechat/" onclick="comm100_Chat();return false;" target="_blank" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image11','','f',1)"><img id="comm100_ButtonImage" src="myimg.jpg" border="0px" /></a> <script src="http://chatserver.comm100.com/js/LiveChat.js?siteId=18077&planId=85" type="text/javascript"></script> to no avail. Has anybody and advice they can give me in regards to sorting this? thanks Link to comment https://forums.phpfreaks.com/topic/187416-javascript-rollover/ Share on other sites More sharing options...
KevinM1 Posted January 6, 2010 Share Posted January 6, 2010 Don't use JavaScript for link rollovers. Use CSS instead. Link to comment https://forums.phpfreaks.com/topic/187416-javascript-rollover/#findComment-989717 Share on other sites More sharing options...
Irresistable Posted January 6, 2010 Share Posted January 6, 2010 It'd be a Hover too. EG: <style> <code> #mylink:hover { css for hover } </style> <a href="link.php" id="mylink">link</a> </code> Link to comment https://forums.phpfreaks.com/topic/187416-javascript-rollover/#findComment-989736 Share on other sites More sharing options...
liamloveslearning Posted January 6, 2010 Author Share Posted January 6, 2010 I dont know how I completely looked past using CSS, would it still be possible to implement the javascript pop tho? Link to comment https://forums.phpfreaks.com/topic/187416-javascript-rollover/#findComment-989790 Share on other sites More sharing options...
Irresistable Posted January 6, 2010 Share Posted January 6, 2010 MM_swapImage('Image11','','f',1) Whats the function you created for that? Also, whats the function for MM_swapimgRestore() Link to comment https://forums.phpfreaks.com/topic/187416-javascript-rollover/#findComment-989801 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.