View Full Version : Show the Slash "/"
06-11-2003, 11:51 AM
how to show the Slah ("/") on the alert pop up window??
i want the message show like this : "Please enter valid date with DD/MM/YYYY. "
06-11-2003, 01:59 PM
alert("Please enter valid date with DD/MM/YYYY. ");
06-11-2003, 04:16 PM
06-12-2003, 07:34 AM
i tried, but i still get error, i cant get what i want!!!
06-12-2003, 07:35 AM
What's the error? and post whatever code you've got so far, and how you called it.
06-12-2003, 08:18 AM
Maybe you have tried this but to use javscript specific characters you need to escape it with a backslash:
Therefore in you're case you would use the following:
alert("Please enter valid date with DD\/MM\/YYYY. ");
Hope this helps,
06-12-2003, 08:46 AM
There is no need to escape the / as a literal in an alert box.
alert ('That is not a valid date.\nPlease re-enter [MM/YY]. ');
Here the \n is escaped to make it a newline charcter, not a literal letter n, but you want a literal / (slash). I do not see why your original post does not work.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.