Javascript/AJAX/jQuery - Object Expected Line 1 only in IE
http://p开发者_运维百科astie.org/856698
Anyone have any idea why the script is causing this error? It doesn't throw an error in Firefox, only IE.
Any ideas?
A link to the final script can be found at http://www.proskimboarding.com/codingtest/Public/registration.php
First of all, Pharabus is right, if you have jQuery available, use $.ajax instead of building your own http request, it can save you a lot of code (hint: JSON).
Then you have <form method="post" action="JavaScript: regSubmit()">
but your function is named submitReg()
, so that's causing the error Dustin Laine mentioned.
Third of all: why using onClick="JavaScript:submitReg()"
if you already trigger this function on the form action? This will probably cause two identical requests for no reason.
精彩评论