PHP code needs to be converted to Javascript
Posted: Wed Nov 23, 2005 4:06 pm
I have a function that is written in javascript, see code below:
The problem is this function is a javascript method, and the contents inside are in php...how can i convert the php stuff to javascript???
Please help?
Code: Select all
function checkNewConfig()
{
if ($_SESSION['genericNewConfig'])
{
echo '<INPUT TYPE=submit VALUE="Save" NAME="generic_savebutton" ONCLICK="verifySave()" />';
echo '<INPUT TYPE=reset VALUE="Cancel" NAME="generic_cancelbutton" ONCLICK="verifyCancel()" />';
}
else
{
echo '<INPUT TYPE=button VALUE="Save" NAME="generic_savebutton" DISABLED="disabled" />';
echo '<INPUT TYPE=button VALUE="Cancel" NAME="generic_cancelbutton" DISABLED="disabled" />';
}
}Please help?