[Javascript] Non-breaking equation

Del Wegener del at delweg.com
Fri Jan 6 09:08:36 CST 2006


Good Morning;

I use variables to hold potential responses to quiz questions.
Depending on a student's response to a question, I choose a response
variable and display its contents in a text field with a statement like
quiz.feedback.value = wrongResponse1;

I do not want mathematical equations to be broken at the end of a line.
A typical variable assignment  might be:
wrongResponse1 = " When 3 is substituted into the equation we obtain the
false statement 4(3) - 7(3) = 47.   Therefore 3 is not a solution of the
equation."

How do I prevent a line-break in the statement 4(3) - 7(3) = 47?
How do I force a line-break at the beginning of the statement 4(3) -
7(3) = 47 ?

I really do not want to use several variables.
Thanks for any help.

You can view the problem at
http://www.drdelmath.com/college_algebra/practice_quizzes/selection_graphs_of_equations_q1.htm

Del
del at delweg.com




More information about the Javascript mailing list