thanks to bill and russell. i got another qs for u

Results 1 to 2 of 2

Thread: thanks to bill and russell. i got another qs for u

  1. #1
    Join Date
    Dec 1969

    Default thanks to bill and russell. i got another qs for u

    hey thanks bill and russell.<BR> i was a fool not to understand that i was using a server side script so unless someone plays around with the timer of the server side it wont make a diff to the client side.<BR>anyways suppose ive got a variable that stores seconds.<BR>for eg. lets say 3666 secs<BR>i need to convert this in hh:mm:ss.<BR>3666 secs would translate into 01:01:06.<BR>i need to do this in javascript. <BR>and ive got a weird problem . i need to fix this one too.<BR>whenever i use self.close and then try opening another window using<BR>my browser displays a message in a conform dialog box "the window u r trying to open is trying to close the current window. do u want to proceed?"<BR>i do not require this message. any sugesstions<BR>

  2. #2
    Join Date
    Dec 1969

    Default That's TWO questions... you will have to pay twice the usual amount.<BR><BR>&#060;grin/&#062;<BR><BR>(1) JS to convert seconds to HH:MM:SS<BR><BR>Not hard.<BR><BR>function HHMMSS( ticks )<BR>{<BR> var seconds = ticks % 60; // % is modulo operator<BR> ticks = ( ticks - seconds ) / 60;<BR> var minutes = ticks % 60;<BR> ticks = ( ticks - minutes ) / 60;<BR> var hours = ticks;<BR><BR> return ( ( hours &#060; 10 ) ? "0" + hours : "" + hours )<BR> + ":"<BR> ( ( minutes &#060; 10 ) ? "0" + minutes : minutes )<BR> + ":"<BR> ( ( seconds &#060; 10 ) ? "0" + seconds : seconds );<BR>}<BR><BR>How&#039;s that?<BR><BR>***************************<BR><BR>Ca n you show an example of the close/open problem???<BR><BR>self.close() should usually *NOT* give such a message.<BR><BR>But you have no control over whether the user gets the message or not. It&#039;s a browser security issue. You may just have to find a slightly different way to do things. <BR><BR>But again, show code.<BR><BR><BR>

Posting Permissions

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