Jump to content

ProtoType


atholon

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.