W3C' validator is showing errors because of the & sign in the url.
1. Why is it trying to validate code in JS block ?
2. When I replace & with & it shows This Page Is Valid etc etc but obviously the url sent to is somepage.php?x=1&y=2 and not somepage.php?x=1&y=2.
How I rectify this ?
Thanks
Last edited by anjanesh on Fri Apr 01, 2005 1:28 pm, edited 1 time in total.
<script type="e;text/javascript"e;>
function somefunction ()
{
// determine what y's value is
document.getElementById("e;frm1"e;).action = "e;somepage.php?x=1&y="e;+y;
document.getElementById("e;frm1"e;).submit();
}
</script>
y is not user-input - some value based on what the user does on the page
anjanesh wrote:
1. Why is it trying to validating code in JS block ?
Boy: Do not try and bend the spoon. That's impossible. Instead only try to realize the truth.
Neo: What truth?
Boy: There is no spoon.
Neo: There is no spoon?
Boy: Then you'll see that it is not the spoon that bends, it is only yourself.
--
Solution: Move your js to a seperate file, as you should anyways, so it can be cached. Then there will be no spoon for the validator to try and bend.