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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.