Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Changing the Font Size in an Alert box.
- From: javascript@xxxxxxxxxx (Trey H)
- Subject: [Javascript] Changing the Font Size in an Alert box.
- Date: Thu, 28 Mar 2002 03:56:33 +0000
I do not believe it is possible to change the font size in text boxes. I once did a large search on your same question and I could not find any answers. It is also not possible to make text bold, italic, or underlined in an alert box. I think that it is not possible because everyone has different default settings on their system for the text in alert boxes. ==================================== Trey: tutwabee@xxxxxxxxxxx JavaScripts at the Blue Dragon: http://www.websiter.biz ==================================== >From: "Steve" <extstarrfam@xxxxxxxxxxxxxxxx> >Reply-To: javascript@xxxxxxxxxx >To: <javascript@xxxxxxxxxx> >Subject: [Javascript] Changing the Font Size in an Alert box. >Date: Wed, 27 Mar 2002 01:42:39 -0600 > >I've tried a lot of thing so as to change the font size >of an Alert box and got some strange results but I did >not succeed. How do you change the font size of an >alert box? Here is the code I working on: ><head><title>Decimal to Binary</title> ><script language="JavaScript1.3" >TYPE="text/javascript"> ><!-- >// Declare Global variable >var iNumber = 0; >var Quot = 0; >var Remainder = 0; >var Result = 0; >var stringBinary = new String(); // Creating a string >object >function convertDecimal(iNumber) { > for(var i = 1; i <= 32; i++) { > //if (iNumber == 0) { //Use this to elimate extra >zeros > //break; > //} > Remainder = iNumber % 2; > // Exp: 1 = 9 % 2 > iNumber = (iNumber - Remainder) / 2; > // Exp: 4 = (9 - 1) / 2 > if(Remainder == 0) { > stringBinary = "0" + stringBinary; > // The new binary number is con- > // cantanated to the left side of the > // string. > } > if(Remainder == 1) { > stringBinary = "1" + stringBinary; > } > } // This closes the For...Next loop >} // This closes the function > >function processEntry(iNumber) { > iNumber = document.entryForm.numEntry.value > if(iNumber == 0) { > alert("A zero entry is not allow."); > } else { > convertDecimal(iNumber); // This passes the value of >x to iNumber > alert("The binary equivalent is: " + stringBinary); >// HERE IS THE ALERT BOX > } > >} >// --> ></script> ></head> ><body> ><form name="entryForm"> ><p>Enty a number no more than 5 digits in length: > <input type="text" name="numEntry" size="5" >maxlength="5" style="text-align: right;"> ><input type="submit" name="process" value="Process" >onClick="processEntry(iNumber)"></p> ></form> ></body> ></html> > >_______________________________________________ >Javascript mailing list >Javascript@xxxxxxxxxx >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Join the world?s largest e-mail service with MSN Hotmail. http://www.hotmail.com
- Follow-Ups:
- [Javascript] Q on wondow.focus()
- From: Walter Torres
- [Javascript] Q on wondow.focus()
- Prev by Date: [Javascript] Reading a Web Page
- Next by Date: [Javascript] question: get email stored in outlook express from the web
- Previous by thread: [Javascript] how do I do event.clientX in Netscape?
- Next by thread: [Javascript] Q on wondow.focus()
- Index(es):