[Javascript] Changing the Font Size in an Alert box.
Trey H
tutwabee at hotmail.com
Wed Mar 27 21:56:33 CST 2002
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 at hotmail.com
JavaScripts at the Blue Dragon:
http://www.websiter.biz
====================================
>From: "Steve" <extstarrfam at cox-internet.com>
>Reply-To: javascript at LaTech.edu
>To: <javascript at LaTech.edu>
>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 at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
More information about the Javascript
mailing list