Hi..
I got a problem in this part.
It gave me an exception, so my script did not work in firefox while no
error in ie.
CODE:
for (var name in headers)
this.transport.setRequestHeader(name, headers[name]);
In order to catch the error, I added try{}catch{} in this part as
below.
Take a look at the exception.
CODE:
for (var name in headers) {
try {
this.transport.setRequestHeader(name, headers[name]);
} catch (e) {
alert(e.toString());
alert(name " : " + headers[name]);
}
}
ALERT:
[Exception... "Component returned failure code: 0x80070057
(NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.setRequestHeader]"
nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"
location: "JS frame :: http://127.0.0.1/lib/js/prototype.js ::
anonymous :: line 922" data: no]
ALERT:
toJSONString : function () {
return s.object(this);
}
There is a different code expression in this part in protype.js
version 1.4.0.
Version 1.4.0 did not issue any problem.
However, later version 1.5.x issued a problem here.
MY SCRIPT CODE:
function goAction() {
var url = ''http://127.0.0.1/lifesci/mycal.cgi'';
var pars = Form.serialize("entry");
//var pars = "bcece=ce&yyyy=2007&mm=5"
var myAjax = new Ajax.Request (
url,
{
method: ''get'',
parameters: pars,
onComplete: showResponse
}
);
}
function showResponse (req) {
$(''result'').innerHTML = req.responseText;
}
What can I do?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---