Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alert function
Message
De
12/03/2003 11:10:37
 
 
Information générale
Forum:
Internet
Catégorie:
Javascript
Titre:
Divers
Thread ID:
00764480
Message ID:
00764859
Vues:
23
>>I've had a quick look at the source code of your page, the padding of the title should be with    rather than real spaces, it's treated as HTML & compacted down to a single space.
>
>Do we have replicate function analogue in JavaScript? Where can I find all JavaScript functions?
>
>Thanks.

I don't think there's a replicate function, I've looked for similar (eg pad) but can't find anything. You could pass spaces & then use the replace method.
function myalert( AlertTxt, AlertTitle )
{
var re=/ /g;
var DspHtml="about:<head><title>"+AlertTitle.replace( re, "&nbsp;" )+"</title></head>"
DspHtml=DspHtml+"<body><center>"+AlertTxt+"<br><button onclick='window.close()'>OK</button></center></body>"
showModalDialog( DspHtml, "", "dialogWidth:200px;dialogHeight:50px;status:0;help:0;resizable:no;scroll:no" )
}
Unfortunately, all my links to websites with the jscript functions are broken - I've now got copies myself so haven't kept them up to date. The only one I've is for Netscape & is fairly old, but for string functions/methods most apply to IE.
http://home.netscape.com/eng/mozilla/3.0/handbook/javascript/
Len Speed
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform