0

in a bit of a pickle.

The aim is to remember the date a user picked. Process being:

They select date (e.g march 7th 2014) and click next (page 2). On the page 2 the date they select becomes a session variable

Dim bookStart
bookStart = request.form("start")
'manipulate bookstart for everything else
session("selectedDate") = bookStart

The user then decides they want to go back a page (page 1) and select another date instead so they click back. My problem is the session variable i displayed on page 1 is nothing and I don't know why. Here is a snippet in my document.ready and a part of the form(for page 1):

if(!$('#selectedDate').val() == null || !$('#selectedDate').val() == ""){
    alert("there's something in here, lets display it: "+$('#selectedDate').val());
}
else if (dateCounter == null){
    var current = new Date();
    dateChange(current, "", 0);
    dateCounter = 0;
}

<input type="hidden" id="selectedDate" value="<%=session("selectedDate")%>">

The if statement works that if the value is empty in the hidden input field, load the page with todays date! Please help!!

1
  • To clarify, on page 2 I did a response.write on the session variable and it did display a date. Commented Oct 30, 2013 at 23:08

1 Answer 1

1

I'm the biggest idiot in the world. Turns out if page 1 is on HTTP and page 2 is HTTPS, you won't be able to access session variables between the 2. So I just make page 1 secure and things just worked!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.