Hello, I have a website project I am working on and when a user clicks a button I need to display a dialog box.
At the moment this is what I have.
<script type="text/javascript">
function LoginUser()
{
alert("You are not registered");
}
</script>
and within a form..
<input type="button" value ="Send" onclick="LoginUser()"/>
This works fine but how can I customize this window? How can I change the title?
Can anyone show me an example or point me to a good tutorial.
BlaqProduKt
Member
33 Points
43 Posts
Custom javascript dialog
Nov 14, 2012 09:12 PM|LINK
Hello, I have a website project I am working on and when a user clicks a button I need to display a dialog box.
At the moment this is what I have.
<script type="text/javascript"> function LoginUser() { alert("You are not registered"); } </script> and within a form.. <input type="button" value ="Send" onclick="LoginUser()"/> This works fine but how can I customize this window? How can I change the title? Can anyone show me an example or point me to a good tutorial.newbiefreak
Member
468 Points
214 Posts
Re: Custom javascript dialog
Nov 14, 2012 10:35 PM|LINK
hi,
you could use javascript confirm or prompt dialog box for this purpose for getting yes or no from user
here is a custom error dialog box http://www.scriptiny.com/2008/04/custom-javascript-dialog-boxes/
another example http://www.codeproject.com/Articles/17341/Custom-Javascript-Dialog-in-ASP-NET
have fun
ramiramilu
All-Star
95357 Points
14093 Posts
Re: Custom javascript dialog
Nov 15, 2012 08:30 AM|LINK
you cannot customize javascript alert box...instead you can use jquery or ajax modalpopups or dialogs...
http://jqueryui.com/dialog/
thanks,
JumpStart