SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old January 13th, 2004, 06:21 AM
ThePaulius ThePaulius is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: London
Posts: 17 ThePaulius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Dynamic Button Label

Hi, im trying to dynamically label a submit button, later on i will want to enable/disable the button depending on the value of hasVoted.. Im not a programmer (can you tell lol) and i know theres alwas a better way of doing things



<%
Dim hasVoted
Dim hasVotedButtonLabel, hasVotedButtonType
hasVoted = (memRS.Fields.Item("Voted").Value)

IF hasVoted=("Y") THEN
Response.Write("You Have Already Voted.")
hasVotedButtonLabel = "Disabled"
hasVotedButtonType = "Button"
ELSE
Response.Write("Please Vote.")
hasVotedButtonLabel = "Submit"
hasVotedButtonType = "Submit"
END IF
%>

.
.
.
.
.
.
<INPUT TYPE="<% Response.Write(hasVotedButtonType) %>" NAME="Submit" VALUE="<% Response.Write(hasVotedButtonLabel) %>">

Last edited by ThePaulius : January 13th, 2004 at 06:59 AM.

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > Dynamic Button Label


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT