Your Ad Here Your Ad Here
Results 1 to 7 of 7

Thread: help me

  1. #1
    plz i want put this text in form with timer
    the text will ve mouve
    thinks so much

  2. Internet, Programming and Graphics   -   #2
    Barbarossa's Avatar mostly harmless
    Join Date
    Jun 2002
    Location
    Over here!
    Posts
    19,631
    eh?

  3. Internet, Programming and Graphics   -   #3
    Snee's Avatar Error xɐʇuʎs BT Rep: +1
    Join Date
    Sep 2003
    Location
    on something.
    Age
    38
    Posts
    22,677
    I think he wants a .js wot makes text scroll.

    I'm mostly guessing, though.

    Code:
    <!doctype html public "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN">
    <html>
    	<head>
    		<title>Status Bar</title>
    		<script type="text/javascript" language="JavaScript">
    			
    			window.status = "Something's supposed to happen here.";
    			
    			var scrolltext = "";
    			var del1 = "";
    			var del2 = "";
    			var timerID;
    			var raknare = 0;
    			var scrollstatus = false;
    			
    		function scrolla()
    		{					
    			if (scrollstatus)
    			{
    				scrolltext = document.Formular.nyText.value;
    				del1 = scrolltext.substring(raknare, scrolltext.length) + " "; 
    				del2 = scrolltext.substring(0, raknare); 
    				window.status = del1 + del2;
    				(raknare < 0) ? raknare = scrolltext.length : raknare--;
    				timerID = setTimeout("scrolla()", 100);				 
    			}															
    		}															  
    		
    		
    		function startaScroll()
    		{
    			scrollstatus = true;
    			scrolla();
    		}
    		
    		function stoppaScroll()
    		{
    			clearTimeout(timerID);
    			scrollstatus = false;
    		}
    		
    		</script>
    	</head>
    	<body bgcolor="white">
    		<form action="#" name="Formular">
    			<input type="button" onclick="startaScroll();" value="Faster faster!"> 
    			<input type="text" name="nyText" size="100" value="Write some text you'd like to move, here. ">
    			<input type="button" onclick="stoppaScroll();" value="Stop"> 
    		</form>
    	</body>
    </html>
    Here's some old thing I wrote to scroll text in the status bar.

    Probably won't run in FF with default settings as FF tends to block that kind of thing, run it in ie to test it or stick the text in an input field, it should be easy enough.

    And no, I won't translate the variable names and that to english.

    here's how to do it in the other direction:

    Code:
    		function scrolla()
    		{
    			if (scrollstatus)
    			{
    				scrolltext = document.Formular.nyText.value;
    				del1 = scrolltext.substring(raknare, scrolltext.length) + " ";
    				del2 = scrolltext.substring(0, raknare);
    				window.status = del1 + del2;
    				(raknare > scrolltext.length) ? raknare = 0 : raknare++;
    				timerID = setTimeout("scrolla()", 100);
    			}
    		}
    In case the logic seems dodgy to you.

    EDit: or just use those crap marquee-tags, though they are a bit shit and not supported by the w3c-standard.
    Last edited by Snee; 03-31-2008 at 02:51 PM. Reason: Automerge-fail

  4. Internet, Programming and Graphics   -   #4
    tkinks so mutch
    Snee
    plz
    if u can exlpain with vb.net.
    i'm working with vb.net

  5. Internet, Programming and Graphics   -   #5
    i6q's Avatar Poster BT Rep: +22BT Rep +22BT Rep +22BT Rep +22BT Rep +22
    Join Date
    Mar 2008
    Location
    Bahrain
    Age
    30
    Posts
    222

  6. Internet, Programming and Graphics   -   #6
    Snee's Avatar Error xɐʇuʎs BT Rep: +1
    Join Date
    Sep 2003
    Location
    on something.
    Age
    38
    Posts
    22,677
    Quote Originally Posted by cheikhanio View Post
    tkinks so mutch
    Snee
    plz
    if u can exlpain with vb.net.
    i'm working with vb.net
    I'm sorry, I forgot to check up on this thread.

    If you are coding in asp.net using vb.net, you might be able to just use that .js almost as it is. If you need to import the text from a database that may be doable with scrolling text with that javascript via an input field set as runat="server".

    If you need to do the whole thing in VB-code, that's a bit trickier. Never had to do that, and VB's most certainly not my language of choice, so I'd rather not.

    Checking the internet, there are some variants people have written that may be of help.

    Here's one.

    Googling "vb.net scrolling text" turned a few things up.
    Last edited by Snee; 04-05-2008 at 02:26 AM.

  7. Internet, Programming and Graphics   -   #7
    ok thinks very mutch Snee

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •