JavaScript - Location.href Not Working In Ff, Chrome
This little snippet of code (in full) refuses to lnk properly in FF and Chrome, but IE downloads the file.
Code: <tr> <td nowrap> <span style="font-weight: 700; font-size: 11px; background-color: #FFFF00" onclick="location.href ('http://aapress.com.au/print/headerfooteron.reg')" class="hand" onmouseover="this.style.textDecoration='underline'" onmouseout="this.style.textDecoration='none'" style="font-size: 11px; font-weight: 700; background-color:#FFFF00;"> CLICK HERE</span><font size="2"> to turn </font> <span class="hand"> <span style="font-weight: 700; font-size: 11px; background-color: #FFFF00"> ON</span></span></td> <td nowrap width="100"> </td> </tr> Is there something wrong with using location.href? Similar TutorialsCode: <script language="JavaScript" type="text/javascript"> function confirmDelete(url){ var decision = confirm("Click OK to delete this post."); if(decision == true){ window.location = url; } } </script> <!--HTML LATER ON --> <a onclick="confirmDelete('deletePost.php?id=17')" href=''><img src='delete.png' alt='' title='Delete this post' /></a> I get absolutely nothing out of this. The confirm box pops up, but a the URL never changes when I click OK. I have no clue what's going wrong here. I'm using Google Chrome to test this out if that helps. Also does not work in Firefox. Hi, I'm using the following Javascript code to show a div layer depending on the URL Code: <script type="text/javascript"> if (location.href.match(/folder/)) { document.getElementById("div-layer").style.display="block"; } </script> This works perfectly when I visit http://www.domain.com/folder but I do not want it to match any subfolders beneath /folder, for example: http://www.domain.com/folder/sub-folder http://www.domain.com/folder/sub-folder2 etc. Does anyone know how I can modify the code to only match /folder or /folder/ and no subfolders beneath it? Thank you in advance. Ok I have tried and tried and cannot get this code to work in safari or google chrome. Basically I am working on a shopping cart. The user will click the paypal pay now button. The form is submitted to paypal via a new window target="_blank" I also need to refresh the current page. This will write shopping cart data to DB via php upon page refresh. Safari and google Chrome will open the paypal window, but seems to ignore the javascript to refresh the browser. FF and IE both work fine. Code: <script LANGUAGE="JavaScript"> function newPage() { self.location.href=\'https://www.artists2you.com/s/orderconfirm.php?ordernumber='.$_SESSION['ordernumber'].'\'; } </script> Code: <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_blank"" onSubmit=\'newPage()\'> Can someone see a difference between: <input type="submit" name="Submit" value="Start" onClick="javascript:location.href='Poll_Jan2010_01.html'"> and: <input type="submit" name="Submit" value="Next >" onClick="javascript:location.href='Poll_Jan2010_02.html'"> ??? Because the first works, but the second doesnt :/ All i wanna do is move on to the next page by clicking a submit button. From the first page it moves to second correctly. After that, it only refreshes the page and doesnt move on... every time i try something it doesn't work for me god why is this javascript so hard to make it work... anyway, i just followed the guidelines to pass values from one page to another using ? and it simply, like always, DOES NOT work Code: <HEAD> ... ... <script type="text/javascript"> <!-- function sendme(){ if (document.form1.question[0].checked == true) { whichone = 1; } if (document.form1.question[1].checked == true) { whichone = 2; } if (document.form1.question[2].checked == true) { whichone = 3; } if (document.form1.question[3].checked == true) { whichone = 4; } if (document.form1.question[4].checked == true) { whichone = 5; } if (document.form1.question[5].checked == true) { whichone = 6; } if (document.form1.question[6].checked == true) { whichone = 7; } if (document.form1.question[7].checked == true) { whichone = 8; } myString = qst1 + "=" + whichone; location.href = "Poll_Jan2010_02.html" + '?' + myString; } //--> </script> </head> <body> <div align="center"> <p><img src="63/images/poll_logo.jpg" width="655" height="92"> </p> <p> </p> <h2><u>Question 1</u></h2> <p><strong>Bla bla bla bla...</strong></p> <form name="form1"> <table width="60%" border="0"> <tr> <td><input name="question" type="radio" value="Grill"> option 1</td> </tr> <tr> <td><input name="question" type="radio" value="Club"> option 2</td> </tr> <tr> <td><input name="question" type="radio" value="Crepes"> option 3</td> </tr> <tr> <td><input name="question" type="radio" value="Sandwiches"> option 4</td> </tr> <tr> <td><input name="question" type="radio" value="Hotdog"> option 5</td> </tr> <tr> <td><input name="question" type="radio" value="Special"> option 6</td> </tr> <tr> <td><input name="question" type="radio" value="Refreshments"> option 7</td> </tr> <tr> <td><input name="question" type="radio" value="Salads"> option 8</td> </tr> </table> </form> <p> <a href="#null" class="style2" onclick="sendme();">Continue ></a> </p> </div> </body> I guess this is an easy question for all javascripters but I don't know how to manage (I'm pretty fresh with JS). I found two solutions on this forum but it seems that they don't work(?). I want to delay for few seconds window.location.href="destination_site.html" before it will automatically take visitor to destination site. It has something to do with setTimeout but I would be greatful for posting a fixed code. Thanks in advance. I know next to nothing about javascript and I don't even know if this is possible. I need to target window.location.href to an iframe on a different page. So, right now, the piece of the code that redirects the browser looks like this: Code: window.location.href='http://www.somewhere.com/'; Works great, brings it up in the same browser window. So now I need to modify the code so it goes to a different page and brings that page up in a specified iframe. I hope this makes sense. I really need help. And if it is not possible, I just need to know to abandon all hope. hi, have a series of 2 pages. The first is a drop down select box that gathers the state name. Onclick we are using a window.open to open a page with a list of cities for that state. Again using a drop down select box to select the city and then, onclick, we send the user off to the appropriate page based on state/city selection while at the same time updating the 1st (parent) page with a new location.href. Problem is that instead of updating the parent page, it updates the page with the list of cities (the child page). On the first page script we generate the following warning: Warning: XUL box for _moz_generated_content_after element contained an inline #text child, forcing all its children to be wrapped in a block. Source File: chrome://browser/content/browser.xul Line: 0 First page is not generated via javascript but standard html. This happens both locally and when pages are moved to the server (Apache). First page script is as follows Code: <HTML> <HEAD> <TITLE>J1</TITLE> <SCRIPT LANGUAGE="JavaScript"> function StateSelect (form) { Item = form.state.selectedIndex; Result = form.state.options[Item].value; window.open('j2.htm?value='+ Result,'myWindow','resizeable=no,resizeable=0,scrollbars=no,scrollbars=0,location=no,location=0,toolbar=no,toolbar=0,directories=no,directories=0,menubar=no,menubar=0,status=no,status=0,copyhistory=no,copyhistory=0,width=300,height=100,left=300,top=300,screenX=300,screenY=300') } </SCRIPT> </HEAD> 2nd page (where user selects city) code is as follows: Code: <SCRIPT LANGUAGE="JavaScript"> function CitySelect (form) { Item = form.city.selectedIndex; city = form.city.options[Item].value; state = document.myform.state.value; window.open('j3.htm','mywindow3') setTimeout("Func1()",3000); } function Func1() { parent.location.href='j4.htm?st='+ state + '&city=' + city,'mywinow2'; } </SCRIPT> Ideas on why and what the error (actually a warning) is trying to tell us? Thank you all! Jim Since the upgrade from chrome 9 to chrome 10 my script is showing an error in my variables when i use boolean expressions. they changed to version V8, Chrome's JavaScript engine. Here is the function function get_form_value(n){ e=document.getElementById(n); if ((e.value)&&(e.value != "")&&(!e.options)) return e.value; if ((e.selectedIndex)&&(e.selectedIndex>0) &&(e.options[e.selectedIndex].value !="")) return e.options[e.selectedIndex].value; // select if ((e.text)&&(e.text.value !="")) continue; if ((e.selectedIndex)&&(e.selectedIndex>0) &&(e.options[e.selectedIndex].text !="")) return e.options[e.selectedIndex].text; // select if ((e.checkbox)&&(e.checkbox.checked)) return true; return false; } When i run it it shows a syntax error: Can someone please help me fix this? Hello, I'm pretty sure this is a Javascript issue, despite the subject line of this message. I'm using Javascript to create a popup window on my site. Users click on the link and get a popup with supplemental information about the item they clicked on. Works great. The html link to open the popup looks like this: Code: <a href="javascript:popup(xMoreInfo_popup)" onMouseOut="clearEl();">Click HERE for more information</a> ...where "xMoreInfo_popup" is a variable that tells the "popup" function which information (html code) to display. This then connects to a Javascript function that looks like this: Code: var popupWin var wholeWin function popup(term) // write corresponding content to the popup window { popupWin = window.open("", "puWin", "width=800,height=620,scrollBars,dependent,resizable"); popupWin.document.write(htmlOpener); popupWin.document.write(term); popupWin.document.write(htmlCloser); popupWin.document.close(); // close layout stream popupWin.focus(); // bring the popup window to the front } As I said, this popup function works great, in both IE and Firefox. I've been using it for years. Recently, though, there has been so much information in the popup window that I decided to break it up into two catagories. Let's call them "MAIN" and "SUPPLEMENT". I first display the MAIN information and directly below that is the SUPPLEMENTAL information. I want my users be be able to directly navigate down to the SUPPLEMENTAL information without scrolling, so I added an "href name tag" into the html code that is displayed. The html looks like this (shortened for brevity): Code: HEADER INFORMATION<br> <a href="#supplemental">GO TO SUPPLEMENTAL</a><br> MAIN INFORMATION IS DISPLAYED HERE AND IT MAY BE QUITE LARGE <a id="supplemental"></a> SUPPLEMENTAL INFORMATION HERE Now to my problem. This works as expected and just perfectly in IE. If the user clicks on the GO TO SUPPLEMENTAL link, it autoscrolls down to the supplemental information. In Firefox, however, it behaves quite oddly. Instead, when the link is clicked, the popup window displays the html from the original parent, rather than the information in the popup window! Now I can click on the original "parent window" link in the popup window, then it shows the popup information again in the same popup window, but autoscrolled to the proper place this time. I'm pretty sure this is a Javascript problem because something about the way I'm opening the popup window is causing the named tag to want to go back to the parent window, rather than the current popup window. Any advise is greatly appreciated. Robert San Antonio, Texas I have a page that loads various "applications" into an iframe inside the main page. One of the applications loaded calls a javascript function that is loaded with the "application" page. It works great in Safari, Chrome & Firefox but error's out in IE8 - "Object doesn't support this action". Anyone know why ? Have other calls that work but this one is the only one that uses href Thanks, JerryB [CODE] <div id = 'trainingsubmitbutton' style='display:none;'><a href='javascript: submitdata(0)'>Submit This Record</a></div> [CODE] Hi guys, I have the following code that should hide the dropdown part of a select box when clicked (don't ask why, this is part of a separate project). Please see a simple example below: Code: <script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.js"></script> <select name="select1" id="select1" onfocus="$(this).blur();"> <option value=""></option> <option value="">1</option> <option value="">2</option> <option value="">3</option> <option value="">4</option> </select> This all works fine in IE and FF but in chrome the options are still shown after clicking the element. I've been racking my brains for hours on this and, no matter what method I use, I can't get this to work correctly in Chrome. Can anyone suggest a way I can get this to work? Thanks in advance! Hello all I have this code to write the year which works fine in ie ff but apparantly is not working in google chrome. I don't have chrome and so can't check can anybody tell me why chrome has an issue with it? What should I change to make it chrome compliant:-) In ie ff it displays 2012 correctly but in chrome i'm told it is showing 112 ro something like that. Code: Code: any help very much appreciated LT Title explains it really. The button I am using working perfecting in FireFox and Chrome but not in Internet explorer. (Yes I know someone that actually uses IE that pointed this out to me) The rest of the code works fine but just not the reset button I have. Something I have been needing to do is make the code call my images differently by putting them in an array so I don't mess this the sources of my images like I sloppily am here, but I am not sure if that will actually fix the problem I am have. The checkbox should both uncheck the box(if checked) AND change the picture but it only unchecks the box. Here is the relevant code let me know if you want me to post the whole thing. Code: function reset(){ cb1.checked=false; document.goodAfternoon.src=goodAfternoonFinal.src; } Code: "Check" me out;) <input type="checkbox" id="cb1" onClick="validate()" /> <img src="Good Afternoon.gif" name="goodAfternoon"> <input type="button" id="cb2" value="RESET" onClick="reset()"/> I have an "animated slideshow" of 29 jpeg images on a page created using Javascript. It works fine in Internet Explorer and Firefox but not Safari or Chrome. The jpeg files names are 01.jpg through to 29.jpg. Here below is the code in the header and the body. There is an error in there somewhe <html> <head> <title>My webpage</title> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> <SCRIPT language="JavaScript" type="text/JavaScript"> <!-- var speed=1333; var counter = 1; function rollPics() { document.display.src=counter+".jpg"; //Display image "counter".jpg counter ++; // Add 1 to counter if (counter>29) { // If counter is greater than 29 images then reset it counter=1 } } <!-- END --> </SCRIPT> </head> <body> <center> <table> <tr><td> <IMG NAME="display" SRC="1.jpg" onLoad="setTimeout('rollPics()',1333)"> </td></tr> </table> </center> </body> </html> Hi, I have a small script that tries to open a child window. if successful, it then closes the child window and redirects the parent window. If this process fails, there is no child window, no redirection. the script below works fine in FireFox but in Chrome, if the process fails, the redirection still happens. I'm new to JS would appreciate your help many thanks Code: <script type="text/javascript"> function openwindow(){ testWindow = window.open("popup.php","interaction"); setTimeout(function() { testWindow.close(); },1000); setTimeout(function() { window.location = "http://www.google.com"; },1000); } </script> Hi, I was wondering if anyone could help me out with a script I'm trying to create/customize. The idea is to scroll an image by dragging of the mouse (like you have with Google maps for example), instead of the scrollbars. Right now I'm using a script that does the job perfectly fine under IE, but not so much under FireFox, and definitely not under Chrome. Some additional code is probably needed but I have no clue how to write proper JavaScript. Everything I try gives errors and leaves me baffled. Here's a hands-on example of what I mean (works only under IE!): http://home.wanadoo.nl/r.a.dekk/kaart/kaart.html This is the script I'm using now: Quote: <!-- <script type="text/javascript"> document.onmousedown = function(){ var e=arguments[0]||event; var x=document.body.scrollLeft+e.clientX; var y=document.body.scrollTop+e.clientY; document.onmousemove=function(){ scroll(x-e.clientX, y-e.clientY); return false; } document.onmouseup=function(){ document.onmousemove=null; } return false; } </script> //--> Any help will be appreciated. Thanks. I am ripping my hair out trying to figure out why my innerHTML code is not working. It only works in IE, but keeps failing in Chrome and Firefox. I am using a form text field for customers to enter a Gallery ID (text value in the form field) which I have set up for them in an external js file. I use this code to change the content of div's after it checks the js file for a matching text value. Here is what is happening-- the proper content shows up for a second in Chrome or Firefox if the username value matches, but it pops away really fast and goes back to the login field prompt. Javascript: Code: <head> <script type="text/javascript"> function setinitialvalues(){ document.getElementById('loginblock').style.visibility = 'visible'; document.getElementById('galleryinfo2').style.visibility = 'hidden'; document.getElementById('expiredmessage').style.visibility = 'hidden'; document.getElementById('republish').style.visibility = 'hidden'; document.getElementById('logoutmessage').innerHTML = ""; document.getElementById('logoutmessage2').innerHTML = ""; document.getElementById('logoutmessage').style.visibility = 'hidden'; document.getElementById('logoutmessage2').style.visibility = 'hidden'; } </script> <script type="text/javascript"> function loadcustomer(){ document.getElementById('galleryinfo').innerHTML = ""; document.getElementById('galleryinfo2').innerHTML = ""; document.getElementById('expdatemessage').innerHTML = ""; document.getElementById('expiredmessage').innerHTML = ""; document.getElementById('republish').innerHTML = ""; document.getElementById('logoutmessage').style.visibility = 'hidden'; document.getElementById('logoutmessage2').style.visibility = 'hidden'; document.getElementById('loginblock').innerHTML = "<br /><h4>If you know your Gallery ID, you can enter it here to access your proofing gallery and order page.<br /><br />ENTER GALLERY ID:</h4><form name='form' action='' method='post'><input style='color:#000;' name='username' id='username' onfocus='clearinvalid()' onKeyDown='clearinvalid()'><br /><br /><input style='background-color:#33A1C9;' class='button' id='submitbutton' type='submit' value='Submit' onClick='return galleryid(this.form)'></form><h4><div style='color:#ff0000;' id='invalidmessage'></div></h4><br />Sample Gallery ID: demo<br />(Then click the Submit button. Some browsers do not accept the Enter key.)<br /><br /><a href='#' class='btn btn-lg btn-default'>Back to Menu</a><br /><br />This works on Internet Explorer, Firefox, Opera and Google Chrome. Please use one of these web browsers to log in."; document.getElementById('loginblock').style.visibility = 'visible'; } </script> <script language="javascript" type="text/javascript" src="customergallery.js"></script> </head> HTML: Code: <div style="text-align:center;" id="loginblock"></div> <div id="galleryinfo"></div> <div id="galleryinfo2"></div> <div style="color:#ff0000;" id="expdatemessage"></div> <div style="color:#ff0000;" id="expiredmessage"></div> <div id="republish"></div> <div id="logoutmessage"></div> <div id="logoutmessage2"></div> External customer js file: Code: function Submit(){ if(event.keyCode == 13) { galleryid(); return false; } } function galleryid(){ if (document.getElementById('username').value == 'demo') { var name = "My Photomatic Photo Session"; var sessiondate = "02/22/2014"; var location = "Any town, USA"; var orderlink = "<a href='../../accounts/brown/20140222/myphotomatic20140222.html' target='_blank'>CLICK HERE TO VIEW GALLERY</a>"; var todayDate = new Date(); var expdate = new Date(2015,05,30); comparedate(); } else if (document.getElementById('username').value == '') { document.getElementById('invalidmessage').innerHTML = 'Please enter a value in this field.'; } else { document.getElementById('invalidmessage').innerHTML = 'Invalid Gallery ID. Please try again.'; } document.getElementById('username').value = ""; return false; function comparedate() { if (todayDate >= expdate) { document.getElementById('galleryinfo2').innerHTML = "<br /><br />" + name + "<br />Session Date: " + sessiondate + "<br />" + location + "<br /><br />"; document.getElementById('expiredmessage').innerHTML = "This gallery has expired on " + (expdate.getMonth()+1) + "/" + expdate.getDate() + "/" + expdate.getFullYear(); document.getElementById('republish').innerHTML = "<br />If you would like to have this gallery republished, please email me .<br /><br />"; document.getElementById('logoutmessage2').innerHTML = "<a href='javascript:void(0);' onclick='loadcustomer(); clearusername(); setinitialvalues();' class='btn btn-lg btn-default'>Click here to return to the Login</a><br /><br />"; document.getElementById('galleryinfo2').style.visibility = 'visible'; document.getElementById('expiredmessage').style.visibility = 'visible'; document.getElementById('republish').style.visibility = 'visible'; document.getElementById('logoutmessage2').style.visibility = 'visible'; document.getElementById('loginblock').innerHTML = ""; document.getElementById('loginblock').style.visibility = 'hidden'; } else { loadcustomer(); document.getElementById('galleryinfo').innerHTML = "<br /><br />" + name + "<br />Session Date: " + sessiondate + "<br />" + location + "<br /><br />" + orderlink + "<br /><br />"; document.getElementById('expdatemessage').innerHTML = "This gallery will expire on " + (expdate.getMonth()+1) + "/" + expdate.getDate() + "/" + expdate.getFullYear() + ".<br /><br />"; document.getElementById('logoutmessage').innerHTML = "<a href='javascript:void(0);' onclick='loadcustomer(); clearusername(); setinitialvalues();' class='btn btn-lg btn-default'>Click here to return to the Login</a><br /><br />"; document.getElementById('logoutmessage').style.visibility = 'visible'; document.getElementById('loginblock').innerHTML = ""; document.getElementById('loginblock').style.visibility = 'hidden'; } } } function clearinvalid(){ document.getElementById('invalidmessage').innerHTML = ''; } function clearusername(){ document.getElementById('username').value = ""; } Where am I going wrong and what can I do to make this work in Chrome and Firefox? It works great in IE. Thanks! Hi, I'm new to this forum so please forgive me on any errors I may have made. I am working on a simple site for the company that I work for that allows a customer to input a 5 digit code in and returns what prize they have won. I found some code on a website which done the trick but it doesn't work in Chrome and Safari. My Javascript knowledge is extremely limited but I think I've narrowed it down to the "document.implentation.createDocument" line although the few fixes I've found, I can't get to work. Here is the code I have at the moment before I applied the fixes (this works in FF and IE). Code: <script type="text/javascript"> window.onload = loadIndex; function loadIndex() { // load indexfile // most current browsers support document.implementation if (document.implementation && document.implementation.createDocument) { xmlDoc = document.implementation.createDocument("", "", null); xmlDoc.load("results.xml"); } // MSIE uses ActiveX { xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async = "false"; xmlDoc.load("results.xml"); } } function searchIndex() { // search the index (duh!) if (!xmlDoc) { loadIndex(); } // get the search term from a form field with id 'searchme' var searchterm = document.getElementById("searchme").value; var allitems = xmlDoc.getElementsByTagName('item'); results = new Array; if (searchterm.length < 4) { alert("Please re-check and enter your 5 digit code"); } else { for (var i=0;i<allitems.length;i++) { // see if the XML entry matches the search term, // and (if so) store it in an array var name = allitems[i].lastChild.nodeValue; var exp = new RegExp(searchterm,"i"); if ( name.match(exp) != null) { results.push(allitems[i]); } } // send the results to another function that displays them to the user showResults(results, searchterm); } } // Write search results to a table function showResults(results, searchterm) { if (results.length > 0) { // if there are any results, write them to a table document.write('<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title><link href="cno-competition.css" rel="stylesheet" type="text/css" /></head><body>'); document.write('<div id="container"><div id="logo"></div><div id="prizeContent"><img src="media/new-york.jpg" width="750" height="500" alt="New York" />'); for(var i=0; i<results.length; i++) { document.write('<h1>Congratulations</h1><p>You entered prize code <b><i>'+searchterm+'</i></b> and have won a <span style="font-weight:bold; color:#75ACC1">' + results[i].getAttribute("prize") + '</span>.</p>'); } document.write('<p>To claim your prize please contact the Complete Night Out team on 01908 544445.</p>'); document.write('</div></div></body></html>'); document.close(); } else { // else tell the user no matches were found var notfound = alert('No results found for '+searchterm+'! Please re-check and enter your 5 digit code'); } } </script> The fix I found added the below into the code but I couldn't get it to work using this. Link here. Code: var xmlhttp = new window.XMLHttpRequest(); xmlhttp.open("GET","results.xml",false); xmlhttp.send(null); xmlDoc = xmlhttp.responseXML.documentElement; Any help would be much appreciated. If you would like to see the site live please click here Thank you. Kishan Hello, I have used a free javascript from javascriptkit.com for a "highlighter scroller" in my site. But the programe is only working in Internet explorer. When i use Mozila or google chrome, it is not appearing/working. Can anyone suggest me that how it will work in other browser also. here is the code that i used: Code: <div style="position:relative;left:0px;top:0px"> <span id="highlighter" style="position:absolute;left:0;top:0;font-size:15px;font-family:Calibri;background-color:lime;clip:rect(0px 0px auto 0px)"></span> </div> <script type="text/javascript"> /* Highligher Scroller script- By JavaScript Kit For this and over 400+ free scripts, visit http://www.javascriptkit.com/ This notice must stay intact */ var tickercontents=new Array() tickercontents[0]='<a href="ln.htm">IJSG Welcomes the Kingdom of Morocco as its new Member</a>' var tickdelay=3000 //delay btw messages var highlightspeed=10 //10 pixels at a time. ////Do not edit pass this line//////////////// var currentmessage=0 var clipwidth=0 function changetickercontent(){ crosstick.style.clip="rect(0px 0px auto 0px)" crosstick.innerHTML=tickercontents[currentmessage] highlightmsg() } function highlightmsg(){ var msgwidth=crosstick.offsetWidth if (clipwidth<msgwidth){ clipwidth+=highlightspeed crosstick.style.clip="rect(0px "+clipwidth+"px auto 0px)" beginclip=setTimeout("highlightmsg()",20) } else{ clipwidth=0 clearTimeout(beginclip) if (currentmessage==tickercontents.length-1) currentmessage=0 else currentmessage++ setTimeout("changetickercontent()",tickdelay) } } function start_ticking(){ crosstick=document.getElementById? document.getElementById("highlighter") : document.all.highlighter crosstickParent=crosstick.parentNode? crosstick.parentNode : crosstick.parentElement if (parseInt(crosstick.offsetHeight)>0) crosstickParent.style.height=crosstick.offsetHeight+'px' else setTimeout("crosstickParent.style.height=crosstick.offsetHeight+'px'",100) //delay for Mozilla's sake changetickercontent() } if (document.all || document.getElementById) </script></td> Inside body I have used <body onload="populate();start_ticking()"> for multiple script in a page. Thank you in advance. Regards, Nazmul Karim Khan |