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

Conditional Text using if else statements

Status
Not open for further replies.

simonWMC2

Programmer
Aug 5, 2004
161
GB
Hi

I am trying to create a dynamic text box that tells the user if they have passed or failed a quiz.

Code:
if (QuizTrack.percent_format = '<70') {
resultsText.text = "congratulations you have passed";}
else {
resultsText.text = "you have failed to score 70% or higher, please try again";
}

however, this isn't working - can anyone see where i am going wrong ?

thanks
 
I worked it out - i didn't need the =

thanks anyway
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top