Jump to content

JS don't work on line


mariocesar

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.