setting session variable from javascript on a .html file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Zeba

    #1

    setting session variable from javascript on a .html file

    Hi!

    I have an application in which a user searches for a particular item
    as - He enteres the keyword in home.html and views the results in
    searchresults.a spx.I want to uniquely identify the search based on the
    timestamp+keywo rd. The keywork i can get from the URL. But is there
    any way for me to get the timestamp for each unique search keyword
    without modifying the URL ?

    If i use if(IsPostBack) condition to set the timestamp, the timestamp
    does not change even when I start a new search. I can't set a hidden
    variable to detect if the page is fresh/not either ( by setting its
    value from codebehind) , because the search can start from home.html
    or searchresults.a spx. So how do can get the timestamp without
    modifying the URL ??

    Can I set a session variable from home.html, considering its not an
    aspx page ?? Also, its the default starting page for the application.

    Please help soon !

    Thanks!!!

  • David

    #2
    Re: setting session variable from javascript on a .html file

    Why would you need it in the URL?

    When the searchresults page is run, it has a page_load. In here, you can
    just get the time of the request and do whatever you want with it.

    Maybe I am missing something...

    --
    Best regards,
    Dave Colliver.

    ~~
    http://www.FOCUSPortals.com - Local franchises available


    "Zeba" <coolzebs@gmail .comwrote in message
    news:1176896179 .712158.178770@ o5g2000hsb.goog legroups.com...
    Hi!
    >
    I have an application in which a user searches for a particular item
    as - He enteres the keyword in home.html and views the results in
    searchresults.a spx.I want to uniquely identify the search based on the
    timestamp+keywo rd. The keywork i can get from the URL. But is there
    any way for me to get the timestamp for each unique search keyword
    without modifying the URL ?
    >
    If i use if(IsPostBack) condition to set the timestamp, the timestamp
    does not change even when I start a new search. I can't set a hidden
    variable to detect if the page is fresh/not either ( by setting its
    value from codebehind) , because the search can start from home.html
    or searchresults.a spx. So how do can get the timestamp without
    modifying the URL ??
    >
    Can I set a session variable from home.html, considering its not an
    aspx page ?? Also, its the default starting page for the application.
    >
    Please help soon !
    >
    Thanks!!!
    >

    Comment

    Working...