Question : Posting form data and jquery

Dear experts,

I have this code (inside a <form>-tag, but this on works on it's own, as it should.

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
<input type="button" id="deleteButton" value="Delete calendar">
                
                        <script type="text/javascript">
                            $("#deleteButton").click(function () { 
                              var answer = confirm("Warning: This operation will delete the calendar and all of its events. Are you sure you want to continue?")
                                        if (answer){
                                                window.location = "xxx.asp?xxx=xxx&cid=<%= xxx("xxx") %>&xxx=<%= xxx("xxx") %>";
                                        }		
                            });
                        </script>


I am already posting querystrings to the delete page. That is not good - but it works.
I think it is better if I can use Request.Form("") instead of Request.Querystring("") in ASP.
...so all I want is some hidden fields posted with this button. Is it possible?

All suggestions are appreciated and will be tried!

Thanks,
DanishCoder

Answer : Posting form data and jquery

There's no problem to post hidden fields object. All you want to post need to have a name.
You can set value of this hidden field using the id for example : document.getElementById("hidden1").value = "some value";
1:
2:
<input type="hidden" name="hidden1" id="hidden1" value="initial value" />
<input type="hidden" name="hidden2" id="hidden2" value="initial value" />
Random Solutions  
 
programming4us programming4us