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

Recordset Navigation

Status
Not open for further replies.

ShawnDT

Technical User
May 1, 2006
67
US
Good Morning,

I am sure this is an eZ one. Is there anyway to, swap Navigation buttons to an inactive image or grey out certain button when your reach the end of a recordset.

To clear up. I have the typical << < > >>(Navigation). I want to once it reaches the end of the record(Next and Last) grey out or swap image with an inactive image. This will be the same with Previous and First record.

Code example would be nice

Thank you
 
Just use the EOF property of your recordset (or BOF for the start) in an IF statement

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Thanks, I figured it out. Got another question for you. I receive an error on the mouseover event for the custom navigation. I get the error message object expected. It also showing that it is barking at the Body onload. I have posted some code can anyone help me with this?


<body onload=javascript:MM_showHideLayers('laySelect','','show','layUpdate','','hide','layInsert','','hide');MM_preloadImages('Templates/RecordNavBar/first_sunken.gif')>
<div id="laySelect" style="position:absolute; left:25px; top:25px; width:509px; height:340px; z-index:3; visibility: visible;">

<table width="500" border="0" cellspacing="2" cellpadding="2">
<tr>
<td colspan="4"><!-- #BeginLibraryItem "/Library/MainRecnavNED.lbi" -->
<style type="text/css">
<!--
@import url("../CSS/NRCG.css");
-->
</style>
<div class="Nav" id="layRecordNavBar" style="position:absolute; left:0px; top:0px; width:614px; height:10px; z-index:3; background-color: #FFFFFF; layer-background-color: #FFFFFF; border: 1px none #000000; visibility: visible;">
<table width="600" border="0" cellpadding="0" cellspacing="0">
<tr height="16">
<td width="82">&nbsp;
<label>Record</label>
: </td>
<td width="24"><a href="/DB/producerdetail_contacts.asp?index=0"><img src="Templates/RecordNavBar/first.gif"
alt="first record" name="first" border="0" id="first"
onmousedown="MM_swapImage('first','','Templates/RecordNavBar/first_sunken.gif',1)"
onmouseup="MM_swapImgRestore()"
onmouseover="MM_swapImgRestore()" onmouseout="MM_swapImgRestore()" /></a></td>
<td width="24"><a href="/DB/producerdetail_contacts.asp?index=0"><img src="Templates/RecordNavBar/previous.gif"
alt="previous record" name="previous" border="0" id="previous"
onmousedown="MM_swapImage('previous','','Templates/RecordNavBar/previous_sunken.gif',1)"
onmouseup="MM_swapImgRestore()"
onmouseover="MM_swapImgRestore()" onmouseout="MM_swapImgRestore()" /></a></td>
<td width="70">&nbsp;
<input name="textfield" type="text" value="1" size="5" maxlength="6"/>
&nbsp;</td>
<td width="24"><a href="/DB/producerdetail_contacts.asp?index=1"><img src="Templates/RecordNavBar/next.gif"
alt="next record" name="next" border="0" id="next"
onmousedown="MM_swapImage('next','','Templates/RecordNavBar/next_sunken.gif',1)"
onmouseup="MM_swapImgRestore()"
onmouseover="MM_swapImgRestore()" onmouseout="MM_swapImgRestore()" /></a></td>
<td width="24"><a href="/DB/producerdetail_contacts.asp?index=-1"><img src="Templates/RecordNavBar/last.gif"
alt="last record" name="last" border="0" id="last"
onmousedown="MM_swapImage('last','','Templates/RecordNavBar/last_sunken.gif',1)"
onmouseup="MM_swapImgRestore()"
onmouseover="MM_swapImgRestore()" onmouseout="MM_swapImgRestore()" /></a></td>
<td width="167">&nbsp;of&nbsp;<span class="Data">1</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td width="43"><input name="butNew" type="submit" class="Nav" id="butNew" onclick="javascript:fnNewRecord()" value="NEW"> </td>
<td width="44"><input name="butEdit" type="submit" class="Nav" id="butEdit" onclick="javascript:fnEditRecord()" value="EDIT" /> </td>
<td width="114"><input name="butDelete" type="submit" class="Nav" id="butDelete" onclick="javascript:fnDeleteRecord()" value="Delete" /> </td>
</tr>
</table>
</div>
<!-- #EndLibraryItem --></td>
 
Check out faq222-2244 for forum usage guidelines.

1. Choose appropriate forum - Javascript = forum216

2. New question - new thread

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top