Sign in to follow this  

[web] JavaScript problem

This topic is 4581 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My Internet Explorer crashes whenever I get to a <form> tag in javascript. It generally works on sites, but when I run one myself, even if directly copied, it crashes in the f character of form. What could be causing this?

Share this post


Link to post
Share on other sites
Here is an example, copied from a web site:


<html>
<body>
<script language="javascript" type="text/javascript">


<form action="navigate.cfm" method="post" onsubmit="return navigateForm(this.form.navigateSelect)">
<select name="navigateSelect" id="navigateSelect" size="1">
<option value="">Choose One</option>
<option value="/">Home</option>
<option value="/products/">Products</option>
<option value="/faq/">FAQ</option>
<option value="/about_us/">About Us</option>
<option value="/contact_us/">Contact Us</option>
</select>
<input type="submit" value="Go" />
</form>
</script>
</body>
</html>


It doesn't work on my pc, crashing at line 13, character 1.

Share this post


Link to post
Share on other sites
Your form somehow ended up inside the script element. As the script element only can contain CDATA your user agent will likely try to interpret the data as javascript.

Share this post


Link to post
Share on other sites

This topic is 4581 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this