Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to call a HTTP page when clicking a button? 1

Status
Not open for further replies.

datras

Programmer
Joined
Jun 6, 2001
Messages
28
Location
DK
Hi
I hope some one can help me with this small piece of code.

I have a button on a ASP page and when the user click the button the code have to open another page. However, nothing happens when I click on the button.

I have tested the hyperlink by creating a ordinary hyperlink to the page at the same place as the button and it works. So I must not have understood how to create a button in ASP....


<INPUT type="button" value="Load data to database" id=button1 name=button1 onclick="../../intercatch/InterCatchCS/Data/UploadValidation/frmTest.aspx?SessionId=<%=intSessID%>&strFileName=<%=strFileName%>&IntDatasetID=<%=IntDatasetID%>"></INPUT>


 
The problem is that the onclick attribute must contain some script not just a URL.

Try something like:
onclick="window.navigate('../../intercatch/InterCatchCS/Data/UploadValidation/frmTest.aspx?SessionId=<%=intSessID%>&strFileName=<%=strFileName%>&IntDatasetID=<%=IntDatasetID%>')"

This assumes that javascript or jscript is the default client side language.


Bob Boffin
 
THANKS! That did the trick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top