Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

thumbnail script


  • Please log in to reply
8 replies to this topic

#1 pcmonsters

pcmonsters

  • Members
  • 21 posts
  • OFFLINE
  •  
  • Local time:04:57 AM

Posted 16 April 2009 - 09:03 AM

hi everyone.

i want to make a blog and want to use a thumbnail script that i have. But the sript is not working well for me.

the thumbnails are good and working but when i hoover on a thumnail with my cursor the image is not showing on the right

here is the script i hope someone can help me out with this


<!-- === Begin Frame === -->
<table class="mainframe" style="width: 100%;" cellspacing="0">
<tr>
<td class="mf_tl"></td>
<td class="mf_tm"></td>
<td class="mf_tr"></td>
</tr>
<tr>
<td class="mf_ml"></td>
<td class="mf_content" style="text-align: left; padding: 6px;">
<h1></h1><script type="text/javascript">
function showpic(tt_pic,tt_text) {
document.picbox.src = tt_pic;
document.getElementById('txtbox').innerHTML = tt_text;
}
</script>
<style type="text/css">
<!--
a:link .tenpic, a:visited .tenpic { width: 70px; height: 110px; padding: 0px; border: 0px solid silver; margin: 3px; background-color: black; }
-->
</style>
<div style="width: 660px; height: 230px; position: relative;">
<div style="width: 470px; float: left;">
<a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a><a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a><a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a><a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a><a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a><a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a><a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a><a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a><a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a><a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a><a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a><a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a></div><img name="picbox" style="max-width: 160px; max-height: 230px; position: absolute; right: 10px; top: 0px;" src=" ">
<td class="mf_mr"></td>
</tr>
<tr>
<td class="mf_bl"></td>
<td class="mf_bm"></td>
<td class="mf_br"></td>
</tr>
</table>
<!-- === End Frame === -->

Edited by pcmonsters, 16 April 2009 - 07:02 PM.


BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:03:57 AM

Posted 16 April 2009 - 09:54 AM

Can we see you showpic function?

#3 pcmonsters

pcmonsters
  • Topic Starter

  • Members
  • 21 posts
  • OFFLINE
  •  
  • Local time:04:57 AM

Posted 16 April 2009 - 11:16 AM

I don't understand this is all of the script that i have

am i missing something of the script

try the script out and see it your self the problem is the image is not showing when i go on the thumbnail
the picture is not showing on the right when i hoover on the thumbnail

i hope you can help me out

thanks

Edited by pcmonsters, 16 April 2009 - 07:04 PM.


#4 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:03:57 AM

Posted 16 April 2009 - 12:34 PM

When you hover over the one of the thumbnails, a javascript function is called. The name of the Javascript function is called showpic. What you have shown here is not a script. It is just CSS. The reason that nothing happens when you hover over the image is because you don't have the Javascript. Where did you get the code?

#5 pcmonsters

pcmonsters
  • Topic Starter

  • Members
  • 21 posts
  • OFFLINE
  •  
  • Local time:04:57 AM

Posted 16 April 2009 - 02:10 PM

I have this script from a website

but why is it not showing the image when i hoover over the thumbnail

cant this be fixed or what am i missing in this script

and thanks for the fast response groovicus i hope you can help me out with this

thanks

Edited by pcmonsters, 16 April 2009 - 07:04 PM.


#6 pcmonsters

pcmonsters
  • Topic Starter

  • Members
  • 21 posts
  • OFFLINE
  •  
  • Local time:04:57 AM

Posted 16 April 2009 - 02:13 PM

Is this script complete or is it still missing a piece or something like that

<!-- === Begin Frame === -->
<table class="mainframe" style="width: 100%;" cellspacing="0">
<tr>
<td class="mf_tl"></td>
<td class="mf_tm"></td>
<td class="mf_tr"></td>
</tr>
<tr>
<td class="mf_ml"></td>
<td class="mf_content" style="text-align: left; padding: 6px;">
<h1></h1><script type="text/javascript">
function showpic(tt_pic,tt_text) {
document.picbox.src = tt_pic;
document.getElementById('txtbox').innerHTML = tt_text;
}
</script>
<style type="text/css">
<!--
a:link .tenpic, a:visited .tenpic { width: 70px; height: 110px; padding: 0px; border: 0px solid silver; margin: 3px; background-color: black; }
-->
</style>
<div style="width: 660px; height: 230px; position: relative;">
<div style="width: 470px; float: left;">
<a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a><a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a><a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a><a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a><a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a><a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a><a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a><a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a><a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a><a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a><a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a><a href="http://imagecache2.allposters.com/images/15/MATRIX.jpg" onmouseover="showpic('http://imagecache2.allposters.com/images/15/MATRIX.jpg');"><img src="http://imagecache2.allposters.com/images/15/MATRIX.jpg" class="tenpic" title="The Matrix"
/></a></div><img name="picbox" style="max-width: 160px; max-height: 230px; position: absolute; right: 10px; top: 0px;" src=" ">
<td class="mf_mr"></td>
</tr>
<tr>
<td class="mf_bl"></td>
<td class="mf_bm"></td>
<td class="mf_br"></td>
</tr>
</table>
<!-- === End Frame === -->





is this a complete javascript or is there still something missing

Edited by pcmonsters, 16 April 2009 - 07:06 PM.


#7 Romeo29

Romeo29

    Learning To Bleep


  • Members
  • 3,194 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:127.0.0.1
  • Local time:04:57 AM

Posted 16 April 2009 - 03:41 PM

I observed following errors:

1. Change &lt;script type="text/javascript"> to <script type="text/javascript">
2. You are missing textbox the script is referring to. To resolve this, place
<textarea id=txtbox rows=3 cols=5></textarea>
in the HTML somewhere you want.

#8 pcmonsters

pcmonsters
  • Topic Starter

  • Members
  • 21 posts
  • OFFLINE
  •  
  • Local time:04:57 AM

Posted 16 April 2009 - 05:19 PM

The script is still not working well

after the changes from Romeo29 but anyway thanks for the help

im working on this problem for 4 days now

hope someone can help me out

thanks

Edited by pcmonsters, 16 April 2009 - 07:09 PM.


#9 Romeo29

Romeo29

    Learning To Bleep


  • Members
  • 3,194 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:127.0.0.1
  • Local time:04:57 AM

Posted 16 April 2009 - 11:38 PM

After modifying the code as I suggested, I tried it in IE. It works as it should.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users