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!

Server.Execute Does not transfer to new page

Status
Not open for further replies.

SmokeyJoe

Programmer
Nov 13, 2000
80
US
I am attemping to execute a second ASP page from a ASP page. What is happening is that rather than transfer control to the new page the program appears to be clearing the old page and then attempting to loop back which of course results in an error.

AS a NEWIE to ASP programming I think I want to use the SERVER.TRANSFER code as I do not wish to come back to the original page. I have tried both of the lines of code shown below, Neither of them work.



<INPUT TYPE = &quot;Submit&quot; NAME = &quot;Update&quot; value = &quot;Update Record &quot; OnClick = &quot; <%Server.Execute(UpdateGenericRecord.asp)%>&quot; > <BR><P>

<INPUT TYPE = &quot;Submit&quot; NAME = &quot;Update&quot; value = &quot;Update Record&quot; OnClick = <%Server.Transfer(&quot;UpdateGenericRecord.asp&quot;)%> > <BR><P>

Thanks for any help you can give.

SmokeyJoe
 
Try it like this -
<INPUT TYPE=Submit VALUE=&quot;Update Record&quot; OnClick = &quot;location=UpdateGenericRecord.asp'&quot;>
 
Hi SmokeyJoe,

You cannot use ASP as a client side script.. since ASP is handled only on the serverside to generate the resulting HTML, you will need to use javascript or VBScript to do your actions.. I've included your solution below:

<INPUT TYPE = &quot;Submit&quot; NAME = &quot;Update&quot; value = &quot;Update Record &quot; OnClick = &quot;javascript: formname.action ='UpdateGenericRecord.asp'; formname.submit();&quot; > <BR><P>

<INPUT TYPE = &quot;Submit&quot; NAME = &quot;Update&quot; value = &quot;Update Record&quot; OnClick = javascript: formname.action ='UpdateGenericRecord.asp'; formname.submit();&quot;> <BR><P>

I hope this helps,

Gorkem.



 
I misread, i thought you just wanted to move to another page.
 
Sorry Fellows none of the code worked.

Let me explain a little better......

I have a HTML form that does a &quot;Get&quot; on a specific record. The data requested by the &quot;Get&quot; is displayed on a ASP form in text boxes which may be changed by the user. After the user makes changes they need to indicate the record requires updating. I beleive this requires pressing a &quot;Submit&quot; button to update the record. My understanding is I need to have a second ASP page which accesses the database (MYSql) to make the update. I have been unable to get the first ASP page to load the second ASP page.

Thanks for any help.

SmokeyJoe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top