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

two back buttons, only one works

Status
Not open for further replies.

jpicks

MIS
Oct 11, 2002
158
US
I have two back buttons on a asp page. They both submit to forms, and the action is to open another asp page.

The coding for the two is exactly the same, except for adding a number 2 to the end of the name and id's for the second back button.

If I include both buttons, only the bottom button works. Both buttons work fine if they are the only button on the page.

What gives?

Any help or suggestions would be greatly appreciated!

-Jim
 
If they both do the same thing, why are there two? There's always a better way...
 
I placed one at the top of the page and one at the bottom of the page for ease of navigation.
 
Thanks for the reply,

Both buttoms are inside tags.

There are actually two sets of buttons that are dynamically generated with ASP. If the user came from page1 then the back buttons will send them back to page1 one and if the user came from page2 they get sent back to page2


--one of these buttons is placed at the top of the page, just below the <body> tag.
<%
If Session(&quot;page&quot;) = &quot;&quot; Then
Response.Write &quot;<FORM name=b1 id=b1 action=chooseApp.asp>&quot;
Response.Write &quot;<INPUT name=back1 TYPE=submit id=back1 VALUE= BACK ></FORM>&quot;
Else
Response.Write &quot;<FORM name=b1 id=b1 action=allApps.asp>&quot;
Response.Write &quot;<INPUT name=back1 TYPE=submit id=back1 VALUE= BACK ></FORM>&quot;
End If
%>


--one of these buttons is placed at the bottom of the page just before the </body> tag
<%
If Session(&quot;page&quot;) = &quot;&quot; Then
Response.Write &quot;<FORM name=b2 id=b2 action=chooseApp.asp>&quot;
Response.Write &quot;<INPUT name=back2 TYPE=submit id=back2 VALUE= BACK ></FORM>&quot;
Else
Response.Write &quot;<FORM name=b2 id=b2 action=allApps.asp>&quot;
Response.Write &quot;<INPUT name=back2 TYPE=submit id=back2 VALUE= BACK ></FORM>&quot;
End If
%>


I've tried it in straight html as well and came up with the same results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top