atholon Posted January 21, 2008 Share Posted January 21, 2008 Hi guys I got Prototype and I have been trying to get this form submission thing to work all day with no luck. I have this: <script type="text/javascript" src="./includes/prototype.js"></script> <script language="JavaScript" type="text/javascript"> function saveItem() { var title = $F('goober'); alert(title); new Ajax.Updater('result', 'post.php?title=' + title + '', {asynchronous:true}); } </script> <form action="" method="POST"> <div id="result"></div> <input type="text" id="goober"> <input type="button" value="Check Username" onclick="saveItem();" /> </form> It returns an error Char 5 Object Required line 3485 which is in Prototype and contains this: getValue: function(element) { element = $(element); var method = element.tagName.toLowerCase(); return Form.Element.Serializers[method](element); }, When I try to use getElementById it returns a blank string... any ideas? Quote Link to comment Share on other sites More sharing options...
atholon Posted January 21, 2008 Author Share Posted January 21, 2008 Hahahaha! I am suck a moron. I was just testing out the script and forgot to put the <html><body> tags so the dom's execution was screwed up works great now Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.