BleepingComputer.com: thumbnail script

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.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

thumbnail script scripts

#1 User is offline   pcmonsters 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 21
  • Joined: 16-April 09

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 === -->

This post has been edited by pcmonsters: 16 April 2009 - 07:02 PM


#2 User is offline   groovicus 

  • Hail Groovicus!
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 9,522
  • Joined: 05-June 04
  • Gender:Male
  • Location:Centerville, SD

Posted 16 April 2009 - 09:54 AM

Can we see you showpic function?
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdom will come to you that way" - Christopher Hitchens

#3 User is offline   pcmonsters 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 21
  • Joined: 16-April 09

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

This post has been edited by pcmonsters: 16 April 2009 - 07:04 PM


#4 User is offline   groovicus 

  • Hail Groovicus!
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 9,522
  • Joined: 05-June 04
  • Gender:Male
  • Location:Centerville, SD

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?
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdom will come to you that way" - Christopher Hitchens

#5 User is offline   pcmonsters 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 21
  • Joined: 16-April 09

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

This post has been edited by pcmonsters: 16 April 2009 - 07:04 PM


#6 User is offline   pcmonsters 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 21
  • Joined: 16-April 09

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

This post has been edited by pcmonsters: 16 April 2009 - 07:06 PM


#7 User is offline   Romeo29 

  • Learning To Bleep
  • PipPipPipPipPipPip
  • Find Topics
  • Group: BC Advisor
  • Posts: 2,814
  • Joined: 06-July 08
  • Gender:Not Telling
  • Location:127.0.0.1

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.
[url="http://www.avast.com/"]avast! free antivirus[/url]

#8 User is offline   pcmonsters 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 21
  • Joined: 16-April 09

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

This post has been edited by pcmonsters: 16 April 2009 - 07:09 PM


#9 User is offline   Romeo29 

  • Learning To Bleep
  • PipPipPipPipPipPip
  • Find Topics
  • Group: BC Advisor
  • Posts: 2,814
  • Joined: 06-July 08
  • Gender:Not Telling
  • Location:127.0.0.1

Posted 16 April 2009 - 11:38 PM

After modifying the code as I suggested, I tried it in IE. It works as it should.
[url="http://www.avast.com/"]avast! free antivirus[/url]

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users