Sessions, jquery, Asych

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Sessions, jquery, Asych

Tom Parker-15
I am trying to pass a session variable into this asynchronous inline that is
on a page being called by a jquery function.  The following works if I
remove Sender, which I am trying to set to a session variable
($SessionUser).  All other page variables are set by including a site config
file on this page.  I am working on WinXP using 8.5.4.

code sample:
-----------------------------------------------

Var:'ID'=(Action_Param:'ID'),

If:$ID;
 {Inline: -Database=#DatabaseName,
          -Table='Table',
          'MessageCheck'='x',
          'Message'='Text string',
          'MessageDate'=(Date->(Format:'%Q')),
          'Sender'=#Sender
          -KeyField='UniqueSearch',
          -KeyValue=#ID,
          -Username=#Username,
          -Password=#Password,
          -Update;
  /Inline;}->(AsAsync: -Params=(Array: -DatabaseName=$Database,
                                       -Username=$Username,
                                       -Password=$Password,
                                       -ID=$ID,
                                       -Sender=$SessionUser));
/If;
-------------------------------------------------
This page is being called from a jquery function as follows:

$.get('page.lasso?ID=' + linkid,function(){void(null);});

where linkid is a recordID.

Questions:
--In console mode, I have errors: unable to get pid from child process...;
unable to restart site process..., unable to hand request to site process...
--I assume this is because the session is not being transferred through the
jquery function?
--how would I append another variable to 'page.lasso?ID=' + linkid... in the
jquery function?
--or, am I not using proper syntax for the ASync params?

Again, this works fine if I remove all references to Sender.

Thank you,

--Tom Parker



--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: Sessions, jquery, Asych

Rick Draper
 
Without looking at it in detail, you are missing a comma after #Sender -
is that the problem?


-----Original Message-----
From: Lasso Talk [mailto:[hidden email]] On Behalf Of Tom
Parker
Sent: Wednesday, 11 June 2008 17:46
To: Lasso Talk
Subject: Sessions, jquery, Asych

I am trying to pass a session variable into this asynchronous inline
that is on a page being called by a jquery function.  The following
works if I remove Sender, which I am trying to set to a session variable
($SessionUser).  All other page variables are set by including a site
config file on this page.  I am working on WinXP using 8.5.4.

code sample:
-----------------------------------------------

Var:'ID'=(Action_Param:'ID'),

If:$ID;
 {Inline: -Database=#DatabaseName,
          -Table='Table',
          'MessageCheck'='x',
          'Message'='Text string',
          'MessageDate'=(Date->(Format:'%Q')),
          'Sender'=#Sender
          -KeyField='UniqueSearch',
          -KeyValue=#ID,
          -Username=#Username,
          -Password=#Password,
          -Update;
  /Inline;}->(AsAsync: -Params=(Array: -DatabaseName=$Database,
                                       -Username=$Username,
                                       -Password=$Password,
                                       -ID=$ID,
                                       -Sender=$SessionUser)); /If;
-------------------------------------------------
This page is being called from a jquery function as follows:

$.get('page.lasso?ID=' + linkid,function(){void(null);});

where linkid is a recordID.

Questions:
--In console mode, I have errors: unable to get pid from child
process...; unable to restart site process..., unable to hand request to
site process...
--I assume this is because the session is not being transferred through
the jquery function?
--how would I append another variable to 'page.lasso?ID=' + linkid... in
the jquery function?
--or, am I not using proper syntax for the ASync params?

Again, this works fine if I remove all references to Sender.

Thank you,

--Tom Parker



--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/




--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: Sessions, jquery, Asych

Tom Parker-15
In reply to this post by Tom Parker-15
No, wish that was it--just lost the comma moving this into the email.

Thanks,

--Tom

----- Original Message -----
From: "Rick Draper" <[hidden email]>
To: "Lasso Talk" <[hidden email]>
Sent: Wednesday, June 11, 2008 4:16 PM
Subject: Re: Sessions, jquery, Asych



Without looking at it in detail, you are missing a comma after #Sender -
is that the problem?


-----Original Message-----
From: Lasso Talk [mailto:[hidden email]] On Behalf Of Tom
Parker
Sent: Wednesday, 11 June 2008 17:46
To: Lasso Talk
Subject: Sessions, jquery, Asych

I am trying to pass a session variable into this asynchronous inline
that is on a page being called by a jquery function.  The following
works if I remove Sender, which I am trying to set to a session variable
($SessionUser).  All other page variables are set by including a site
config file on this page.  I am working on WinXP using 8.5.4.

code sample:
-----------------------------------------------

Var:'ID'=(Action_Param:'ID'),

If:$ID;
 {Inline: -Database=#DatabaseName,
          -Table='Table',
          'MessageCheck'='x',
          'Message'='Text string',
          'MessageDate'=(Date->(Format:'%Q')),
          'Sender'=#Sender
          -KeyField='UniqueSearch',
          -KeyValue=#ID,
          -Username=#Username,
          -Password=#Password,
          -Update;
  /Inline;}->(AsAsync: -Params=(Array: -DatabaseName=$Database,
                                       -Username=$Username,
                                       -Password=$Password,
                                       -ID=$ID,
                                       -Sender=$SessionUser)); /If;
-------------------------------------------------
This page is being called from a jquery function as follows:

$.get('page.lasso?ID=' + linkid,function(){void(null);});

where linkid is a recordID.

Questions:
--In console mode, I have errors: unable to get pid from child
process...; unable to restart site process..., unable to hand request to
site process...
--I assume this is because the session is not being transferred through
the jquery function?
--how would I append another variable to 'page.lasso?ID=' + linkid... in
the jquery function?
--or, am I not using proper syntax for the ASync params?

Again, this works fine if I remove all references to Sender.

Thank you,

--Tom Parker



--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/




--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/





--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: Sessions, jquery, Asych

shelane
In reply to this post by Tom Parker-15
You want to append another variable like the session ID?

There are many ways to do this.  I save the session ID into a javascript
varialbe first.

<script type="text/javascript">
Var session_ID = '-session=mysession:[session_ID: -name='mysession']';

$.get('page.lasso?ID=' + linkid + '&' + session_ID);
</script>

I removed the ",function(){void(null);}" because it's not needed;


On 6/11/08 2:45 PM, "Tom Parker" <[hidden email]> wrote:

> I am trying to pass a session variable into this asynchronous inline that is
> on a page being called by a jquery function.  The following works if I
> remove Sender, which I am trying to set to a session variable
> ($SessionUser).  All other page variables are set by including a site config
> file on this page.  I am working on WinXP using 8.5.4.
>
> code sample:
> -----------------------------------------------
>
> Var:'ID'=(Action_Param:'ID'),
>
> If:$ID;
>  {Inline: -Database=#DatabaseName,
>           -Table='Table',
>           'MessageCheck'='x',
>           'Message'='Text string',
>           'MessageDate'=(Date->(Format:'%Q')),
>           'Sender'=#Sender
>           -KeyField='UniqueSearch',
>           -KeyValue=#ID,
>           -Username=#Username,
>           -Password=#Password,
>           -Update;
>   /Inline;}->(AsAsync: -Params=(Array: -DatabaseName=$Database,
>                                        -Username=$Username,
>                                        -Password=$Password,
>                                        -ID=$ID,
>                                        -Sender=$SessionUser));
> /If;
> -------------------------------------------------
> This page is being called from a jquery function as follows:
>
> $.get('page.lasso?ID=' + linkid,function(){void(null);});
>
> where linkid is a recordID.
>
> Questions:
> --In console mode, I have errors: unable to get pid from child process...;
> unable to restart site process..., unable to hand request to site process...
> --I assume this is because the session is not being transferred through the
> jquery function?
> --how would I append another variable to 'page.lasso?ID=' + linkid... in the
> jquery function?
> --or, am I not using proper syntax for the ASync params?
>
> Again, this works fine if I remove all references to Sender.
>
> Thank you,
>
> --Tom Parker
>
>



--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: Sessions, jquery, Asych

Tom Parker-15
In reply to this post by Tom Parker-15
Resolved by passing the sender information via jquery.  Am I correct that
sessions won't be passed in this way?

 $.get('page.lasso?ID=' + linkid +
'&sender=[$SessionUser]',function(){void(null);});

Or does the session not persist because Async opens a different thread?

Thanks,

--Tom

----- Original Message -----
From: "Tom Parker" <[hidden email]>
To: "Lasso Talk" <[hidden email]>
Sent: Wednesday, June 11, 2008 4:24 PM
Subject: Re: Sessions, jquery, Asych


> No, wish that was it--just lost the comma moving this into the email.
>
> Thanks,
>
> --Tom
>
> ----- Original Message -----
> From: "Rick Draper" <[hidden email]>
> To: "Lasso Talk" <[hidden email]>
> Sent: Wednesday, June 11, 2008 4:16 PM
> Subject: Re: Sessions, jquery, Asych
>
>
>
> Without looking at it in detail, you are missing a comma after #Sender -
> is that the problem?
>
>
> -----Original Message-----
> From: Lasso Talk [mailto:[hidden email]] On Behalf Of Tom
> Parker
> Sent: Wednesday, 11 June 2008 17:46
> To: Lasso Talk
> Subject: Sessions, jquery, Asych
>
> I am trying to pass a session variable into this asynchronous inline
> that is on a page being called by a jquery function.  The following
> works if I remove Sender, which I am trying to set to a session variable
> ($SessionUser).  All other page variables are set by including a site
> config file on this page.  I am working on WinXP using 8.5.4.
>
> code sample:
> -----------------------------------------------
>
> Var:'ID'=(Action_Param:'ID'),
>
> If:$ID;
> {Inline: -Database=#DatabaseName,
>          -Table='Table',
>          'MessageCheck'='x',
>          'Message'='Text string',
>          'MessageDate'=(Date->(Format:'%Q')),
>          'Sender'=#Sender
>          -KeyField='UniqueSearch',
>          -KeyValue=#ID,
>          -Username=#Username,
>          -Password=#Password,
>          -Update;
>  /Inline;}->(AsAsync: -Params=(Array: -DatabaseName=$Database,
>                                       -Username=$Username,
>                                       -Password=$Password,
>                                       -ID=$ID,
>                                       -Sender=$SessionUser)); /If;
> -------------------------------------------------
> This page is being called from a jquery function as follows:
>
> $.get('page.lasso?ID=' + linkid,function(){void(null);});
>
> where linkid is a recordID.
>
> Questions:
> --In console mode, I have errors: unable to get pid from child
> process...; unable to restart site process..., unable to hand request to
> site process...
> --I assume this is because the session is not being transferred through
> the jquery function?
> --how would I append another variable to 'page.lasso?ID=' + linkid... in
> the jquery function?
> --or, am I not using proper syntax for the ASync params?
>
> Again, this works fine if I remove all references to Sender.
>
> Thank you,
>
> --Tom Parker
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>
>
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>
>



--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: Sessions, jquery, Asych

shelane
If you don't explicitly pass the session ID in to an AJAX request and you're
not using cookie session management, then you're right.  (Sometimes that's
just fine if the page isn't going to do anything you need from the session
variables).


On 6/11/08 4:06 PM, "Tom Parker" <[hidden email]> wrote:

> Resolved by passing the sender information via jquery.  Am I correct that
> sessions won't be passed in this way?
>
>  $.get('page.lasso?ID=' + linkid +
> '&sender=[$SessionUser]',function(){void(null);});
>
> Or does the session not persist because Async opens a different thread?
>
> Thanks,
>
> --Tom
>
> ----- Original Message -----
> From: "Tom Parker" <[hidden email]>
> To: "Lasso Talk" <[hidden email]>
> Sent: Wednesday, June 11, 2008 4:24 PM
> Subject: Re: Sessions, jquery, Asych
>
>
>> No, wish that was it--just lost the comma moving this into the email.
>>
>> Thanks,
>>
>> --Tom
>>
>> ----- Original Message -----
>> From: "Rick Draper" <[hidden email]>
>> To: "Lasso Talk" <[hidden email]>
>> Sent: Wednesday, June 11, 2008 4:16 PM
>> Subject: Re: Sessions, jquery, Asych
>>
>>
>>
>> Without looking at it in detail, you are missing a comma after #Sender -
>> is that the problem?
>>
>>
>> -----Original Message-----
>> From: Lasso Talk [mailto:[hidden email]] On Behalf Of Tom
>> Parker
>> Sent: Wednesday, 11 June 2008 17:46
>> To: Lasso Talk
>> Subject: Sessions, jquery, Asych
>>
>> I am trying to pass a session variable into this asynchronous inline
>> that is on a page being called by a jquery function.  The following
>> works if I remove Sender, which I am trying to set to a session variable
>> ($SessionUser).  All other page variables are set by including a site
>> config file on this page.  I am working on WinXP using 8.5.4.
>>
>> code sample:
>> -----------------------------------------------
>>
>> Var:'ID'=(Action_Param:'ID'),
>>
>> If:$ID;
>> {Inline: -Database=#DatabaseName,
>>          -Table='Table',
>>          'MessageCheck'='x',
>>          'Message'='Text string',
>>          'MessageDate'=(Date->(Format:'%Q')),
>>          'Sender'=#Sender
>>          -KeyField='UniqueSearch',
>>          -KeyValue=#ID,
>>          -Username=#Username,
>>          -Password=#Password,
>>          -Update;
>>  /Inline;}->(AsAsync: -Params=(Array: -DatabaseName=$Database,
>>                                       -Username=$Username,
>>                                       -Password=$Password,
>>                                       -ID=$ID,
>>                                       -Sender=$SessionUser)); /If;
>> -------------------------------------------------
>> This page is being called from a jquery function as follows:
>>
>> $.get('page.lasso?ID=' + linkid,function(){void(null);});
>>
>> where linkid is a recordID.
>>
>> Questions:
>> --In console mode, I have errors: unable to get pid from child
>> process...; unable to restart site process..., unable to hand request to
>> site process...
>> --I assume this is because the session is not being transferred through
>> the jquery function?
>> --how would I append another variable to 'page.lasso?ID=' + linkid... in
>> the jquery function?
>> --or, am I not using proper syntax for the ASync params?
>>
>> Again, this works fine if I remove all references to Sender.
>>
>> Thank you,
>>
>> --Tom Parker
>>
>>
>> --
>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>>
>>
>> --
>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>>
>>
>>
>> --
>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>>
>
>



--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: Sessions, jquery, Asych

Tom Parker-15
In reply to this post by Tom Parker-15
Thanks, that makes sense.

--Tom

----- Original Message -----
From: "Shelane Enos" <[hidden email]>
To: "Lasso Talk" <[hidden email]>
Sent: Wednesday, June 11, 2008 5:41 PM
Subject: Re: Sessions, jquery, Asych


> If you don't explicitly pass the session ID in to an AJAX request and
> you're
> not using cookie session management, then you're right.  (Sometimes that's
> just fine if the page isn't going to do anything you need from the session
> variables).
>
>
> On 6/11/08 4:06 PM, "Tom Parker" <[hidden email]> wrote:
>
>> Resolved by passing the sender information via jquery.  Am I correct that
>> sessions won't be passed in this way?
>>
>>  $.get('page.lasso?ID=' + linkid +
>> '&sender=[$SessionUser]',function(){void(null);});
>>
>> Or does the session not persist because Async opens a different thread?
>>
>> Thanks,
>>
>> --Tom
>>
>> ----- Original Message -----
>> From: "Tom Parker" <[hidden email]>
>> To: "Lasso Talk" <[hidden email]>
>> Sent: Wednesday, June 11, 2008 4:24 PM
>> Subject: Re: Sessions, jquery, Asych
>>
>>
>>> No, wish that was it--just lost the comma moving this into the email.
>>>
>>> Thanks,
>>>
>>> --Tom
>>>
>>> ----- Original Message -----
>>> From: "Rick Draper" <[hidden email]>
>>> To: "Lasso Talk" <[hidden email]>
>>> Sent: Wednesday, June 11, 2008 4:16 PM
>>> Subject: Re: Sessions, jquery, Asych
>>>
>>>
>>>
>>> Without looking at it in detail, you are missing a comma after #Sender -
>>> is that the problem?
>>>
>>>
>>> -----Original Message-----
>>> From: Lasso Talk [mailto:[hidden email]] On Behalf Of Tom
>>> Parker
>>> Sent: Wednesday, 11 June 2008 17:46
>>> To: Lasso Talk
>>> Subject: Sessions, jquery, Asych
>>>
>>> I am trying to pass a session variable into this asynchronous inline
>>> that is on a page being called by a jquery function.  The following
>>> works if I remove Sender, which I am trying to set to a session variable
>>> ($SessionUser).  All other page variables are set by including a site
>>> config file on this page.  I am working on WinXP using 8.5.4.
>>>
>>> code sample:
>>> -----------------------------------------------
>>>
>>> Var:'ID'=(Action_Param:'ID'),
>>>
>>> If:$ID;
>>> {Inline: -Database=#DatabaseName,
>>>          -Table='Table',
>>>          'MessageCheck'='x',
>>>          'Message'='Text string',
>>>          'MessageDate'=(Date->(Format:'%Q')),
>>>          'Sender'=#Sender
>>>          -KeyField='UniqueSearch',
>>>          -KeyValue=#ID,
>>>          -Username=#Username,
>>>          -Password=#Password,
>>>          -Update;
>>>  /Inline;}->(AsAsync: -Params=(Array: -DatabaseName=$Database,
>>>                                       -Username=$Username,
>>>                                       -Password=$Password,
>>>                                       -ID=$ID,
>>>                                       -Sender=$SessionUser)); /If;
>>> -------------------------------------------------
>>> This page is being called from a jquery function as follows:
>>>
>>> $.get('page.lasso?ID=' + linkid,function(){void(null);});
>>>
>>> where linkid is a recordID.
>>>
>>> Questions:
>>> --In console mode, I have errors: unable to get pid from child
>>> process...; unable to restart site process..., unable to hand request to
>>> site process...
>>> --I assume this is because the session is not being transferred through
>>> the jquery function?
>>> --how would I append another variable to 'page.lasso?ID=' + linkid... in
>>> the jquery function?
>>> --or, am I not using proper syntax for the ASync params?
>>>
>>> Again, this works fine if I remove all references to Sender.
>>>
>>> Thank you,
>>>
>>> --Tom Parker
>>>
>>>
>>> --
>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>
>>>
>>>
>>>
>>> --
>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>
>>>
>>>
>>>
>>>
>>> --
>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>
>>>
>>>
>>
>>
>
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>
>



--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/