dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: Web
Expertise: Intermediate
Feb 11, 1999

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


Hide Unnecessary Navigation Buttons Using DHTML

Hide your navigation buttons using DHTML when you don't need them. Imagine a page with a databound table on it showing ten rows of data. When you're at the beginning or end of the table, either the "Previous" or the "Next" button is not needed. The following code shows how to play "peek-a-boo" with the buttons. When you're at the start of the table the "Previous" button is hidden while the "Next" button is displayed and at the end of the table the "Next" button is hidden while the "Previous" button is displayed.
 
Sub SetNavigationDisplay()
	'Set display for Previous Button
	If miPageNumber = 1 Then
		cmdPrevious.style.display = "none"
	Else
		cmdPrevious.style.display = ""
	End If

	'Set display for Next Button
	If miPageNumber = MaxPage Then
		cmdNext.style.display = "none"
	Else
		cmdNext.style.display = ""
	End If
End Sub
Mike Gasperino
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date