/    Sign up×
Community /Pin to ProfileBookmark

validation queries

It’s that time of programming again…

Anyone know how I can make a “–” sign, meaning “minus one” validate? The validator thinks it’s part of a comment…

Thanks, and apologies if these problems get a little repetitive – 42 errors to go!

to post a comment
JavaScript

9 Comments(s)

Copy linkTweet thisAlerts:
@MrNobodyJan 22.2009 — You're going to have to show the related (failing) instructions.
Copy linkTweet thisAlerts:
@javascriptloverauthorJan 22.2009 — Sure:


Line 87, Column 50: invalid comment declaration: found character ";" outside comment but inside comment declaration.

score--;

Check that you are using a proper syntax for your comments, e.g: <!-- comment here -->. This error may appear if you forget the last "--" to close one comment, and later open another.

Line 9, Column 0: comment declaration started here.

<!-- /* Hide content from old browsers */
[/QUOTE]
Copy linkTweet thisAlerts:
@MrNobodyJan 22.2009 — Are you saying that it is some 3rd-party validator which is reporting this? If so, is your entire script within comment tags even though this is not supposed to be required anymore? What document type (HTML, XHTML, XML) and what DOCTYPE are you using?
Copy linkTweet thisAlerts:
@javascriptloverauthorJan 22.2009 — It's the standard w3c validator. I'm writing in XHTML Transitional 1.0 -

[code=html]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
[/code]
Copy linkTweet thisAlerts:
@skywalker2208Jan 22.2009 — can you show the part of the code that is faltering?
Copy linkTweet thisAlerts:
@MrNobodyJan 22.2009 — It's the standard w3c validator. I'm writing in XHTML Transitional 1.0[/QUOTE]
Doesn't XHTML require CDATA type comments around the script?
Copy linkTweet thisAlerts:
@javascriptloverauthorJan 22.2009 — The relevant script is
[CODE]

function(){
yourmark--
}
[/CODE]


  • - it's having trouble with the -- of yourmark.
  • Copy linkTweet thisAlerts:
    @MrNobodyJan 22.2009 — Did you see my response above?
    Copy linkTweet thisAlerts:
    @javascriptloverauthorJan 22.2009 — ok, thanks.
    ×

    Success!

    Help @javascriptlover spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.18,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...