By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,516 Members | 1,126 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,516 IT Pros & Developers. It's quick & easy.

Customized Message Box that i can use

100+
P: 200
Good day, does anybody have a customized message box that i can use.

I have searched & read that one can't change the font or size of the default message box.

Does anyone have a customized message box where i can change the font
Ok button & info icon.

so that i can include in validation function

if not then i will use the Div option of displaying message


Regards
Jan 18 '10 #1

✓ answered by acoder

Here's one example that you can alter to your requirements.

Share this Question
Share on Google+
4 Replies


acoder
Expert Mod 15k+
P: 16,027
Here's one example that you can alter to your requirements.
Jan 18 '10 #2

100+
P: 200
Thank You - got me going
Jan 18 '10 #3

P: 16
Here is another.

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  3. <head>
  4. <title>Forms</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <link rel="stylesheet" type="text/css" href="styles/style.css" media="screen" title="style (screen)" />
  7. <script>
  8. function preview() {
  9.    var myvar = "Name=" + document.getElementById("first_and_last_name").value;
  10.    myvar += '<br />Birthday=' + document.getElementById("birthday").value;
  11.    myvar += '<br /><p>Submit Information?</p>';
  12.    //myvar += '<br /><input type="button" value="yes" id="yesbutton" onClick="window.opener.document.child_form.submit()" />';
  13.    myvar += ' <input type="button" value=" yes " id="yesbutton" onClick="window.opener.document.getElementById(\'mybox\').value=\'Hello World!\';window.close()" />';
  14.    //myvar += ' <input type="button" value=" Print " id="nobutton" onClick="window.print();window.close()" />';   
  15.    myvar += ' <input type="button" value=" no " id="nobutton" onClick="window.close()" />';
  16.    my_window= window.open ("","mywindow1","status=1,width=450,height=350");
  17.    my_window.document.write(myvar); 
  18. }
  19. </script>
  20. </head>
  21. <body>
  22. <div id="wrap"> 
  23.     <form class="darker" name="child_form" id="child_form" method="post" action="_lib/phpmailer-fe.php" enctype="multipart/form-data">
  24.         Name:<br />    
  25.         <input name="First_and_last_name" id="first_and_last_name" type="text" value="First and Last Name" /><br /><br />
  26.         Birtdhay:<br />
  27.         <input name="Birthday" id="birthday" type="text" value="Month and day of birthday" /><br /><br />
  28.         Message from popup:<br />
  29.         <input type="text" id="mybox" name="mybox" value="" /><br /><br />
  30.         <input type="button" onclick="preview()" value="Preview" />
  31.     </form>
  32. </div>
  33. </body>
  34. </html>
  35.  
  36.  
  37.  
Jan 19 '10 #4

acoder
Expert Mod 15k+
P: 16,027
Hmm... that opens a new window. Not quite what would be as useful in most cases.
Jan 31 '10 #5

Post your reply

Sign in to post your reply or Sign up for a free account.