[solved] uncaught exception in Firefox
Hi!
I am using mootools 1.11 with Joomla!.
I get this error message when I submit my form:
My script works fine in Google Chrome, but not in IE and FF.
This is my form:
and my javascript:
How do I solve my problem?
Thanks in advance!
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:
- <form id="chatbox_form" method="post" action="" name="chatbox_form">
- <label for="chatbox_user">Name</label>
- <br/>
- <input id="chatbox_user" type="text" name="chatbox_user"/>
- <br/>
- <label for="chatbox_text">Message</label>
- <br/>
- <textarea id="chatbox_text" name="chatbox_text" rows="5"
- cols="20"></textarea>
- <input id="chatbox_submit" type="submit" value="Post"/>
- <div id="chatbox_loader"/>
- </div>
- </form>
and my javascript:
- $('chatbox_form').addEvent('submit', function(e) {
- /**
- * Prevent the submit event
- */
- new Event(e).stop();
- if($('chatbox_text').value == "")
- {
- var text = undefined;
- if($('chatbox_user').value == "")
- {
- text = "Please enter a name!\n";
- }
- alert(text + 'Please enter a message!');
- return false;
- }
- /**
- * send takes care of encoding and returns the Ajax instance.
- * onComplete removes the spinner from the log.
- */
- this.send({
- onRequest: function() {
- $('chatbox_loader').addClass('chatbox_loadimg');
- $('chatbox_text').value = "";
- $('chatbox_submit').disabled = true;
- },
- onComplete: function() {
- $('chatbox_loader').removeClass('chatbox_loadimg');
- $('chatbox_submit').disabled = false;
- }
- });
- });
How do I solve my problem?
Thanks in advance!