Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently May 18th, 2024, 5:53 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: problems with apostrophe ' for IF ... ELSE actions
PostPosted: April 8th, 2018, 9:39 am 
Offline

Joined: August 5th, 2010, 1:42 pm
Posts: 109
Opus: Creator v9 Opus v7
OS: windows
Hi,
I'm using the IF... ELSE programming actions in a language exercise to show 2 different icons if the answers in some text input boxes are correct or wrong. The input boxes are linked to variables, but I found in the IF part;
“IF Test (variable) Condition (name of variable) Comparison (is equal) Compare with (text)”
that here, in the “compare with text” box I can't use the apostrophe '. For html publication the page goes black if I include the apostrophe. So I can't compare answers like I'm, she's, you can't, etc.
I was wondering if there is any other way to include the apostrophe as the correct text to compare with the input text.


For this message Isma has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: problems with apostrophe ' for IF ... ELSE actions
PostPosted: April 8th, 2018, 12:09 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Use an escape character.

Code:
she\'s


</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: problems with apostrophe ' for IF ... ELSE actions
PostPosted: April 8th, 2018, 4:23 pm 
Offline

Joined: August 5th, 2010, 1:42 pm
Posts: 109
Opus: Creator v9 Opus v7
OS: windows
Thanks mack. It works. Not in preview mode, that shows the result as error, although the page won't turn black,
but it works when published and that's the important thing.


For this message Isma has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: problems with apostrophe ' for IF ... ELSE actions
PostPosted: April 9th, 2018, 7:45 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
No, it fixes the HTML code which you can't preview in Opus - so the backslash will be treated literally as a string in preview mode and fail.

Glad it solves the published version though.

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group