Okay, so I have a code scripted in Javascript which prompts a password prompt. In the "if" section, i wanted to make a php function which will then act on a "for" value. However, now in the php (which in turn is in the Javascript) I have to make another Javascript command (so I can send a "for" value).. But I do not know how I would do that.
The script would look something like this:
<html>
<head>
<script type="text/javascript">
<!--
pass=prompt("type in the password","password here");
if (pass==123)
{
<?php
MyFunction ()
{
Here is where I want to insert the Javascript command of a "for" then an alert.. like this: var 1="angel"; var 2="Josh"; var 3="John"; for (x=1,x=<3,x++) {alert ("hey," + x + "!")}
}
MyFunction;
MyFunction;
?> }
else
{
alert("password is incorrect");
}
//-->
</script>
</head>
<body>
</body>
</html>
|