Prompts and alerts are usually one lined. However, my prompt statement is rather long and does not fit on one line. With js alerts I use something like this...
<a href="javascrip t:alert('a'+'\n '+2+'\n'+'b');" >test</a>
but this doesn't seem to work with my prompt.
[HTML]<script>
function ask()
{
pass=prompt("Th is feature will be available to non-members until July 5th 2008. Enjoy the free surfing! abc123","");
if(pass=="abc12 3" && pass!=null)
{
alert("Correct password. Access granted")
}
else { alert("Incorrec t password. Access denied") window.location .href="http://shamtech.webs.c om/loginfailure.ht m"; }
}
window.onload=a sk
//stop-->
</script>[/HTML]
Please help!
<a href="javascrip t:alert('a'+'\n '+2+'\n'+'b');" >test</a>
but this doesn't seem to work with my prompt.
[HTML]<script>
function ask()
{
pass=prompt("Th is feature will be available to non-members until July 5th 2008. Enjoy the free surfing! abc123","");
if(pass=="abc12 3" && pass!=null)
{
alert("Correct password. Access granted")
}
else { alert("Incorrec t password. Access denied") window.location .href="http://shamtech.webs.c om/loginfailure.ht m"; }
}
window.onload=a sk
//stop-->
</script>[/HTML]
Please help!
Comment