Create an href link within my javascript code

This should be really simple. I want to put a simple link in some output code that I have in javascript. The code I have is attached.

Why won't simple <a href> tags render in javascript?
options.statusUpdate = function( quizInfo, $currQuiz ){
        if( quizInfo.hasQuit ){
            var response = "If you are interested in receiving more information about spine care near you, we can help connect you with the experts in the Sutter Health network <a href="http://www.sutterhealth.org">Click Here</a> <br> <br> This information has been provided by Sutter Neuroscience Medical Group's spine surgeon <a href="http://www.sutterhealth.org/ProviderSearch/?sitecfg=75&action=providerdetail&masterid=5381&isLevelOne=">Dr. Gary Schneiderman.</a>"
			$( $currQuiz ).find( ".q-statDetails" ).hide();
			$( $currQuiz ).find( ".q-extraStat" ).html( response );

        }

Open in new window

modmediaAsked:
Who is Participating?
 
modmediaConnect With a Mentor Author Commented:
Thanks Andy, but that's not what I am looking for either. After googleing, I found that if I put the URL's in single quotes (') rather than double quotes (") it works.

Thanks for your efforts!
0
 
UK_AndyCommented:
0
 
modmediaAuthor Commented:
Thanks Andy, but I've seen this already. My problem is that I am trying to implement this within a javascript script already. I have posted the entire code for reference. Towards the end is where you will find my first code snippet.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
	<title>Back Pain Quiz</title>
	<link rel="stylesheet" type="text/css" href="css/jQuizMe.css"/>
</head>
<body>
	<div id="quizArea"/>
</body>
<script type="text/javascript" src = "js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jQuizMe-uncompressed.js"></script>
<script type="text/javascript">
// There was an extra comma at the end of multiList array.
$( function($){
	var quizMulti = {
    multiList: [{
        ques: "The best over-the-counter medicine to take for back pain is:",
        ans: "All of the above",
        ansSel: ["Ibuprofen", "Acetaminophen (e.g., Tylenol)", "Asprin", null],
		ansInfo: "Acetaminophen will provide pain relief, while Ibuprofen and aspirin will help with the pain and reduce inflammation."
    },
	
	{
		ques: "The best exercise for a sore lower back is:",
        ans: "A long, slow walk",
        ansSel: ["A strenuous spinning class (work out the kinks)", "Yoga", null, "Nothing at all"],
		ansInfo: "Walking is a great way to gently exercise the back and eliminate the stiff, tight muscles that can lead to back problems. Avoid strenuous exercises and/or forced stretching that may aggravate the problem."

	},
	{
		ques: "Bed-rest is the best way to treat severe back pain",
		ans: "False",
		ansSel: ["True", null],
		ansInfo: "Generally, bed-rest is only beneficial for the first 1 - 2 days after onset of back pain. Prolonged bed-rest can result in a number of medical problems, including loss of muscle strength and even blood clots. Try to remain as active as possible for both your physical and mental well-being."
	
	},
	{
		ques: "Some lower back problems may be felt in the legs instead of the back itself, true or false?",
		ans: "True",
		ansSel: [null, "false"],
		ansInfo: "Lower back problems can lead to pressure on the nerves that go to your legs. This can cause pain on your legs, loss of feeling or weakness."
				
	},
	{
        ques: "What puts a person most at risk for back pain?",
        ans: "All of the above",
        ansSel: ["Weak abdominal muscles", "Long hours of sitting", "Being overweight", "Tight hip muscles", null],
		ansInfo: "Activity and exercise help reduce the incidence and intensity of back pain. Stretching reduces tight musculature which can contribute to back pain."
   
    },
	{
        ques: "What is the best kind of seating for someone with back pain?",
        ans: "Any seat with a pillow or support for the lower back and/or a chair with arms",
        ansSel: ["A wooden, straight-backed chair", "A reclining chair", "A soft, fluffy sofa", null],
		ansInfo: "The key is support. Look for seating that allows your feet to touch the ground while also supporting your lower back. Many seating arrangements can be made more back-friendly by simply placing a cushion behind the lower back."
    },
	{
		ques: "The more severe the back pain, the more likely a person needs surgery",
		ans: "False",
		ansSel: ["True", null],
		ansInfo:"Surgery for back pain is only indicated for very specific conditions. While severity and limitations of activity play a part in the decision process, the cause of pain is a very important part in the decision-making process regarding surgery."
		
    },
	{
		ques: "Which is most successful in treating back problems?",
        ans: "Varies depending on condition",
        ansSel: ["Chiropractic manipulation", "Regular massage and yoga", "Surgery", "Physical therapy", null],
		ansInfo: "The treatment is dependent on the type of symptoms, the physical exam and the diagnostic studies. All of the above treatments can play a part in treating your back pain. The treatment method is based on taking all three into consideration."
		
	},
	{
		ques: "What is the average recovery time for back pain?",
        ans: "2-6 weeks",
        ansSel: ["3-7 days", null, "2 months", "6 months"],
		ansInfo: "More than 90 percent of people with back pain will be better by six weeks."
	
	},
	{
		ques: "Which sleeping position is best for people who have back problems?",
        ans:  "On the side with a pillow between the knees",
        ansSel: ["Flat on the back with no pillow", "On the stomach", "On the back with support underneith the backs of the knees", null],
		ansInfo: "In general D, however any position that is comfortable is okay."
		
	},
	{
		ques: "You should see your doctor about back pain if:",
        ans:  "All of the above",
        ansSel: ["It doesn't improve after a few days", "It is accompanied by weakness or numbness in one or both of your legs", "It is accompanied by any loss of bladder or bowel control", "Any fever, history of infection or cancer, and/or pain that doesn't reduce with rest", null],
		ansInfo: "Any of the above could indicate the presence of a serious medical condition. Consult your physician if any of the above are present."
		
	}]		
	

	};
	options = {
		help: "All the information required can be found in the <a href='introduction/'>Introductory Lesson</a>. You can go through the lesson again if you struggle with this quiz.",
		showHTML: true,
		animationType: 0,
		showWrongAns: false,
		title: "Back Pain Quiz",
		help: 'None',
		disableRestart: true
};
options.allRandom = false;
options.random = false;
options.showAnsInfo = true;
// declare quiz and options 
options.statusUpdate = function( quizInfo, $currQuiz ){
        if( quizInfo.hasQuit ){
            var response = "If you are interested in receiving more information about spine care near you, we can help connect you with the experts in the Sutter Health network <a href="http://www.sutterhealth.org">Click Here</a> <br> <br> This information has been provided by Sutter Neuroscience Medical Group's spine surgeon <a href="http://www.sutterhealth.org/ProviderSearch/?sitecfg=75&action=providerdetail&masterid=5381&isLevelOne=">Dr. Gary Schneiderman.</a>";
			$( $currQuiz ).find( ".q-statDetails" ).hide();
			$( $currQuiz ).find( ".q-extraStat" ).html( response );

        }
 };
$("#quizArea").jQuizMe(quizMulti, options);
});
</script>
</html>

Open in new window

0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
modmediaAuthor Commented:
The code starts at line 110 as posted above
0
 
UK_AndyCommented:
I've noticed you have several a href link ref do they all not work correctly ?
0
 
modmediaAuthor Commented:
right... the 2 that are in the "var response" array are the ones that do not work.
0
 
UK_AndyCommented:
<frameset rows="100%">
  <frame src="http://www.example.com/">
</frameset>
<noframes>
  <body>Please follow <a href="http://www.example.com/">link</a>!</body>
</noframes>
0
 
UK_AndyCommented:
No problem glad you sorted it.
0
 
modmediaAuthor Commented:
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.