mariocesar Posted November 26, 2007 Share Posted November 26, 2007 Please help, this script works fine in my machine I use Dreamwaver to build pages and when I test the page work perfectly fine, but when I upload it to the hosting server don't work, here is the scrip. <script language="javascript" type="text/javascript"> function showDetails(x) { document.getElementById('det').style.display=''; document.getElementById('img5').src="php_uploads/uploads/"+x; } function offDetails() { document.getElementById('det').style.display='none'; } </script> and this is the part where the image shows it self on mouse over: <table cellspacing="3" cellpadding="2" align="center" class="sample"> <tr> <td rowspan="4" height="80" width="180"><div align="center"><img src="php_uploads/uploads/161107040021.jpg" width="55" height="80" border="0" onMouseOver="javascript: showDetails('161107040021.jpg');" onMouseOut="javascript: offDetails();"></div></td> <td width="94">CR-80 <div align="left" style="position:absolute; display:none; padding-left:11px; padding-top:10px; padding-right:22px; background-color:#DFE6E3;" id="det"> <img src="" id="img5" name="ing5" style="border:0px solid #666666;"></div> </td> </tr></table> thanks. Link to comment https://forums.phpfreaks.com/topic/79007-js-dont-work-on-line/ Share on other sites More sharing options...
phpQuestioner Posted November 27, 2007 Share Posted November 27, 2007 I do not know why you would be having problems with getting your script to work on your web host; unless you have an javascript error or conflict in another part of your page, that is affecting this script. because I run your script and it worked fine. you could try it like this, but it is basically the same as your original script: <script language="javascript"> function showDetails(x) { document.getElementById('det').style.display=''; document.getElementById('img5').src="php_uploads/uploads/"+x+""; } function offDetails() { document.getElementById('det').style.display='none'; } </script> <table cellspacing="3" cellpadding="2" align="center" class="sample"> <tr> <td rowspan="4" height="80" width="180"><div align="center"><img src="php_uploads/uploads/161107040021.jpg" width="55" height="80" border="0" onMouseOver="javascript: showDetails('161107040021.jpg');" onMouseOut="javascript: offDetails();"></div></td> <td width="94">CR-80 <div align="left" style="position:absolute; display:none; padding-left:11px; padding-top:10px; padding-right:22px; background-color:#DFE6E3;" id="det"> <img src="" id="img5" name="ing5" style="border:0px solid #666666;"></div> </td> </tr></table> Link to comment https://forums.phpfreaks.com/topic/79007-js-dont-work-on-line/#findComment-400003 Share on other sites More sharing options...
mariocesar Posted November 27, 2007 Author Share Posted November 27, 2007 Thanks, Questioner may be folder permissions? Link to comment https://forums.phpfreaks.com/topic/79007-js-dont-work-on-line/#findComment-400025 Share on other sites More sharing options...
phpQuestioner Posted November 27, 2007 Share Posted November 27, 2007 this is a basic/common JavaScript method; I do not know of any host that prevents this basic form of JavaScript. I guess it is possible though, but probably not likely. if you have any other code that goes with this script; you might want to check it for errors. Link to comment https://forums.phpfreaks.com/topic/79007-js-dont-work-on-line/#findComment-400035 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.