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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onclick form submission

Status
Not open for further replies.

craigward

Programmer
Nov 13, 2007
230
GB
Hi,
I have been trying to submit a form, but due to the way i am passing values in a query sting i'm not sure if it is possible.

here is the form and the href i am trying to submit with, i have to pass the query variables.

Is there any reason why this won't work?

Code:
<form name="results" method="get" action="MailerLookup.asp">



<a href="MailerLookup.asp?sqlquery=<% =(server.UrlEncode(Session("test")))%>&ownerresults=<%=(ownerresults)%>&offset=<% = requestrecords - recordsonpage %>" onclick="document.forms.results.submit()">Next Page</a>
 
Why do you have an address in the href attribute of the <a> tag? Do you want the link to follow the address in the href, or submit the form? Why don't you try writing your link like this instead:

Code:
<a href="[!]#[/!]" onclick="document.forms.results.submit()[!];return false[/!]">Next Page</a>

If you need all the info from the querystring in the href attribute to be passed over with the form, then you are going to have to modify the action tag on the form prior to submission.

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson

Finally, <. is a good thing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top