473,320 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to make this code link from 12 images to other sites via mouseover not click??

2
Expand|Select|Wrap|Line Numbers
  1. <!--Force IE6 into quirks mode with this comment tag-->
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4.  
  5. <html>
  6.  
  7. <head>
  8.  
  9. <style type="text/css">
  10. a.img-border img, a.img-border:link img{border:12px solid #6040c0;}
  11. </style>
  12.  
  13. </head>
  14.  
  15. <body>
  16.  
  17. <script type="text/javascript" language="JavaScript1.2"> 
  18.  
  19. var sliderwidth=703
  20. var sliderheight=175
  21. var slidespeed=1
  22.  
  23. slidebgcolor= "tan "
  24.  
  25. var leftrightslide=new Array()
  26. var finalslide=''
  27.  
  28. //<a href="xx"onMouseOver="parent.location='http://www.webhome1.com/target="_blank">'">Move ywithout clicking!</a>
  29.  
  30. //<a href="xx"onMouseOver="parent.location='109_RandomBackgroundColor.html'">Move without clicking!</a>
  31.  
  32.  
  33. leftrightslide[0]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_1.jpg" >'  
  34.  
  35. leftrightslide[1]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_2.jpg" alt="">'  
  36.  
  37. leftrightslide[2]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_3.jpg" alt="">' 
  38.  
  39. leftrightslide[3]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_4.jpg" alt="">'  
  40.  
  41. leftrightslide[4]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_5.jpg" alt="">' 
  42.  
  43. leftrightslide[5]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_6.jpg" alt="">'  
  44.  
  45. leftrightslide[6]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_7.jpg" alt="">'  
  46.  
  47. leftrightslide[7]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_8.jpg" alt="">' 
  48.  
  49. leftrightslide[8]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_9.jpg" alt="">' 
  50.  
  51. leftrightslide[9]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_10.jpg" alt="">' 
  52.  
  53. leftrightslide[10]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_11.jpg" alt="">'  
  54.  
  55. leftrightslide[11]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_12.jpg" alt="">'  
  56.  
  57. leftrightslide[12]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_13.jpg" alt="">'  
  58.  
  59. leftrightslide[13]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_14.jpg" alt="">'  
  60.  
  61.  
  62. var copyspeed=slidespeed
  63. leftrightslide='<nobr>'+leftrightslide.join()+'</nobr>'
  64. var iedom=document.all||document.getElementById
  65. if (iedom)
  66. document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100;left:-600">'+leftrightslide+'</span>')
  67. var actualwidth=''
  68. var cross_slide, ns_slide
  69.  
  70. function fillup(){
  71. if (iedom){
  72. cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2
  73. cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3
  74. cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide
  75. actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth
  76. cross_slide2.style.left=actualwidth+20 }
  77.  
  78. else if (document.layers){
  79. ns_slide=document.ns_slidemenu.document.ns_slidemenu2
  80. ns_slide2=document.ns_slidemenu.document.ns_slidemenu3
  81. ns_slide.document.write(leftrightslide)
  82. ns_slide.document.close()
  83. actualwidth=ns_slide.document.width
  84. ns_slide2.left=actualwidth+20
  85. ns_slide2.document.write(leftrightslide)
  86. ns_slide2.document.close()}
  87.  
  88. lefttime=setInterval("slideleft()",30)}
  89.  
  90. window.onload=fillup
  91.  
  92. function slideleft(){
  93. if (iedom){
  94. if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8))
  95. cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed
  96. else
  97. cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+30
  98.  
  99. if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8))
  100. cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed
  101. else
  102. cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+30}
  103.  
  104. else if (document.layers){
  105. if (ns_slide.left>(actualwidth*(-1)+8))
  106. ns_slide.left-=copyspeed
  107. else
  108. ns_slide.left=ns_slide2.left+actualwidth+30
  109.  
  110. if (ns_slide2.left>(actualwidth*(-1)+8))
  111. ns_slide2.left-=copyspeed
  112. else
  113. ns_slide2.left=ns_slide.left+actualwidth+30}
  114. }
  115.  
  116. if (iedom||document.layers){
  117. with (document){
  118. document.write('<table width="600" border="0" cellspacing="0" cellpadding="0"><td>')
  119. if (iedom){
  120. write('<div style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">')
  121. write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';background-color:'+slidebgcolor+'" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">')
  122. write('<div id="test2" style="position:absolute;left:260;top:0"></div>')
  123. write('<div id="test3" style="position:absolute;left:-1000;top:0"></div>')
  124. write('</div></div>')}
  125.  
  126. else if (document.layers){
  127. write('<ilayer width='+sliderwidth+' height='+sliderheight+' name="ns_slidemenu" bgColor='+slidebgcolor+'>')
  128. write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
  129. write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
  130. write('</ilayer>')}
  131.  
  132. document.write('</td></table>')}
  133. }
  134. </script>
  135.  
  136. </body>
  137. </html>
Sep 17 '09 #1
2 1478
Bill77
2
Expand|Select|Wrap|Line Numbers
  1. <!--Force IE6 into quirks mode with this comment tag-->
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4.  
  5. <html>
  6.  
  7. <head>
  8.  
  9. <style type="text/css">
  10. a.img-border img, a.img-border:link img{border:12px solid #6040c0;}
  11. </style>
  12.  
  13. </head>
  14.  
  15. <body>
  16.  
  17. <script type="text/javascript" language="JavaScript1.2"> 
  18.  
  19. var sliderwidth=703
  20. var sliderheight=175
  21. var slidespeed=1
  22.  
  23. slidebgcolor= "tan "
  24.  
  25. var leftrightslide=new Array()
  26. var finalslide=''
  27.  
  28. //<a href="xx"onMouseOver="parent.location='http://www.webhome1.com/target="_blank">'">Move ywithout clicking!</a>
  29.  
  30. //<a href="xx"onMouseOver="parent.location='109_RandomBackgroundColor.html'">Move without clicking!</a>
  31.  
  32.  
  33. leftrightslide[0]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_1.jpg" >'  
  34.  
  35. leftrightslide[1]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_2.jpg" alt="">'  
  36.  
  37. leftrightslide[2]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_3.jpg" alt="">' 
  38.  
  39. leftrightslide[3]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_4.jpg" alt="">'  
  40.  
  41. leftrightslide[4]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_5.jpg" alt="">' 
  42.  
  43. leftrightslide[5]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_6.jpg" alt="">'  
  44.  
  45. leftrightslide[6]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_7.jpg" alt="">'  
  46.  
  47. leftrightslide[7]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_8.jpg" alt="">' 
  48.  
  49. leftrightslide[8]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_9.jpg" alt="">' 
  50.  
  51. leftrightslide[9]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_10.jpg" alt="">' 
  52.  
  53. leftrightslide[10]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_11.jpg" alt="">'  
  54.  
  55. leftrightslide[11]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_12.jpg" alt="">'  
  56.  
  57. leftrightslide[12]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_13.jpg" alt="">'  
  58.  
  59. leftrightslide[13]='<a href="http://www.bartleby.com/people/Cellini.html"; a href="#" class="img-border"><img src="picture_14.jpg" alt="">'  
  60.  
  61.  
  62. var copyspeed=slidespeed
  63. leftrightslide='<nobr>'+leftrightslide.join()+'</nobr>'
  64. var iedom=document.all||document.getElementById
  65. if (iedom)
  66. document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100;left:-600">'+leftrightslide+'</span>')
  67. var actualwidth=''
  68. var cross_slide, ns_slide
  69.  
  70. function fillup(){
  71. if (iedom){
  72. cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2
  73. cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3
  74. cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide
  75. actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth
  76. cross_slide2.style.left=actualwidth+20 }
  77.  
  78. else if (document.layers){
  79. ns_slide=document.ns_slidemenu.document.ns_slidemenu2
  80. ns_slide2=document.ns_slidemenu.document.ns_slidemenu3
  81. ns_slide.document.write(leftrightslide)
  82. ns_slide.document.close()
  83. actualwidth=ns_slide.document.width
  84. ns_slide2.left=actualwidth+20
  85. ns_slide2.document.write(leftrightslide)
  86. ns_slide2.document.close()}
  87.  
  88. lefttime=setInterval("slideleft()",30)}
  89.  
  90. window.onload=fillup
  91.  
  92. function slideleft(){
  93. if (iedom){
  94. if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8))
  95. cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed
  96. else
  97. cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+30
  98.  
  99. if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8))
  100. cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed
  101. else
  102. cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+30}
  103.  
  104. else if (document.layers){
  105. if (ns_slide.left>(actualwidth*(-1)+8))
  106. ns_slide.left-=copyspeed
  107. else
  108. ns_slide.left=ns_slide2.left+actualwidth+30
  109.  
  110. if (ns_slide2.left>(actualwidth*(-1)+8))
  111. ns_slide2.left-=copyspeed
  112. else
  113. ns_slide2.left=ns_slide.left+actualwidth+30}
  114. }
  115.  
  116. if (iedom||document.layers){
  117. with (document){
  118. document.write('<table width="600" border="0" cellspacing="0" cellpadding="0"><td>')
  119. if (iedom){
  120. write('<div style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">')
  121. write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';background-color:'+slidebgcolor+'" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">')
  122. write('<div id="test2" style="position:absolute;left:260;top:0"></div>')
  123. write('<div id="test3" style="position:absolute;left:-1000;top:0"></div>')
  124. write('</div></div>')}
  125.  
  126. else if (document.layers){
  127. write('<ilayer width='+sliderwidth+' height='+sliderheight+' name="ns_slidemenu" bgColor='+slidebgcolor+'>')
  128. write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
  129. write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
  130. write('</ilayer>')}
  131.  
  132. document.write('</td></table>')}
  133. }
  134. </script>
  135.  
  136. </body>
  137. </html>
Attached Images
     
Sep 17 '09 #2
acoder
16,027 Expert Mod 8TB
Did you write this yourself? If not, I would suggest that you get a more, modern version which does exactly what you require, or gives you the option to do so, or is easily configurable. The code you've posted is terribly out of date.
Sep 17 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: ajay | last post by:
I have following code for a slide menu but i twiked it to work for a single level menu. Open it in a Browser to get a clear picture. I have 2 Qs 1) How to make first entry as non-link. i.e i...
6
by: Carla | last post by:
hi people, I have a little problem that I can't solve with css and i was wondering if you could help me. I have 4 links, I want that when I click/mouseover in the link 1, it turns to a color...
7
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title>...
3
by: graeme_smith77 | last post by:
Hi all, very new to web design in general and Javacript in particular. I found.... http://www.peterkerr.freeserve.co.uk/mouseover/html.html and used the mouseover example to add some changing...
6
by: Selden McCabe | last post by:
I have a form with a bunch of image buttons. When the user moves the mouse over a button, I want to do two things: 1. change the Imagebutton's picture, and 2. make another control visible. I'm...
9
by: WRH | last post by:
Hello I am new to asp but I made some Jscript functions which work fine. The functions contain some strings used as a registration key for some apps. It is important that these strings not be...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
1
by: wkerplunk | last post by:
On mouseover it goes to the correct map say TheMap1.jpg and then on mouseOut it defaults back to map, I need to do a onClick that sets the TheMap1.jpg mouseOver to the default TheMap.jpg so the...
1
by: chadmathbiz | last post by:
Hello, and nice to meet all of you: My name's Chad, and I have a head-bashing problem. I built out a photo gallery with very specific mouseover/onclick etc. behaviors. It works fine in Firefox....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.