Click to See Complete Forum and Search --> : How to specify a more functioning confirm method with different sizes characters?


webdeveloper
12-06-2002, 09:29 AM
Hi,

Confirm method displays massage with same size. I need to have a conrimation with some characters need of different sizes.
Does anyone have an example?


Thanks in advance,

Zach Elfers
12-06-2002, 09:35 AM
I have no idea what you are talking about. Try to give more information.

webdeveloper
12-06-2002, 10:11 AM
Ex:
In confirm("Message HI")

How to specify that the size of HI should be <H3>?

Thanks in advance,

gil davis
12-06-2002, 03:49 PM
The "confirm" and "prompt" methods do not support any HTML formatting.

You can use C++ symbols like "\n" for line feed, but that's the end of it.

If you require something cute or fancy, use a small window without menus, etc. and put whatever HTML you want in it.

My home page has an example of such a window. http://gil.davis.home.att.net/

webdeveloper
12-09-2002, 02:11 PM
Hi,
If I create a form with OK and Cancel buttons - I want the code in the Cancel button to also be called when the user clicks on the 'x' - the close button - on the form.
Where do I place cancel code?

Thanks in advance,

Zach Elfers
12-09-2002, 02:17 PM
<input type="button" value="Cancel" onClick="self.close();"> That will close the window.:)

webdeveloper
12-10-2002, 08:13 AM
Hi,

I am still reading JavaScript book.
On clicking the OK button i need it to go to specific url. On Cancel button and 'x', close button, I need to close this form as well as the internet browser. Here is te following I have so far not working. not sure if I need submit button since I only need to chck OK and Cancel, 'x', close, buttons:

<html>
<head>
<script language="JavaScript" type="text/javascript">
<!--
function close_window() {
window.opener = "fred";
window.close();
}
//-->
</head>

<body onLoad='document.formValidate.OK.focus()'>
<form name='formValidate'>
<table>
<tr>
<td><h3><b>Are you sure you want to continue?</b></h3></td>
</tr>
<tr>
<td>
<input type='button' value='OK' onClick="http://www.microsoft.com">
<input type='button' value='Cancel' onClick="close_window()">
</td>
</tr>
</table>
</form>
</body>
</html>

Thanks in advance,