Navigation buttons

A

Amateur

Dear Sirs,

I have the following code for my record navigation:

If Current_Page <> 1 Then
Response.Write%><a
href="http://www.myweb.com/test/3test.asp?Page=<%=Current_Page - 1 %>"><img
src="http://www.myweb.com/BIE/images/PREVIOUS.bmp"></a>
<%
End If

As you see I am using a button for this and everything is working fine.
I would like to use this:

<input type="button" value="¦<"
onClick="http://www.myweb.com/test/3test.asp?Page=<%=Current_Page - 1
%>"><%=ShowTextOnPic("Primero orden")%> Class="formpagebutton">

Somehow I cannot figure out what is wrong - it's just simple not functioning.
Can someone help me?
Klaus
 
D

David Berry

You can't use on OnClick event to do the navigation unless you create the
JavaScript that handles it. You could just put FORM tags around the button
as an easy way to solve the problem. Ex:

<form method="post"
action="http://www.myweb.com/test/3test.asp?Page=<%=Current_Page - 1 %>">
<input type="submit" value="Next Record" name="btnnext"
class="formpagebutton">
</form>
 
A

Amateur

Great, if you could tell me as well how to align this button in the center
than I am ready and not bothering anymore.
Thanks
Klaus
 
A

Amateur

Sorry for paging twice the same question, I am a bid confused today. I want
to finish this project and I am already up +/- 17 hours. Sorry, will not
happen again.
I tried what you said in different wys. The last one is here and it's as
well not centering.
Any idea?

If Current_Page <> 1 Then
Response.Write%><center><form method="Post"
action="http://www.myweb.com/BIE/BIEmotor/4...9000/optionoffsetorders430010009000.asp?Page=<%=Current_Page
- 1 %>"><input type="submit" value="<< registro anterior" name="btnnext"
class="formpagebutton">
</form></center>
<%
End If
 
S

Stefan B Rusynko

Why are you even using Response.Write
All you need is

<% If Current_Page <> 1 Then%>
<div align="center"><form method="Post"
action="http://www.myweb.com/BIE/BIEmotor/4...9000/optionoffsetorders430010009000.asp?Page=<%=Current_Page-1 %>">
<input type="submit" value="<< registro anterior" name="btnnext" class="formpagebutton">
</form></div>
<% End If %>

If it doesn't center check you style for the class="formpagebutton" which may be setting alignment

Suggest you spend some time at http://www.w3schools.com/asp/default.asp

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| Sorry for paging twice the same question, I am a bid confused today. I want
| to finish this project and I am already up +/- 17 hours. Sorry, will not
| happen again.
| I tried what you said in different wys. The last one is here and it's as
| well not centering.
| Any idea?
|
| If Current_Page <> 1 Then
| Response.Write%><center><form method="Post"
| action="http://www.myweb.com/BIE/BIEmotor/4...9000/optionoffsetorders430010009000.asp?Page=<%=Current_Page
| - 1 %>"><input type="submit" value="<< registro anterior" name="btnnext"
| class="formpagebutton">
| </form></center>
| <%
| End If
|
| "David Berry" wrote:
|
| > <center> button </center>
| >
| > --
| > David Berry
| > FrontPage Support: http://www.frontpagemvps.com/
| >
| >
| >
| > | > > Great, if you could tell me as well how to align this button in the center
| > > than I am ready and not bothering anymore.
| > > Thanks
| > > Klaus
| > >
| > > "David Berry" wrote:
| > >
| > >> You can't use on OnClick event to do the navigation unless you create the
| > >> JavaScript that handles it. You could just put FORM tags around the
| > >> button
| > >> as an easy way to solve the problem. Ex:
| > >>
| > >> <form method="post"
| > >> action="http://www.myweb.com/test/3test.asp?Page=<%=Current_Page - 1 %>">
| > >> <input type="submit" value="Next Record" name="btnnext"
| > >> class="formpagebutton">
| > >> </form>
| > >>
| > >> --
| > >> David Berry
| > >> FrontPage Support: http://www.frontpagemvps.com/
| > >>
| > >>
| > >> | > >> > Dear Sirs,
| > >> >
| > >> > I have the following code for my record navigation:
| > >> >
| > >> > If Current_Page <> 1 Then
| > >> > Response.Write%><a
| > >> > href="http://www.myweb.com/test/3test.asp?Page=<%=Current_Page - 1
| > >> > %>"><img
| > >> > src="http://www.myweb.com/BIE/images/PREVIOUS.bmp"></a>
| > >> > <%
| > >> > End If
| > >> >
| > >> > As you see I am using a button for this and everything is working fine.
| > >> > I would like to use this:
| > >> >
| > >> > <input type="button" value="¦<"
| > >> > onClick="http://www.myweb.com/test/3test.asp?Page=<%=Current_Page - 1
| > >> > %>"><%=ShowTextOnPic("Primero orden")%> Class="formpagebutton">
| > >> >
| > >> > Somehow I cannot figure out what is wrong - it's just simple not
| > >> > functioning.
| > >> > Can someone help me?
| > >> > Klaus
| > >>
| > >>
| > >>
| >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Form input type alignment 1
Debugging 8
Printing a page 3
Java Script problem - really urgent help needed 1
Pages in Inline frames 1
Log-in Form 1
Formpagetablefield formatting 2nd part 0
ASP and HTML 6

Top