Hello,
I just upgraded to Prototype v1.6, and I am getting the following
error
-- $H(object).toQueryString is not a function [line 144]
This is the Object.toQueryString() method. And it comes from the place
below in Ajax.reuest
if (params = Object.toQueryString(params)) { // The
Obect.toQueryString call here causes the error
// when GET, append parameters to URL
if (this.method == ''get'')
this.url += (this.url.include(''?'') ?
''&'' : ''?'') + params;
else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))
params += ''&_='';
}
Can somebody help me out here? My call is like this
new Ajax.Request("/addParamters.do", {
method: ''get'',
pars: ''a=10&b=2'',
onComplete: function(resp) {
alert("Hello there");
}
});
Also my call is in a file > b.js, which is included after the
prototype library is included from my HTML file.
Thanks and Regards,
Laks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Please read
new Ajax.Request("/addParamters.do", {> method: ''get'',
> pars: ''a=10&b=2'',
> onComplete: function(resp) {
> alert("Hello there");
> }
> });
as
new Ajax.Request("/addParamters.do", {
method: ''get'',
parameters: ''a=10&b=2'',
onComplete: function(resp) {
alert("Hello there");
}
});
On Jun 6, 2:22 pm, Laks
<slnarasim...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hello,
>
> I just upgraded to Prototype v1.6, and I am getting the following
> error
> -- $H(object).toQueryString is not a function [line 144]
>
> This is the Object.toQueryString() method. And it comes from the place
> below in Ajax.reuest
> if (params = Object.toQueryString(params)) { // The
> Obect.toQueryString call here causes the error
> // when GET, append parameters to URL
> if (this.method == ''get'')
> this.url += (this.url.include(''?'') ?
''&'' : ''?'') + params;
> else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))
> params += ''&_='';
> }
>
> Can somebody help me out here? My call is like this
> new Ajax.Request("/addParamters.do", {
> method: ''get'',
> pars: ''a=10&b=2'',
> onComplete: function(resp) {
> alert("Hello there");
> }
> });
>
> Also my call is in a file > b.js, which is included after the
> prototype library is included from my HTML file.
>
> Thanks and Regards,
> Laks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Try defining parameters as an object:
...
parameters: { a: 10, b: 2 },
...
- kangax
On Jun 6, 5:32 am, Laks
<slnarasim...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Please read
> new Ajax.Request("/addParamters.do", {
>
> > method: ''get'',
> > pars: ''a=10&b=2'',
> > onComplete: function(resp) {
> > alert("Hello there");
> > }
> > });
>
> as
> new Ajax.Request("/addParamters.do", {
> method: ''get'',
> parameters: ''a=10&b=2'',
> onComplete: function(resp) {
> alert("Hello there");
> }
> });
>
> On Jun 6, 2:22 pm, Laks
<slnarasim...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > Hello,
>
> > I just upgraded to Prototype v1.6, and I am getting the following
> > error
> > -- $H(object).toQueryString is not a function [line 144]
>
> > This is the Object.toQueryString() method. And it comes from the place
> > below in Ajax.reuest
> > if (params = Object.toQueryString(params)) { // The
> > Obect.toQueryString call here causes the error
> > // when GET, append parameters to URL
> > if (this.method == ''get'')
> > this.url += (this.url.include(''?'') ?
''&'' : ''?'') + params;
> > else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))
> > params += ''&_='';
> > }
>
> > Can somebody help me out here? My call is like this
> > new Ajax.Request("/addParamters.do", {
> > method: ''get'',
> > pars: ''a=10&b=2'',
> > onComplete: function(resp) {
> > alert("Hello there");
> > }
> > });
>
> > Also my call is in a file > b.js, which is included after the
> > prototype library is included from my HTML file.
>
> > Thanks and Regards,
> > Laks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
I have posted this before and have not been able to find an answer. I
have also posted this on the LinkedIn site with an answer directing me
to a change that is the same as the version of prototype.js that I am
currently using.
Hopefully, someone can direct me to another answer: I have tried many
different forms of the ''parameters'' property as can be seen.
Here is
the code and Firebug error:
function chkLUlist(obj,refnum,deptid) {
var nCustId = $(''form1'').nCustId.value;
var nTypeId = $(''form1'').nTypeId.value;
var cTextVal = obj.value;
if (isEmpty(deptid)) { nDeptId = "" } else { nDeptId = deptid };
var nRefNum = refnum;
//var strSubmit =
''nCustId=''+nCustId+''&nTypeId=''+nTypeId
+''&cTextVal=''+cTextVal+''&nDeptId=''+nDeptId+''&nRefNum=''+nRefNum
//var strSubmit
$H({nCustId:nCustId,nTypeId:nTypeId,cTextVal:cTextVal,nDeptId:nDeptId,nRefNum:nRefNum});
//var strSubmit = ''?
nCustId=''+''nCustId''+''&nTypeId=''+''nTypeId''+''&cTextVal=''+''cTextVal''+''&nDeptId=''+''nDeptId''+''&nRefNum=''+''nRefNum'';
//var strSubmit
''nCustId=''+''nCustId''+''&nTypeId=''+''nTypeId''+''&cTextVal=''+''cTextVal''+''&nDeptId=''+''nDeptId''+''&nRefNum=''+''nRefNum'';
//var strSubmit =
''nCustId=''+nCustId+''nTypeId=''+nTypeId
+''cTextVal=''+cTextVal+''nDeptId=''+nDeptId+''nRefNum=''+nRefNum;
var url
= ''lookuplist.asp'';
//var strSubmit = ''nCustId=''+encodeURI(nCustId)
+''nTypeId=''+encodeURI(nTypeId)+''cTextVal=''+encodeURI(cTextVal)
+''nDeptId=''+encodeURI(nDeptId)+''nRefNum=''+encodeURI(nRefNum);
var strSubmit = {nCustId: nCustId, nTypeId: nTypeId, cTextVal:
cTextVal, nDeptId: nDeptId, nRefNum: nRefNum};
var url = ''lookuplist.asp'';
new Ajax.Request(
url,
{
method: ''post'',
parameters: strSubmit,
onSuccess: showResponse
});
}
Firebug error display:
$H(object).toQueryString is not a function
toQueryString(Object nCustId=1 nTypeId=35 cTextVal=a nDeptId=6
nRefNum=4)prototype.js (line 144)
request("lookuplist.asp")prototype.js (line 1201)
initialize(function(), "lookuplist.asp", Object
method=post)prototype.js (line 1185)
wrap()prototype.js (line 238)
klass()prototype.js (line 48)
chkLUlist(input#REF4rowid1.labels a, 4, "6")common.js (line 147)
onblur(blur )action.asp (line 1)
[Break on this error] return $H(object).toQueryString();
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Instead of parameters, try postBody: $H({ ... }).toQueryString()
-Fred
On Tue, Jun 10, 2008 at 11:38 AM, few1938
<few1938-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> I have posted this before and have not been able to find an answer. I
> have also posted this on the LinkedIn site with an answer directing me
> to a change that is the same as the version of prototype.js that I am
> currently using.
>
> Hopefully, someone can direct me to another answer: I have tried many
> different forms of the ''parameters'' property as can be
seen. Here is
> the code and Firebug error:
>
> function chkLUlist(obj,refnum,deptid) {
> var nCustId = $(''form1'').nCustId.value;
> var nTypeId = $(''form1'').nTypeId.value;
> var cTextVal = obj.value;
> if (isEmpty(deptid)) { nDeptId = "" } else { nDeptId = deptid };
> var nRefNum = refnum;
> //var strSubmit =
''nCustId=''+nCustId+''&nTypeId=''+nTypeId
>
+''&cTextVal=''+cTextVal+''&nDeptId=''+nDeptId+''&nRefNum=''+nRefNum
> //var strSubmit >
>
$H({nCustId:nCustId,nTypeId:nTypeId,cTextVal:cTextVal,nDeptId:nDeptId,nRefNum:nRefNum});
> //var strSubmit = ''?
>
>
nCustId=''+''nCustId''+''&nTypeId=''+''nTypeId''+''&cTextVal=''+''cTextVal''+''&nDeptId=''+''nDeptId''+''&nRefNum=''+''nRefNum'';
> //var strSubmit >
>
''nCustId=''+''nCustId''+''&nTypeId=''+''nTypeId''+''&cTextVal=''+''cTextVal''+''&nDeptId=''+''nDeptId''+''&nRefNum=''+''nRefNum'';
> //var strSubmit =
''nCustId=''+nCustId+''nTypeId=''+nTypeId
>
+''cTextVal=''+cTextVal+''nDeptId=''+nDeptId+''nRefNum=''+nRefNum;
var url
> = ''lookuplist.asp'';
> //var strSubmit = ''nCustId=''+encodeURI(nCustId)
>
+''nTypeId=''+encodeURI(nTypeId)+''cTextVal=''+encodeURI(cTextVal)
>
+''nDeptId=''+encodeURI(nDeptId)+''nRefNum=''+encodeURI(nRefNum);
> var strSubmit = {nCustId: nCustId, nTypeId: nTypeId, cTextVal:
> cTextVal, nDeptId: nDeptId, nRefNum: nRefNum};
> var url = ''lookuplist.asp'';
> new Ajax.Request(
> url,
> {
> method: ''post'',
> parameters: strSubmit,
> onSuccess: showResponse
> });
> }
>
> Firebug error display:
>
> $H(object).toQueryString is not a function
> toQueryString(Object nCustId=1 nTypeId=35 cTextVal=a nDeptId=6
> nRefNum=4)prototype.js (line 144)
> request("lookuplist.asp")prototype.js (line 1201)
> initialize(function(), "lookuplist.asp", Object
> method=post)prototype.js (line 1185)
> wrap()prototype.js (line 238)
> klass()prototype.js (line 48)
> chkLUlist(input#REF4rowid1.labels a, 4, "6")common.js (line 147)
> onblur(blur )action.asp (line 1)
> [Break on this error] return $H(object).toQueryString();
>
>
> >
>
--
Science answers questions; philosophy questions answers.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Still no joy. Here is the Firebug error:
$H({nCustId:nCustId, nTypeId:nTypeId, cTextVal:cTextVal,
nDeptId:nDeptId, nRefNum:nRefNum}).toQueryString is not a function
chkLUlist(input#REF4rowid1.labels ss, 4, "")common.js (line 146)
onblur(blur )action.asp (line 1)
[Break on this error] postBody:
$H({nCustId:nCustId,nTypeId:nTypeId,cTextVal:cTextVal,nDeptId:nDeptId...
On Jun 10, 12:45 pm, "Frederick Polgardy"
<f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org>
wrote:> Instead of parameters, try postBody: $H({ ... }).toQueryString()
>
> -Fred
>
>
>
> On Tue, Jun 10, 2008 at 11:38 AM, few1938
<few1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > I have posted this before and have not been able to find an answer. I
> > have also posted this on the LinkedIn site with an answer directing me
> > to a change that is the same as the version of prototype.js that I am
> > currently using.
>
> > Hopefully, someone can direct me to another answer: I have tried many
> > different forms of the ''parameters'' property as can
be seen. Here is
> > the code and Firebug error:
>
> > function chkLUlist(obj,refnum,deptid) {
> > var nCustId = $(''form1'').nCustId.value;
> > var nTypeId = $(''form1'').nTypeId.value;
> > var cTextVal = obj.value;
> > if (isEmpty(deptid)) { nDeptId = "" } else { nDeptId =
deptid };
> > var nRefNum = refnum;
> > //var strSubmit =
''nCustId=''+nCustId+''&nTypeId=''+nTypeId
> >
+''&cTextVal=''+cTextVal+''&nDeptId=''+nDeptId+''&nRefNum=''+nRefNum
> > //var strSubmit >
> >
$H({nCustId:nCustId,nTypeId:nTypeId,cTextVal:cTextVal,nDeptId:nDeptId,nRefNum:nRefNum});
> > //var strSubmit = ''?
>
> >
nCustId=''+''nCustId''+''&nTypeId=''+''nTypeId''+''&cTextVal=''+''cTextVal''+''&nDeptId=''+''nDeptId''+''&nRefNum=''+''nRefNum'';
> > //var strSubmit >
> >
''nCustId=''+''nCustId''+''&nTypeId=''+''nTypeId''+''&cTextVal=''+''cTextVal''+''&nDeptId=''+''nDeptId''+''&nRefNum=''+''nRefNum'';
> > //var strSubmit =
''nCustId=''+nCustId+''nTypeId=''+nTypeId
> >
+''cTextVal=''+cTextVal+''nDeptId=''+nDeptId+''nRefNum=''+nRefNum;
var url
> > = ''lookuplist.asp'';
> > //var strSubmit = ''nCustId=''+encodeURI(nCustId)
> >
+''nTypeId=''+encodeURI(nTypeId)+''cTextVal=''+encodeURI(cTextVal)
> >
+''nDeptId=''+encodeURI(nDeptId)+''nRefNum=''+encodeURI(nRefNum);
> > var strSubmit = {nCustId: nCustId, nTypeId: nTypeId, cTextVal:
> > cTextVal, nDeptId: nDeptId, nRefNum: nRefNum};
> > var url = ''lookuplist.asp'';
> > new Ajax.Request(
> > url,
> > {
> > method: ''post'',
> > parameters: strSubmit,
> > onSuccess: showResponse
> > });
> > }
>
> > Firebug error display:
>
> > $H(object).toQueryString is not a function
> > toQueryString(Object nCustId=1 nTypeId=35 cTextVal=a nDeptId=6
> > nRefNum=4)prototype.js (line 144)
> > request("lookuplist.asp")prototype.js (line 1201)
> > initialize(function(), "lookuplist.asp", Object
> > method=post)prototype.js (line 1185)
> > wrap()prototype.js (line 238)
> > klass()prototype.js (line 48)
> > chkLUlist(input#REF4rowid1.labels a, 4, "6")common.js (line
147)
> > onblur(blur )action.asp (line 1)
> > [Break on this error] return $H(object).toQueryString();
>
> --
> Science answers questions; philosophy questions answers.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Can you crack open your prototype.js and tell us what version you have?
Other Proto-heads, was $H({}).toQueryString introduced in 1.6?
On Tue, Jun 10, 2008 at 11:57 AM, few1938
<few1938-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> Still no joy. Here is the Firebug error:
>
> $H({nCustId:nCustId, nTypeId:nTypeId, cTextVal:cTextVal,
> nDeptId:nDeptId, nRefNum:nRefNum}).toQueryString is not a function
> chkLUlist(input#REF4rowid1.labels ss, 4, "")common.js (line 146)
> onblur(blur )action.asp (line 1)
> [Break on this error] postBody:
> $H({nCustId:nCustId,nTypeId:nTypeId,cTextVal:cTextVal,nDeptId:nDeptId...
>
> On Jun 10, 12:45 pm, "Frederick Polgardy"
<f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org> wrote:
> > Instead of parameters, try postBody: $H({ ... }).toQueryString()
> >
> > -Fred
> >
> >
> >
> > On Tue, Jun 10, 2008 at 11:38 AM, few1938
<few1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >
> > > I have posted this before and have not been able to find an
answer. I
> > > have also posted this on the LinkedIn site with an answer
directing me
> > > to a change that is the same as the version of prototype.js that
I am
> > > currently using.
> >
> > > Hopefully, someone can direct me to another answer: I have tried
many
> > > different forms of the ''parameters'' property as
can be seen. Here is
> > > the code and Firebug error:
> >
> > > function chkLUlist(obj,refnum,deptid) {
> > > var nCustId = $(''form1'').nCustId.value;
> > > var nTypeId = $(''form1'').nTypeId.value;
> > > var cTextVal = obj.value;
> > > if (isEmpty(deptid)) { nDeptId = "" } else { nDeptId =
deptid };
> > > var nRefNum = refnum;
> > > //var strSubmit =
''nCustId=''+nCustId+''&nTypeId=''+nTypeId
> > >
+''&cTextVal=''+cTextVal+''&nDeptId=''+nDeptId+''&nRefNum=''+nRefNum
> > > //var strSubmit > >
> > >
>
$H({nCustId:nCustId,nTypeId:nTypeId,cTextVal:cTextVal,nDeptId:nDeptId,nRefNum:nRefNum});
> > > //var strSubmit = ''?
> >
> > >
>
nCustId=''+''nCustId''+''&nTypeId=''+''nTypeId''+''&cTextVal=''+''cTextVal''+''&nDeptId=''+''nDeptId''+''&nRefNum=''+''nRefNum'';
> > > //var strSubmit > >
> > >
>
''nCustId=''+''nCustId''+''&nTypeId=''+''nTypeId''+''&cTextVal=''+''cTextVal''+''&nDeptId=''+''nDeptId''+''&nRefNum=''+''nRefNum'';
> > > //var strSubmit =
''nCustId=''+nCustId+''nTypeId=''+nTypeId
> > >
+''cTextVal=''+cTextVal+''nDeptId=''+nDeptId+''nRefNum=''+nRefNum;
var url
> > > = ''lookuplist.asp'';
> > > //var strSubmit =
''nCustId=''+encodeURI(nCustId)
> > >
+''nTypeId=''+encodeURI(nTypeId)+''cTextVal=''+encodeURI(cTextVal)
> > >
+''nDeptId=''+encodeURI(nDeptId)+''nRefNum=''+encodeURI(nRefNum);
> > > var strSubmit = {nCustId: nCustId, nTypeId: nTypeId, cTextVal:
> > > cTextVal, nDeptId: nDeptId, nRefNum: nRefNum};
> > > var url = ''lookuplist.asp'';
> > > new Ajax.Request(
> > > url,
> > > {
> > > method: ''post'',
> > > parameters: strSubmit,
> > > onSuccess: showResponse
> > > });
> > > }
> >
> > > Firebug error display:
> >
> > > $H(object).toQueryString is not a function
> > > toQueryString(Object nCustId=1 nTypeId=35 cTextVal=a nDeptId=6
> > > nRefNum=4)prototype.js (line 144)
> > > request("lookuplist.asp")prototype.js (line 1201)
> > > initialize(function(), "lookuplist.asp", Object
> > > method=post)prototype.js (line 1185)
> > > wrap()prototype.js (line 238)
> > > klass()prototype.js (line 48)
> > > chkLUlist(input#REF4rowid1.labels a, 4, "6")common.js
(line 147)
> > > onblur(blur )action.asp (line 1)
> > > [Break on this error] return $H(object).toQueryString();
> >
> > --
> > Science answers questions; philosophy questions answers.
> >
>
--
Science answers questions; philosophy questions answers.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
My copy of prototype.js is: /* Prototype JavaScript framework, version 1.6.0.2 * (c) 2005-2008 Sam Stephenson * * Prototype is freely distributable under the terms of an MIT-style license. * For details, see the Prototype web site: http://www.prototypejs.org/ * *-------------------------------------------------------------------------- */ dated 2/18/2008. Date maybe incorrect, I have opened it with an editor. Don''t think the touch time has changed. On Jun 10, 1:01 pm, "Frederick Polgardy" <f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org> wrote:> Can you crack open your prototype.js and tell us what version you have? > > Other Proto-heads, was $H({}).toQueryString introduced in 1.6? > > > > On Tue, Jun 10, 2008 at 11:57 AM, few1938 <few1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Still no joy. Here is the Firebug error: > > > $H({nCustId:nCustId, nTypeId:nTypeId, cTextVal:cTextVal, > > nDeptId:nDeptId, nRefNum:nRefNum}).toQueryString is not a function > > chkLUlist(input#REF4rowid1.labels ss, 4, "")common.js (line 146) > > onblur(blur )action.asp (line 1) > > [Break on this error] postBody: > > $H({nCustId:nCustId,nTypeId:nTypeId,cTextVal:cTextVal,nDeptId:nDeptId... > > > On Jun 10, 12:45 pm, "Frederick Polgardy" <f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org> wrote: > > > Instead of parameters, try postBody: $H({ ... }).toQueryString() > > > > -Fred > > > > On Tue, Jun 10, 2008 at 11:38 AM, few1938 <few1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > I have posted this before and have not been able to find an answer. I > > > > have also posted this on the LinkedIn site with an answer directing me > > > > to a change that is the same as the version of prototype.js that I am > > > > currently using. > > > > > Hopefully, someone can direct me to another answer: I have tried many > > > > different forms of the ''parameters'' property as can be seen. Here is > > > > the code and Firebug error: > > > > > function chkLUlist(obj,refnum,deptid) { > > > > var nCustId = $(''form1'').nCustId.value; > > > > var nTypeId = $(''form1'').nTypeId.value; > > > > var cTextVal = obj.value; > > > > if (isEmpty(deptid)) { nDeptId = "" } else { nDeptId = deptid }; > > > > var nRefNum = refnum; > > > > //var strSubmit = ''nCustId=''+nCustId+''&nTypeId=''+nTypeId > > > > +''&cTextVal=''+cTextVal+''&nDeptId=''+nDeptId+''&nRefNum=''+nRefNum > > > > //var strSubmit > > > $H({nCustId:nCustId,nTypeId:nTypeId,cTextVal:cTextVal,nDeptId:nDeptId,nRefNum:nRefNum}); > > > > //var strSubmit = ''? > > > nCustId=''+''nCustId''+''&nTypeId=''+''nTypeId''+''&cTextVal=''+''cTextVal''+''&nDeptId=''+''nDeptId''+''&nRefNum=''+''nRefNum''; > > > > //var strSubmit > > > ''nCustId=''+''nCustId''+''&nTypeId=''+''nTypeId''+''&cTextVal=''+''cTextVal''+''&nDeptId=''+''nDeptId''+''&nRefNum=''+''nRefNum''; > > > > //var strSubmit = ''nCustId=''+nCustId+''nTypeId=''+nTypeId > > > > +''cTextVal=''+cTextVal+''nDeptId=''+nDeptId+''nRefNum=''+nRefNum; var url > > > > = ''lookuplist.asp''; > > > > //var strSubmit = ''nCustId=''+encodeURI(nCustId) > > > > +''nTypeId=''+encodeURI(nTypeId)+''cTextVal=''+encodeURI(cTextVal) > > > > +''nDeptId=''+encodeURI(nDeptId)+''nRefNum=''+encodeURI(nRefNum); > > > > var strSubmit = {nCustId: nCustId, nTypeId: nTypeId, cTextVal: > > > > cTextVal, nDeptId: nDeptId, nRefNum: nRefNum}; > > > > var url = ''lookuplist.asp''; > > > > new Ajax.Request( > > > > url, > > > > { > > > > method: ''post'', > > > > parameters: strSubmit, > > > > onSuccess: showResponse > > > > }); > > > > } > > > > > Firebug error display: > > > > > $H(object).toQueryString is not a function > > > > toQueryString(Object nCustId=1 nTypeId=35 cTextVal=a nDeptId=6 > > > > nRefNum=4)prototype.js (line 144) > > > > request("lookuplist.asp")prototype.js (line 1201) > > > > initialize(function(), "lookuplist.asp", Object > > > > method=post)prototype.js (line 1185) > > > > wrap()prototype.js (line 238) > > > > klass()prototype.js (line 48) > > > > chkLUlist(input#REF4rowid1.labels a, 4, "6")common.js (line 147) > > > > onblur(blur )action.asp (line 1) > > > > [Break on this error] return $H(object).toQueryString(); > > > > -- > > > Science answers questions; philosophy questions answers. > > -- > Science answers questions; philosophy questions answers.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I just typed $H({a:1, b:2, c:3}).toQueryString() into the Firebug console
and got ''a=1&b=2&c=3'' so it definitely works in
1.6.0.2. There''s something
weird we''re not seeing. Are you absolutely positive the path to
prototype.js in your script tag is correct? And there''s no possible
way $H
is being redefined?
On Tue, Jun 10, 2008 at 12:05 PM, few1938
<few1938-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> On Jun 10, 1:01 pm, "Frederick Polgardy"
<f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org> wrote:
> > Can you crack open your prototype.js and tell us what version you
have?
> >
> > Other Proto-heads, was $H({}).toQueryString introduced in 1.6?
> >
> >
> >
> > On Tue, Jun 10, 2008 at 11:57 AM, few1938
<few1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >
> > > Still no joy. Here is the Firebug error:
> >
> > > $H({nCustId:nCustId, nTypeId:nTypeId, cTextVal:cTextVal,
> > > nDeptId:nDeptId, nRefNum:nRefNum}).toQueryString is not a
function
> > > chkLUlist(input#REF4rowid1.labels ss, 4, "")common.js
(line 146)
> > > onblur(blur )action.asp (line 1)
> > > [Break on this error] postBody:
> > >
> $H({nCustId:nCustId,nTypeId:nTypeId,cTextVal:cTextVal,nDeptId:nDeptId...
> >
> > > On Jun 10, 12:45 pm, "Frederick Polgardy"
<f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org> wrote:
> > > > Instead of parameters, try postBody: $H({ ...
}).toQueryString()
> >
> > > > -Fred
> >
> > > > On Tue, Jun 10, 2008 at 11:38 AM, few1938
<few1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >
> > > > > I have posted this before and have not been able to
find an answer.
> I
> > > > > have also posted this on the LinkedIn site with an
answer directing
> me
> > > > > to a change that is the same as the version of
prototype.js that I
> am
> > > > > currently using.
> >
> > > > > Hopefully, someone can direct me to another answer: I
have tried
> many
> > > > > different forms of the ''parameters''
property as can be seen. Here
> is
> > > > > the code and Firebug error:
> >
> > > > > function chkLUlist(obj,refnum,deptid) {
> > > > > var nCustId =
$(''form1'').nCustId.value;
> > > > > var nTypeId =
$(''form1'').nTypeId.value;
> > > > > var cTextVal = obj.value;
> > > > > if (isEmpty(deptid)) { nDeptId = "" } else {
nDeptId = deptid };
> > > > > var nRefNum = refnum;
> > > > > //var strSubmit =
''nCustId=''+nCustId+''&nTypeId=''+nTypeId
> > > > >
+''&cTextVal=''+cTextVal+''&nDeptId=''+nDeptId+''&nRefNum=''+nRefNum
> > > > > //var strSubmit > >
> > >
>
$H({nCustId:nCustId,nTypeId:nTypeId,cTextVal:cTextVal,nDeptId:nDeptId,nRefNum:nRefNum});
> > > > > //var strSubmit = ''?
> >
> > >
>
nCustId=''+''nCustId''+''&nTypeId=''+''nTypeId''+''&cTextVal=''+''cTextVal''+''&nDeptId=''+''nDeptId''+''&nRefNum=''+''nRefNum'';
> > > > > //var strSubmit > >
> > >
>
''nCustId=''+''nCustId''+''&nTypeId=''+''nTypeId''+''&cTextVal=''+''cTextVal''+''&nDeptId=''+''nDeptId''+''&nRefNum=''+''nRefNum'';
> > > > > //var strSubmit =
''nCustId=''+nCustId+''nTypeId=''+nTypeId
> > > > >
+''cTextVal=''+cTextVal+''nDeptId=''+nDeptId+''nRefNum=''+nRefNum;
var
> url
> > > > > = ''lookuplist.asp'';
> > > > > //var strSubmit =
''nCustId=''+encodeURI(nCustId)
> > > > >
+''nTypeId=''+encodeURI(nTypeId)+''cTextVal=''+encodeURI(cTextVal)
> > > > >
+''nDeptId=''+encodeURI(nDeptId)+''nRefNum=''+encodeURI(nRefNum);
> > > > > var strSubmit = {nCustId: nCustId, nTypeId: nTypeId,
cTextVal:
> > > > > cTextVal, nDeptId: nDeptId, nRefNum: nRefNum};
> > > > > var url = ''lookuplist.asp'';
> > > > > new Ajax.Request(
> > > > > url,
> > > > > {
> > > > > method: ''post'',
> > > > > parameters: strSubmit,
> > > > > onSuccess: showResponse
> > > > > });
> > > > > }
> >
> > > > > Firebug error display:
> >
> > > > > $H(object).toQueryString is not a function
> > > > > toQueryString(Object nCustId=1 nTypeId=35 cTextVal=a
nDeptId=6
> > > > > nRefNum=4)prototype.js (line 144)
> > > > > request("lookuplist.asp")prototype.js (line
1201)
> > > > > initialize(function(), "lookuplist.asp",
Object
> > > > > method=post)prototype.js (line 1185)
> > > > > wrap()prototype.js (line 238)
> > > > > klass()prototype.js (line 48)
> > > > > chkLUlist(input#REF4rowid1.labels a, 4,
"6")common.js (line 147)
> > > > > onblur(blur )action.asp (line 1)
> > > > > [Break on this error] return
$H(object).toQueryString();
> >
> > > > --
> > > > Science answers questions; philosophy questions answers.
> >
> > --
> > Science answers questions; philosophy questions answers.
> >
>
--
Science answers questions; philosophy questions answers.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
The web page, the .asp file and prototype.js are all in the same
folder. I cut and pasted your test into my firebug command window and
got this:
TypeError: $H({a:1, b:2, c:3}).toQueryString is not a function
On Jun 10, 1:09 pm, "Frederick Polgardy"
<f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org>
wrote:> I just typed $H({a:1, b:2, c:3}).toQueryString() into the Firebug console
> and got ''a=1&b=2&c=3'' so it definitely works in
1.6.0.2. There''s something
> weird we''re not seeing. Are you absolutely positive the path to
> prototype.js in your script tag is correct? And there''s no
possible way $H
> is being redefined?
>
>
>
> On Tue, Jun 10, 2008 at 12:05 PM, few1938
<few1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > On Jun 10, 1:01 pm, "Frederick Polgardy"
<f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org> wrote:
> > > Can you crack open your prototype.js and tell us what version you
have?
>
> > > Other Proto-heads, was $H({}).toQueryString introduced in 1.6?
>
> > > On Tue, Jun 10, 2008 at 11:57 AM, few1938
<few1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > > > Still no joy. Here is the Firebug error:
>
> > > > $H({nCustId:nCustId, nTypeId:nTypeId, cTextVal:cTextVal,
> > > > nDeptId:nDeptId, nRefNum:nRefNum}).toQueryString is not a
function
> > > > chkLUlist(input#REF4rowid1.labels ss, 4,
"")common.js (line 146)
> > > > onblur(blur )action.asp (line 1)
> > > > [Break on this error] postBody:
>
> >
$H({nCustId:nCustId,nTypeId:nTypeId,cTextVal:cTextVal,nDeptId:nDeptId...
>
> > > > On Jun 10, 12:45 pm, "Frederick Polgardy"
<f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org> wrote:
> > > > > Instead of parameters, try postBody: $H({ ...
}).toQueryString()
>
> > > > > -Fred
>
> > > > > On Tue, Jun 10, 2008 at 11:38 AM, few1938
<few1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > > > > > I have posted this before and have not been able
to find an answer.
> > I
> > > > > > have also posted this on the LinkedIn site with an
answer directing
> > me
> > > > > > to a change that is the same as the version of
prototype.js that I
> > am
> > > > > > currently using.
>
> > > > > > Hopefully, someone can direct me to another
answer: I have tried
> > many
> > > > > > different forms of the
''parameters'' property as can be seen. Here
> > is
> > > > > > the code and Firebug error:
>
> > > > > > function chkLUlist(obj,refnum,deptid) {
> > > > > > var nCustId =
$(''form1'').nCustId.value;
> > > > > > var nTypeId =
$(''form1'').nTypeId.value;
> > > > > > var cTextVal = obj.value;
> > > > > > if (isEmpty(deptid)) { nDeptId = "" }
else { nDeptId = deptid };
> > > > > > var nRefNum = refnum;
> > > > > > //var strSubmit =
''nCustId=''+nCustId+''&nTypeId=''+nTypeId
> > > > > >
+''&cTextVal=''+cTextVal+''&nDeptId=''+nDeptId+''&nRefNum=''+nRefNum
> > > > > > //var strSubmit >
> >
$H({nCustId:nCustId,nTypeId:nTypeId,cTextVal:cTextVal,nDeptId:nDeptId,nRefNum:nRefNum});
> > > > > > //var strSubmit = ''?
>
> >
nCustId=''+''nCustId''+''&nTypeId=''+''nTypeId''+''&cTextVal=''+''cTextVal''+''&nDeptId=''+''nDeptId''+''&nRefNum=''+''nRefNum'';
> > > > > > //var strSubmit >
> >
''nCustId=''+''nCustId''+''&nTypeId=''+''nTypeId''+''&cTextVal=''+''cTextVal''+''&nDeptId=''+''nDeptId''+''&nRefNum=''+''nRefNum'';
> > > > > > //var strSubmit =
''nCustId=''+nCustId+''nTypeId=''+nTypeId
> > > > > >
+''cTextVal=''+cTextVal+''nDeptId=''+nDeptId+''nRefNum=''+nRefNum;
var
> > url
> > > > > > = ''lookuplist.asp'';
> > > > > > //var strSubmit =
''nCustId=''+encodeURI(nCustId)
> > > > > >
+''nTypeId=''+encodeURI(nTypeId)+''cTextVal=''+encodeURI(cTextVal)
> > > > > >
+''nDeptId=''+encodeURI(nDeptId)+''nRefNum=''+encodeURI(nRefNum);
> > > > > > var strSubmit = {nCustId: nCustId, nTypeId:
nTypeId, cTextVal:
> > > > > > cTextVal, nDeptId: nDeptId, nRefNum: nRefNum};
> > > > > > var url = ''lookuplist.asp'';
> > > > > > new Ajax.Request(
> > > > > > url,
> > > > > > {
> > > > > > method: ''post'',
> > > > > > parameters: strSubmit,
> > > > > > onSuccess: showResponse
> > > > > > });
> > > > > > }
>
> > > > > > Firebug error display:
>
> > > > > > $H(object).toQueryString is not a function
> > > > > > toQueryString(Object nCustId=1 nTypeId=35
cTextVal=a nDeptId=6
> > > > > > nRefNum=4)prototype.js (line 144)
> > > > > > request("lookuplist.asp")prototype.js
(line 1201)
> > > > > > initialize(function(), "lookuplist.asp",
Object
> > > > > > method=post)prototype.js (line 1185)
> > > > > > wrap()prototype.js (line 238)
> > > > > > klass()prototype.js (line 48)
> > > > > > chkLUlist(input#REF4rowid1.labels a, 4,
"6")common.js (line 147)
> > > > > > onblur(blur )action.asp (line 1)
> > > > > > [Break on this error] return
$H(object).toQueryString();
>
> > > > > --
> > > > > Science answers questions; philosophy questions
answers.
>
> > > --
> > > Science answers questions; philosophy questions answers.
>
> --
> Science answers questions; philosophy questions answers.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Here is the description of ''TypeError'' A TypeError is thrown when an operand or argument passed to a function is incompatible with the type expected by that operator or function. Don''t know if that will help? On Jun 10, 1:15 pm, few1938 <few1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> The web page, the .asp file and prototype.js are all in the same > folder. I cut and pasted your test into my firebug command window and > got this: > > TypeError: $H({a:1, b:2, c:3}).toQueryString is not a function > > On Jun 10, 1:09 pm, "Frederick Polgardy" <f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org> wrote: > > > I just typed $H({a:1, b:2, c:3}).toQueryString() into the Firebug console > > and got ''a=1&b=2&c=3'' so it definitely works in 1.6.0.2. There''s something > > weird we''re not seeing. Are you absolutely positive the path to > > prototype.js in your script tag is correct? And there''s no possible way $H > > is being redefined? > > > On Tue, Jun 10, 2008 at 12:05 PM, few1938 <few1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > On Jun 10, 1:01 pm, "Frederick Polgardy" <f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org> wrote: > > > > Can you crack open your prototype.js and tell us what version you have? > > > > > Other Proto-heads, was $H({}).toQueryString introduced in 1.6? > > > > > On Tue, Jun 10, 2008 at 11:57 AM, few1938 <few1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Still no joy. Here is the Firebug error: > > > > > > $H({nCustId:nCustId, nTypeId:nTypeId, cTextVal:cTextVal, > > > > > nDeptId:nDeptId, nRefNum:nRefNum}).toQueryString is not a function > > > > > chkLUlist(input#REF4rowid1.labels ss, 4, "")common.js (line 146) > > > > > onblur(blur )action.asp (line 1) > > > > > [Break on this error] postBody: > > > > $H({nCustId:nCustId,nTypeId:nTypeId,cTextVal:cTextVal,nDeptId:nDeptId... > > > > > > On Jun 10, 12:45 pm, "Frederick Polgardy" <f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org> wrote: > > > > > > Instead of parameters, try postBody: $H({ ... }).toQueryString() > > > > > > > -Fred > > > > > > > On Tue, Jun 10, 2008 at 11:38 AM, few1938 <few1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > I have posted this before and have not been able to find an answer. > > > I > > > > > > > have also posted this on the LinkedIn site with an answer directing > > > me > > > > > > > to a change that is the same as the version of prototype.js that I > > > am > > > > > > > currently using. > > > > > > > > Hopefully, someone can direct me to another answer: I have tried > > > many > > > > > > > different forms of the ''parameters'' property as can be seen. Here > > > is > > > > > > > the code and Firebug error: > > > > > > > > function chkLUlist(obj,refnum,deptid) { > > > > > > > var nCustId = $(''form1'').nCustId.value; > > > > > > > var nTypeId = $(''form1'').nTypeId.value; > > > > > > > var cTextVal = obj.value; > > > > > > > if (isEmpty(deptid)) { nDeptId = "" } else { nDeptId = deptid }; > > > > > > > var nRefNum = refnum; > > > > > > > //var strSubmit = ''nCustId=''+nCustId+''&nTypeId=''+nTypeId > > > > > > > +''&cTextVal=''+cTextVal+''&nDeptId=''+nDeptId+''&nRefNum=''+nRefNum > > > > > > > //var strSubmit > > > > $H({nCustId:nCustId,nTypeId:nTypeId,cTextVal:cTextVal,nDeptId:nDeptId,nRefNum:nRefNum}); > > > > > > > //var strSubmit = ''? > > > > nCustId=''+''nCustId''+''&nTypeId=''+''nTypeId''+''&cTextVal=''+''cTextVal''+''&nDeptId=''+''nDeptId''+''&nRefNum=''+''nRefNum''; > > > > > > > //var strSubmit > > > > ''nCustId=''+''nCustId''+''&nTypeId=''+''nTypeId''+''&cTextVal=''+''cTextVal''+''&nDeptId=''+''nDeptId''+''&nRefNum=''+''nRefNum''; > > > > > > > //var strSubmit = ''nCustId=''+nCustId+''nTypeId=''+nTypeId > > > > > > > +''cTextVal=''+cTextVal+''nDeptId=''+nDeptId+''nRefNum=''+nRefNum; var > > > url > > > > > > > = ''lookuplist.asp''; > > > > > > > //var strSubmit = ''nCustId=''+encodeURI(nCustId) > > > > > > > +''nTypeId=''+encodeURI(nTypeId)+''cTextVal=''+encodeURI(cTextVal) > > > > > > > +''nDeptId=''+encodeURI(nDeptId)+''nRefNum=''+encodeURI(nRefNum); > > > > > > > var strSubmit = {nCustId: nCustId, nTypeId: nTypeId, cTextVal: > > > > > > > cTextVal, nDeptId: nDeptId, nRefNum: nRefNum}; > > > > > > > var url = ''lookuplist.asp''; > > > > > > > new Ajax.Request( > > > > > > > url, > > > > > > > { > > > > > > > method: ''post'', > > > > > > > parameters: strSubmit, > > > > > > > onSuccess: showResponse > > > > > > > }); > > > > > > > } > > > > > > > > Firebug error display: > > > > > > > > $H(object).toQueryString is not a function > > > > > > > toQueryString(Object nCustId=1 nTypeId=35 cTextVal=a nDeptId=6 > > > > > > > nRefNum=4)prototype.js (line 144) > > > > > > > request("lookuplist.asp")prototype.js (line 1201) > > > > > > > initialize(function(), "lookuplist.asp", Object > > > > > > > method=post)prototype.js (line 1185) > > > > > > > wrap()prototype.js (line 238) > > > > > > > klass()prototype.js (line 48) > > > > > > > chkLUlist(input#REF4rowid1.labels a, 4, "6")common.js (line 147) > > > > > > > onblur(blur )action.asp (line 1) > > > > > > > [Break on this error] return $H(object).toQueryString(); > > > > > > > -- > > > > > > Science answers questions; philosophy questions answers. > > > > > -- > > > > Science answers questions; philosophy questions answers. > > > -- > > Science answers questions; philosophy questions answers.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Don''t know why, but I moved the call for the prototype.js file to the end of the <head> tag and the call to .toQueryString() works. Fred, Thanks for your help... Frank On Jun 10, 1:31 pm, few1938 <few1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Here is the description of ''TypeError'' > A TypeError is thrown when an operand or argument passed to a function > is incompatible with the type expected by that operator or function. > Don''t know if that will help? > > On Jun 10, 1:15 pm, few1938 <few1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > The web page, the .asp file and prototype.js are all in the same > > folder. I cut and pasted your test into my firebug command window and > > got this: > > > TypeError: $H({a:1, b:2, c:3}).toQueryString is not a function > > > On Jun 10, 1:09 pm, "Frederick Polgardy" <f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org> wrote: > > > > I just typed $H({a:1, b:2, c:3}).toQueryString() into the Firebug console > > > and got ''a=1&b=2&c=3'' so it definitely works in 1.6.0.2. There''s something > > > weird we''re not seeing. Are you absolutely positive the path to > > > prototype.js in your script tag is correct? And there''s no possible way $H > > > is being redefined? > > > > On Tue, Jun 10, 2008 at 12:05 PM, few1938 <few1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > On Jun 10, 1:01 pm, "Frederick Polgardy" <f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org> wrote: > > > > > Can you crack open your prototype.js and tell us what version you have? > > > > > > Other Proto-heads, was $H({}).toQueryString introduced in 1.6? > > > > > > On Tue, Jun 10, 2008 at 11:57 AM, few1938 <few1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > Still no joy. Here is the Firebug error: > > > > > > > $H({nCustId:nCustId, nTypeId:nTypeId, cTextVal:cTextVal, > > > > > > nDeptId:nDeptId, nRefNum:nRefNum}).toQueryString is not a function > > > > > > chkLUlist(input#REF4rowid1.labels ss, 4, "")common.js (line 146) > > > > > > onblur(blur )action.asp (line 1) > > > > > > [Break on this error] postBody: > > > > > $H({nCustId:nCustId,nTypeId:nTypeId,cTextVal:cTextVal,nDeptId:nDeptId... > > > > > > > On Jun 10, 12:45 pm, "Frederick Polgardy" <f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org> wrote: > > > > > > > Instead of parameters, try postBody: $H({ ... }).toQueryString() > > > > > > > > -Fred > > > > > > > > On Tue, Jun 10, 2008 at 11:38 AM, few1938 <few1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > I have posted this before and have not been able to find an answer. > > > > I > > > > > > > > have also posted this on the LinkedIn site with an answer directing > > > > me > > > > > > > > to a change that is the same as the version of prototype.js that I > > > > am > > > > > > > > currently using. > > > > > > > > > Hopefully, someone can direct me to another answer: I have tried > > > > many > > > > > > > > different forms of the ''parameters'' property as can be seen. Here > > > > is > > > > > > > > the code and Firebug error: > > > > > > > > > function chkLUlist(obj,refnum,deptid) { > > > > > > > > var nCustId = $(''form1'').nCustId.value; > > > > > > > > var nTypeId = $(''form1'').nTypeId.value; > > > > > > > > var cTextVal = obj.value; > > > > > > > > if (isEmpty(deptid)) { nDeptId = "" } else { nDeptId = deptid }; > > > > > > > > var nRefNum = refnum; > > > > > > > > //var strSubmit = ''nCustId=''+nCustId+''&nTypeId=''+nTypeId > > > > > > > > +''&cTextVal=''+cTextVal+''&nDeptId=''+nDeptId+''&nRefNum=''+nRefNum > > > > > > > > //var strSubmit > > > > > $H({nCustId:nCustId,nTypeId:nTypeId,cTextVal:cTextVal,nDeptId:nDeptId,nRefNum:nRefNum}); > > > > > > > > //var strSubmit = ''? > > > > > nCustId=''+''nCustId''+''&nTypeId=''+''nTypeId''+''&cTextVal=''+''cTextVal''+''&nDeptId=''+''nDeptId''+''&nRefNum=''+''nRefNum''; > > > > > > > > //var strSubmit > > > > > ''nCustId=''+''nCustId''+''&nTypeId=''+''nTypeId''+''&cTextVal=''+''cTextVal''+''&nDeptId=''+''nDeptId''+''&nRefNum=''+''nRefNum''; > > > > > > > > //var strSubmit = ''nCustId=''+nCustId+''nTypeId=''+nTypeId > > > > > > > > +''cTextVal=''+cTextVal+''nDeptId=''+nDeptId+''nRefNum=''+nRefNum; var > > > > url > > > > > > > > = ''lookuplist.asp''; > > > > > > > > //var strSubmit = ''nCustId=''+encodeURI(nCustId) > > > > > > > > +''nTypeId=''+encodeURI(nTypeId)+''cTextVal=''+encodeURI(cTextVal) > > > > > > > > +''nDeptId=''+encodeURI(nDeptId)+''nRefNum=''+encodeURI(nRefNum); > > > > > > > > var strSubmit = {nCustId: nCustId, nTypeId: nTypeId, cTextVal: > > > > > > > > cTextVal, nDeptId: nDeptId, nRefNum: nRefNum}; > > > > > > > > var url = ''lookuplist.asp''; > > > > > > > > new Ajax.Request( > > > > > > > > url, > > > > > > > > { > > > > > > > > method: ''post'', > > > > > > > > parameters: strSubmit, > > > > > > > > onSuccess: showResponse > > > > > > > > }); > > > > > > > > } > > > > > > > > > Firebug error display: > > > > > > > > > $H(object).toQueryString is not a function > > > > > > > > toQueryString(Object nCustId=1 nTypeId=35 cTextVal=a nDeptId=6 > > > > > > > > nRefNum=4)prototype.js (line 144) > > > > > > > > request("lookuplist.asp")prototype.js (line 1201) > > > > > > > > initialize(function(), "lookuplist.asp", Object > > > > > > > > method=post)prototype.js (line 1185) > > > > > > > > wrap()prototype.js (line 238) > > > > > > > > klass()prototype.js (line 48) > > > > > > > > chkLUlist(input#REF4rowid1.labels a, 4, "6")common.js (line 147) > > > > > > > > onblur(blur )action.asp (line 1) > > > > > > > > [Break on this error] return $H(object).toQueryString(); > > > > > > > > -- > > > > > > > Science answers questions; philosophy questions answers. > > > > > > -- > > > > > Science answers questions; philosophy questions answers. > > > > -- > > > Science answers questions; philosophy questions answers.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---