Jump to content
Sign in to follow this  
raghup

Replacing hyperlink with buttons..

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...