close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Session Values being cleared

Thread began 7/26/2010 7:04 pm by bjgarner241692 | Last modified 7/27/2010 1:17 pm by Jason Byrnes | 934 views | 8 replies |

bjgarner241692

Session Values being cleared

Something about the Insert page that I am working with is clearing my Session Value and I cannot find it. I suspect it is normal behaviour however I am trying to adapt the DataAssist pages so that they only affect records for which the user has access.

The session value I need preserved is CID.

Please advise if you can help with this problem.

Attached Files
jobs_Insert.zip
Sign in to reply to this post

Jason ByrnesWebAssist

i suspect this line is the cause of your problems:
<%
if (Request.ServerVariables("Request_Method") = "POST") then
Session("CID") = "" & cStr(cStr(Request.Form("Facility2"))) & ""
end if%>


this will set the session any time a form is posted, since the insert form does not have a Facility2 element, the session is being cleared.

Sign in to reply to this post

bjgarner241692

hmm, that's not how I expected that to work.

Do you have a suggestion? I've tried On Page Load as well. Session works on that page (Insert) but is cleared on Insert.

I've even tried setting the value again on the Details page but it will not capture the value from the Insert page.

Sign in to reply to this post

bjgarner241692

Found a work around. I was trying to populate a field on the Details page with the SessionID but I am able to get the same value from the Recordset.

It's a little clunkly but does function.

It would be nice to be able to set that Session value and have it survive the insert.

Sign in to reply to this post

Jason ByrnesWebAssist

It looks like you are passing the CID session form the detail page to the insert page as a form value, this would only be needed if the insert page is on a different server.

The job of a session variable is to exist through out any page on your site once it is set.

you do not need to pass it from one page to another using a form.

Sign in to reply to this post

bjgarner241692

Other way around.
Here's how it works.
First page is Insert page.
CID is set by taking the value from a form on a page that you do not have. CID is used to pull a recordset from DB1 to populate the Insert Form and ultimately a record in DB2. Works perfectly.

However, Insert goes to Detail page, where I still need the CID.

The code setting the CID on the Details page was added AFTER I found that my initial CID was being wiped out.

The workaround I came up with this morning was to insert a form at the bottom of Detail with one hidden field, populated from the WADA_Recordset and then Submit the form which loads Results page which pulls data from DB2 based on the CID. Works, I just don't like the form button at the bottom. The regular Results icon generated by DataAssist would be cleaner.

Thanks for your input.

Sign in to reply to this post

Jason ByrnesWebAssist

so what page posts to the insert page that contains the Facility2 form element?



I guess you could add a hidden form element to capture the value being initially passed:

<input type="hidden" name="Facility2" value="<%=cStr(cStr(Request.Form("Facility2")))%>" />
Sign in to reply to this post

bjgarner241692

It's a login page. It pulls Facility2 from the db because it is associated with the logged in user.

I will try the hidden field on the Insert page. I think that will work nicely.

Bart

Sign in to reply to this post

Jason ByrnesWebAssist

ok, let me know if it does not.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...