6arredja
01-20-2006, 06:39 AM
Ok i am trying to write a javascript function that will allow a user to type in an a srt file which is used for having subtitles show up in encoding an srt file consists of data such as:
1 //Order text is to appear this is first
00:00:57,500 --> 00:01:00,900 //Time that the text should appear during
En el mundo solo quedó un Clan //Text to appear
en un abrir y cerrar de ojos. //text to appear
//Blank space to mark new text entry
2 //order this appears 2nd
00:01:03,608 --> 00:01:07,700 //Time that text appears
Lucian, el más temido y despiadado lider //text to appear
que jamás hubo regido El Clan de Los Lycans...//text to appear
ok so what i need is to find out when im dealing with a number or text
so i just need to know what value is passed by something like this
var num;
var string="Hello";
num=parseInt(string);
if(num== // i want to check for null when string is text parseInt passes
//do this // not a number but some sort of null character or something
if(num) // what is it?
//do this
1 //Order text is to appear this is first
00:00:57,500 --> 00:01:00,900 //Time that the text should appear during
En el mundo solo quedó un Clan //Text to appear
en un abrir y cerrar de ojos. //text to appear
//Blank space to mark new text entry
2 //order this appears 2nd
00:01:03,608 --> 00:01:07,700 //Time that text appears
Lucian, el más temido y despiadado lider //text to appear
que jamás hubo regido El Clan de Los Lycans...//text to appear
ok so what i need is to find out when im dealing with a number or text
so i just need to know what value is passed by something like this
var num;
var string="Hello";
num=parseInt(string);
if(num== // i want to check for null when string is text parseInt passes
//do this // not a number but some sort of null character or something
if(num) // what is it?
//do this