B
babygodzilla
I've got 2 scripts that do the same thing, except one uses a Button
type button to call a Javascript function, and the other uses a Submit
type.
Script with Button type: http://im.chillax.in/projects/eventful
Script with Submit type: http://im.chillax.in/projects/eventful/index2.html
The reason I found this distinction is because in the first script,
the original script, when someone presses Enter key in the text field,
the script does not run. So I had to add an onkeypress event that
looks at every keystroke for that text field and simulates a click()
on the Search button when the Enter key is pressed.
Then I found out that this can be achieved by using a Submit type
button instead of a Button type. So I did it, the result of which is
the second link up there. When I run this script, I get some pretty
nasty error from Firebug that I don't understand.
[Exception... "Component returned failure code: 0x80040111
(NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult:
"0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame ::
http://chillax.in/projects/eventful/?artist=maroon :: anonymous ::
line 67" data: no]
Does anyone know what this means? Does anyone know the reason behind
this behavior and how to fix it? It doesn't make sense to me because
both onSubmit and onClick calls the go() function. what is this
NS_ERROR_NOT_AVAILABLE error??
type button to call a Javascript function, and the other uses a Submit
type.
Script with Button type: http://im.chillax.in/projects/eventful
Script with Submit type: http://im.chillax.in/projects/eventful/index2.html
The reason I found this distinction is because in the first script,
the original script, when someone presses Enter key in the text field,
the script does not run. So I had to add an onkeypress event that
looks at every keystroke for that text field and simulates a click()
on the Search button when the Enter key is pressed.
Then I found out that this can be achieved by using a Submit type
button instead of a Button type. So I did it, the result of which is
the second link up there. When I run this script, I get some pretty
nasty error from Firebug that I don't understand.
[Exception... "Component returned failure code: 0x80040111
(NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult:
"0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame ::
http://chillax.in/projects/eventful/?artist=maroon :: anonymous ::
line 67" data: no]
Does anyone know what this means? Does anyone know the reason behind
this behavior and how to fix it? It doesn't make sense to me because
both onSubmit and onClick calls the go() function. what is this
NS_ERROR_NOT_AVAILABLE error??