473,569 Members | 2,772 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

2 New Member
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 1488
Bill77
2 New Member
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 Recognized Expert Moderator MVP
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
4308
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 want to make first text as Table Heading/menu category. For examle in the given menu i want to make a heading as "Comp. Languages" which won't be a...
6
15882
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 a, then when I click/mouseover over the link 2, it turns to a color b and the link 1 turns to the normal link color again. (an so with the other...
7
3584
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> </head> <style type="text/css">
3
1431
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 buttons to my own web page.... It works, but when I run the page IE 6 gives me the active content warning. 'Internet Explorer has restricted this...
6
14683
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 using the Imagebutton.Attributes.Add("onMouseOver","this.src = 'somepicture.jpg') and that works fine. I've tried some java script to change the...
9
3321
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 visible to a client using a browser. My question is...can a knowledgeable browser user view Jscript source code in an asp file?
6
4854
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 the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still...
1
6301
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 TheMap1.jpg is now the default image not the TheMap.jpg. So after I click for information, and mouseOut of that area TheMap1.jpg will stay as all the...
1
1381
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. (The code is embarassingly un-elegant, please forgive a newbie!) Here's a URL: http://www.carlygaebe.com/pictures_polaroid_02.html#_self (all the...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7968
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6283
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.