I am creating an ASP.NET project, and what I need to do is have the user click a button, he is then prompted with a date, and then he is transfered to the correct page based on his input.
I am using VBScript to generate the input box, but the problem I am having is when I use "window.open" in VBScript, the ASP.NET page just refreshes itself. Is there or fix for this? and if not, can I pass variables from my VBScript back to my ASP.NET page?
Thanks alot, some of my code is posted below, any help is greatly appreciated!
Paul
This is my ASP.NET Code:
This is my VBScript function:
I am using VBScript to generate the input box, but the problem I am having is when I use "window.open" in VBScript, the ASP.NET page just refreshes itself. Is there or fix for this? and if not, can I pass variables from my VBScript back to my ASP.NET page?
Thanks alot, some of my code is posted below, any help is greatly appreciated!
Paul
This is my ASP.NET Code:
Code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Button1.Attributes.Add("onClick", "return test(""mnthlyaverage.aspx"");")
End Sub
This is my VBScript function:
Code:
function test(pagename)
dim startdate
dim enddate
Dim URL
startdate=InputBox("Enter Start:")
enddate=InputBox("Enter End:")
URL = pagename & "?startdate=" & startdate & "&enddate=" & enddate
window.open(URL)
end function