tinker Posted January 17, 2008 Share Posted January 17, 2008 Here's an example of a scroller demo: <html> <head> <script type="text/javascript"> var scroller_delay = 250; var scroller_pos = 0; var scroller_pre = escape(' '); //chr(160); var scroller_msg = scroller_pre + 'This is the message that needs to be told...'; function scroller() { ilen = scroller_msg.length; scroller_pos++; if (scroller_pos >= ilen) { scroller_pos = 0; } msg = scroller_msg.substring(scroller_pos, ilen); document.anchors['first'].innerHTML = msg; var t=setTimeout ('scroller()', scroller_delay); } </script> </head> <body onload="scroller();"> <br> <a name="first">First anchor</a><br> <br><br> </body> </html> What my problem is 'escape()' it show's as if it's url-encoded (%20), i've tried lot's of other way's including <pre>, chr(160), , etc all to no avail, how to do the spacey thing? Quote Link to comment Share on other sites More sharing options...
emehrkay Posted January 17, 2008 Share Posted January 17, 2008 why not use css? #class_definition{ margin: top left bottom right; //in px } Quote Link to comment Share on other sites More sharing options...
tinker Posted January 17, 2008 Author Share Posted January 17, 2008 because it's supposed to use js and html, so that doesn't solve the problem Quote Link to comment Share on other sites More sharing options...
tinker Posted January 18, 2008 Author Share Posted January 18, 2008 This is the little beauty which did it! var nbspace = String.fromCharCode(160); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.