Richard Korts
asked on
Javascript
I have a form like this:
<form method="post" name="st" action="cust_updt.php" onSubmit="return chk_vals();">
Something wasn't working in the subsequent page so I put a few alerts into the chk_vals function; see attached.
The alerts do NOT display
From my past experience, there is probably something wrong with this or other javascript on the page. I turned on FireFox WebConsole & ran it again; nothing.
How can I debug the Javascript; there is more above the chk_vals function, I suspect the error is there?
Thanks
chk-vals.js
<form method="post" name="st" action="cust_updt.php" onSubmit="return chk_vals();">
Something wasn't working in the subsequent page so I put a few alerts into the chk_vals function; see attached.
The alerts do NOT display
From my past experience, there is probably something wrong with this or other javascript on the page. I turned on FireFox WebConsole & ran it again; nothing.
How can I debug the Javascript; there is more above the chk_vals function, I suspect the error is there?
Thanks
chk-vals.js
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Also I'm not sure what you're trying to do with <? ?> but that is invalid syntax as well unless you have some other component overwriting those values.
JavaScript syntax validator:
http://esprima.org/demo/va lidate.htm l
document.st.action = "cust_wonsn.php?cid=" + cid + "&pstr="<? print $pstr; ?> + "&type="<? print $type; ?>;
temporarily change it to
document.st.action = "cust_wonsn.php?cid=" + cid + "&pstr=&type=";
JavaScript syntax validator:
http://esprima.org/demo/va
ASKER
Of course I looked right at those & didn't see it.
On the <? ?>, that is php, I'd forgotten that was in there; that gets resolved on the server.
Thanks
On the <? ?>, that is php, I'd forgotten that was in there; that gets resolved on the server.
Thanks
can you provide a link to the page?