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!

Conditional display of button?

Status
Not open for further replies.

harmonybook

Technical User
Jun 9, 2010
1
US
We are displaying results from an Access database that includes a select button to open an associated .mp3 preview clip for some products. We need to find a way to have that button display only when such a file exists - which is only for half of the products. Everything we have tried has the button always appear for all products, which would then cause an error if the site user clicked on it. Any idea how we can make that displayed item & link conditional?
 
Do it from the server side (asp). If the file exists on the server, write out the button
Code:
<% if fso.FileExists ("xxx.mp3") then %>
<input type="button" name="playmp3" value="Play">
<% end if %>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top