Statusbar

free web hosting
Open Discussion > CONTRIBUTE > Computers > Programming Languages > HTML, XML etc..

Statusbar

gotcha41
I have a rather technical question about the statusbar :

Is it possible to alternate a flashing text with a 'passing-by' text? I have 2 codes that work perfect when they are separated, (I mean when they are not connected to each other) Can someone find a way to alternate the first one with the second? I'm not that familiar with html.. If my question isn't clear for you, just ask what you want to know smile.gif

Reply

Zenchi
It would be rather helpful of you to post the snippets of coding. smile.gif

Although, if this is done through javascript, I believe you could assign a variable count, something like..

CODE
if (variable1 = 0) {
First code thing here;
variable1 = 1;
}
if (variable1 = 1) {
Second code thing;
variable1 = 0;
}

Reply

gotcha41
Script for flashing text in the status bar :
CODE
var yourwords = "JavaScript World - http://chelsea.ios.com/~benny3/javascript/";

var speed = 150;

var control = 1;

function flash()

{

 if (control == 1)

   {

     window.status=yourwords;

     control=0;

   }  

 else

   {

     window.status="";

     control=1;

   }

 setTimeout("flash();",speed);

}

// -->

</script>

</HEAD>

<BODY BGCOLOR="#FFFFFF" onload="flash();">
The script causes the flashing text in your browser's
status bar.
<!-- END OF SCRIPT -->


script for 'passing-by' text:

CODE
<!-- START OF SCRIPT -->
<!-- For more scripts visit http://www.netpedia.com -->
<HTML><HEAD><title>Status Character Scroll</title>
<script LANGUAGE="JavaScript">

<!-- hide from old browsers

var init_msg = "JavaScript World."

var str = ""
var msg = ""
var leftmsg = ""


function setMessage()
{
   if (msg == "")
   {
       str = " "        
       msg = init_msg    
       leftmsg = ""      
   }
   
   if (str.length == 1)
   {
       
       while (msg.substring(0, 1) == " ")
       {
           leftmsg = leftmsg + str            
           str = msg.substring(0, 1)          
           msg = msg.substring(1, msg.length)
       }
       leftmsg = leftmsg + str            
       str = msg.substring(0, 1)          
       msg = msg.substring(1, msg.length)
       for (var ii = 0; ii < 120; ii++)
           {str = " " + str}          
                       }
   else
   {
       str = str.substring(10, str.length) // decrease str little by little
   }


   window.status = leftmsg + str
   JSCTimeOutID = window.setTimeout('setMessage()',100)
}

<!-- done hiding -->

</SCRIPT></HEAD>

<BODY bgcolor="ffffff"
onload="JSCTimeOutID = window.setTimeout('setMessage()',500);">


This script scrolls a message from right to left one
character at a time in your status bar.
<!-- END OF SCRIPT -->

 

 

 


Reply

arp
Hi;

probably the easiest way would be to add a wrapper function that you call from the body tag.
this wrapper function will then alternate between calling the two status bar functions:

function statusFunctions(){
for(var x=0; x<10; x++){
flash();
}
setMessage();
setTimeout("statusFunctions();",speed);
}

you will need however to fiddle with the flash function as it relies on recursion to do the actual flashing, and by doing as I mention above, you break this recursion...

good luck
- arp

Reply

Dawid
As always the forum has helped my site one step towards a masterpiece!!!

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Similar Topics

Keywords : statusbar


    Looking for statusbar

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for statusbar

*MORE FROM TRAP17.COM*
advertisement



Statusbar



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE