Jump to content

Replacing hyperlink with buttons..


raghup

Recommended Posts

Hi,I have this navigating table at the bottom of the main table on the web page. What is the syntex for replacing the hyperlink with buttons? I am using asp with vbscript.

<table border="0" width="15%" align="center">  <tr>	<td width="25%" align="center">	  <% If MM_offset <> 0 Then %>	  <a href="<%=MM_moveFirst%>">First</a>	  <% End If ' end MM_offset <> 0 %>	</td>	<td width="25%" align="center">	  <% If MM_offset <> 0 Then %>	  <a href="<%=MM_movePrev%>">Previous</a>	  <% End If ' end MM_offset <> 0 %>	</td>	<td width="25%" align="center">	  <% If Not MM_atTotal Then %>	  <a href="<%=MM_moveNext%>">Next</a>	  <% End If ' end Not MM_atTotal %>	</td>	<td width="25%" align="center">	  <% If Not MM_atTotal Then %>	  <a href="<%=MM_moveLast%>">Last</a>	  <% End If ' end Not MM_atTotal %>	</td>  </tr></table>

I tried this

<form><table border="0" width="15%" align="center">  <tr>	<td width="25%" align="center">	  <% If MM_offset <> 0 Then %>	<input name="First" type="button" onClick="<%=MM_MoveFirst%>" value="First" />	  <% End If ' end MM_offset <> 0 %>	</td>	<td width="25%" align="center">	  <% If MM_offset <> 0 Then %>	  <input name="Previous" type="button" onClick="<%=MM_MovePrevious%>" value="Previous" />	  <% End If ' end MM_offset <> 0 %>	</td>	<td width="25%" align="center">	  <% If Not MM_atTotal Then %>	  <input name="Next" type="button" onClick="<%=MM_MoveNext%>" value="Next" />	  <% End If ' end Not MM_atTotal %>	</td>	<td width="25%" align="center">	  <% If Not MM_atTotal Then %>	  <input name="Last" type="button" onClick="<%=MM_MoveLast%>" value="Last" />	  <% End If ' end Not MM_atTotal %>	</td>  </tr></table></form>

what have I done wrong? I want to replace the following hyperlink with a button too.

<a href="<%=(rsDefault.Fields.Item("MaxOfeditPageLink").Value)%>?id=<%=(rsDefault.Fields.Item("MaxOfanID").Value)%>" class="rating style5">Modify</a>

ThanksCheersRaghu

Link to comment
Share on other sites

  • 3 weeks later...

Hi, I think the "MM_MoveFirst" is a link, right?So, I think the whole script should be

<table border="0" width="15%" align="center">  <tr>	<td width="25%" align="center">	  <% If MM_offset <> 0 Then %>	<input name="First" type="button" onClick="java script:window.location.href='<%=MM_MoveFirst%>'" value="First" />	  <% End If ' end MM_offset <> 0 %>	</td>	<td width="25%" align="center">	  <% If MM_offset <> 0 Then %>	  <input name="Previous" type="button" onClick="java script:window.location.href='<%=MM_MovePrevious%>'" value="Previous" />	  <% End If ' end MM_offset <> 0 %>	</td>	<td width="25%" align="center">	  <% If Not MM_atTotal Then %>	  <input name="Next" type="button" onClick="java script:window.location.href='<%=MM_MoveNext%>'" value="Next" />	  <% End If ' end Not MM_atTotal %>	</td>	<td width="25%" align="center">	  <% If Not MM_atTotal Then %>	  <input name="Last" type="button" onClick="java script:window.location.href='<%=MM_MoveLast%>'" value="Last" />	  <% End If ' end Not MM_atTotal %>	</td>  </tr></table>

The "javascript"s above is only one word.**I hope my suggestion could help you. :)Theodore

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...