views:

540

answers:

1

Hi, I need to pass variables from one ASP(Classic ASP) to another ASP page. I am using javascript (window.open()) to open the second ASP page. I should not pass the variables in the URL like window.open('second.asp?first_name=sdf&last_name=asdas');

I have number of buttons in first ASP page,on click different buttons-different pages will get opened thro java script functions. So, I cant use "POST" method all the time.

Please let me know the ways of passing variables from one page to other page with out passing explicitely in the URL.

One thought m having is : using sessions/hidden/viewstate variables.

Thanks in Advance Rupa

A: 

I think the solution can be founnd be working round the assumption regarding "POST". You could modify the containing HTML form elements Action property in the buttons onclick. Have an expando attribute attached to the button which contains the real action value:-

 btn_onclick() { this.form.action = this.getAttribute("action"); }

Now you can give each input type="submit" its own action attribute and use onclick="btn_onclick".

AnthonyWJones