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? Link to comment https://forums.phpfreaks.com/topic/86992-prototype/ 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 Link to comment https://forums.phpfreaks.com/topic/86992-prototype/#findComment-445126 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.