I am using strict HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
in my website. validator.w3c.o rg gives me lots of errors within my javascript code, such as:
'<B>a</B>...Line 24, Column 40: end tag for element "B" which is not open'
The validator does not recognize the start tag <B>, just the end tag </B>....
User Profile
Collapse
-
Reverse Solidus (Backslash) Necessary?
-
drhowarddrfine
I looked up the reference you suggested. It didn't quite meet my needs. One issue is that many of my answers are numeric, with students allowed to submit answers that are within a percentage of the correct answer. For example, if the answer is 100, and there is a 3% window, answers between 97 and 103 are accepted as correct. -
Thanks, Richard. That would be great. It could save me a lot of work in hand-encoding the answers.
SystomxLeave a comment:
-
Rabbit --
You said "You can disable the context menu but they can just click on view > source in their toolbar."
Well, yes and no. Using the tools menu/view source on Chrome, Firefox, and Safari shows the parent page (the frameset page), which doesn't have the answer.
Still, I realize that what I've got is not really a fix for the problem, but more of a deterrent.
(sigh) I may have...Leave a comment:
-
Thanks for your posts.
What I have now done is to include the following javascript code in an include file. The include file is called in the HEAD of each of the tutorial pages.
Code://Code to block access to context menu window.oncontextmenu = function() {return false;}
...Leave a comment:
-
Hiding a part of an html page
I provide online tutorials for my students. Each page contains a question, which the student must answer. The answer is in javascript like this example:
Code:corAns = 17
I could encrypt the entire page, but that seems like overkill. Is there a slick way to encrypt one line of... -
Once again, thanks to all who have responded. Aside from server-side maneuvers, many of you have been suggesting encrypting. I don't need to encode an entire page, I just have to encode the answer. Is there an easy way to do that?Leave a comment:
-
Thanks for your responses, Rabbit and Zorgi. I'm hoping for something a bit simpler than you have suggested. I've experimented with modifying the body tag as shown below:
Code:<body "oncontextmenu = return false;">
...Leave a comment:
-
Foiling the cheaters
I teach electrical engineering, and I have a series of 20 or so html/javascript tutorials for my students. Each page of each tutorial asks a question, which the student must answer. The answers are in the javascript, like this:
Code://Define variables: //Correct answer (use quotes for alpha-numeric, no quotes for numeric): var corAns = 5;
No activity results to display
Show More
Leave a comment: