Page 1 of 1

[solved] uncaught exception in Firefox

PostPosted: Thu May 07, 2009 8:06 pm
by kaloer
Hi!

I am using mootools 1.11 with Joomla!.
I get this error message when I submit my form:
uncaught exception: [Exception... "Component returned failure code:
0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]" nsresult:
"0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame ::
http://localhost/joomla/media/system/js ... pressed.js ::
anonymous :: line 5209" data: no]


My script works fine in Google Chrome, but not in IE and FF.

This is my form:
  1.  
  2. <form id="chatbox_form" method="post" action="" name="chatbox_form">
  3. <label for="chatbox_user">Name</label>
  4. <br/>
  5. <input id="chatbox_user" type="text" name="chatbox_user"/>
  6. <br/>
  7. <label for="chatbox_text">Message</label>
  8. <br/>
  9. <textarea id="chatbox_text" name="chatbox_text" rows="5"
  10. cols="20"></textarea>
  11. <input id="chatbox_submit" type="submit" value="Post"/>
  12. <div id="chatbox_loader"/>
  13. </div>
  14. </form>



and my javascript:
  1.  
  2. $('chatbox_form').addEvent('submit', function(e) {
  3.     /**
  4.     * Prevent the submit event
  5.     */
  6.     new Event(e).stop();
  7.    
  8.     if($('chatbox_text').value == "")
  9.     {
  10.         var text = undefined;
  11.         if($('chatbox_user').value == "")
  12.         {
  13.             text = "Please enter a name!\n";
  14.         }
  15.         alert(text + 'Please enter a message!');
  16.         return false;
  17.     }
  18.     /**
  19.     * send takes care of encoding and returns the Ajax instance.
  20.     * onComplete removes the spinner from the log.
  21.     */
  22.     this.send({
  23.         onRequest: function() {
  24.             $('chatbox_loader').addClass('chatbox_loadimg');
  25.             $('chatbox_text').value = "";
  26.             $('chatbox_submit').disabled = true;
  27.         },
  28.         onComplete: function() {
  29.             $('chatbox_loader').removeClass('chatbox_loadimg');
  30.             $('chatbox_submit').disabled = false;
  31.         }
  32.     });
  33. });



How do I solve my problem?

Thanks in advance!

Re: uncaught exception in Firefox

PostPosted: Thu May 07, 2009 8:55 pm
by kaloer
I'm sorry if the thread should be posted in the mootools 1.11 forum.
Please move it if necessary.

Re: uncaught exception in Firefox

PostPosted: Fri May 08, 2009 2:48 pm
by kaloer
The problem is solved :)

It didn't work with a empty action-tag in the form.