Hi All...
I seem to be having the wierdest problem....
Using Javascript to output a form based on the users browser, we are having problems with the initial load... IE & Netscape complain of Javascript errors... Come to find out, something is adding extra double quotation marks (See below) and messing up the forms
If you refresh the page the form will be displayed properly and you will never have the problem again through out your session.....
Here is a sample of the browsers webpage source
--------------WRONG : 1st Time------------
<!--
if (browser == "NN")
document.write("<input value="\"test"\" type=\"text\" name=\"username\" size=\"12\">");
else
document.write("<input value="\""\" type=\"text\" name=\"username\" size=\"15\">");
//-->
--------------CORRECT : After a refresh----------
<!--
if (browser == "NN")
document.write("<input value=\"test\" type=\"text\" name=\"username\" size=\"12\">");
else
document.write("<input value=\""\ type=\"text\" name=\"username\" size=\"15\">");
//-->
Youll see that in the WRONG version the value field has extra quotation marks around the escaped double quotation marks
Here is my php source for that section is
<!--
if (browser == "NN")
document.write("<input value=\"<? echo @$frm["username"]; ?>\" type=\"text\" name=\"username\" size=\"12\">");
else
document.write("<input value=\"<? echo @$frm["username"]; ?>\" type=\"text\" name=\"username\" size=\"15\">");
//-->
My question to yall is why and who adds the extra quotation marks around the php code (BUT only until the page is refreshed....)
Regards,
Todd