Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

OnClick and session var

LEGEND ,
May 21, 2007 May 21, 2007
I have a link and I want to pass a session var to the next page. I
have done it a lot of ways without success. Here is the on I thought
should have worked.

<a href="clst_ed.asp" onClick="javascript: <%"Session("cbsg_a")=
Response.write(rs_clst.Fields.Item("PgID").Value) %>">Edit / Update</a>

Any suggestions?

--

TOPICS
Server side applications
279
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 21, 2007 May 21, 2007
What you'd do have your link like

<a href="clst_ed.asp?id=<%=rs_clst.Fields.Item("PgID").Value%>"

and then set the session variable on the clst_ed.asp page

Session("foo")=Request("id")

--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004



Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 21, 2007 May 21, 2007
But wouldn't this show in location bar? I want to pas the var without
anyone seeing it. I do that just fine for security logins and the
like, but doing it from a link has me at a loss.

Julian Roberts wrote:

> What you'd do have your link like
>
> <a href="clst_ed.asp?id=<%=rs_clst.Fields.Item("PgID").Value%>"
>
> and then set the session variable on the clst_ed.asp page
>
> Session("foo")=Request("id")



--

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
May 21, 2007 May 21, 2007
LATEST
>>
I do that just fine for security logins and the like, but doing it from a link has me at a loss
>>

I´m not sure, but doesn´t ASP support encryption & decryption for e.g. variables like PHP ?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines