Closed Thread Icon

Preserved Topic: can't see what's wrong! (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=18304" title="Pages that link to Preserved Topic: can&amp;#039;t see what&amp;#039;s wrong! (Page 1 of 1)" rel="nofollow" >Preserved Topic: can&#039;t see what&#039;s wrong! <span class="small">(Page 1 of 1)</span>\

 
lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 08-30-2001 13:03
code:
<script language="JavaScript">
<!--
str = new String('filename.ext');
alert(str.replace('\.', '_'));
//-->
</script>



IE's output: filename_ext
NS's output: _ilename.ext

any ideas?! i just to replace the dot with an underscore.

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 08-30-2001 14:36

well, i did try this:

code:
str = new String('filename.ext');  
if (document.layers)
str = str.replace('\[b]\[/b].', '_')
else
str = str.replace('\.', '_');
alert(str);



but that can't be the correct way!?! even String.replace() must be crossbrowser compatible?!

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 08-30-2001 16:43

<script language="JavaScript">
<!--
str = new String('filename.ext');
alert(str.replace(/\./, '_'));
//-->
</script>

Enjoy!

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 08-31-2001 09:14

Thanks.

« BackwardsOnwards »

Show Forum Drop Down Menu