JavaScript - Javascript Caused Ie Font Rendering Problem?
Hi there,
I am having a problem with IE rendering the font of my website poorly, but only when the javascript code is allowed... The website is he www.thelivingsacred.co.uk And as you can see, there is a huge difference between IE8's rendering of the site once the scripts are allowed, and before, as well as a difference between IE8 and Firefox. Please could someone explain what's going on? Similar TutorialsHello, We have a "Rate This Page" at the bottom of all of our website pages [URL]http://jpl.coj.net[URL] The form was created with javascript and has an associated asp file. Can Captcha even be put into a form created strictly with javascript? It's gotten out-of-control....we're getting approximately 1 spam every minute. I've attached Word docs with the code associated with the form. In every page is the following code: [CODE] <a href="javascript:void(0);" onclick="sendFeedback(window.location);return false;">Rate This Page</a> [ICODE] Thank you for any help you can give me, Elbee I have a javascript-run rotating (as in rotating through a series of content, not rotating in a circle) div. Each content div has an image and a bit of text. The title text - bold arial - is really messy, as though it's a badly pixelated image - smudged, almost. the rest of the text - smaller and not bold - isn't bad, but still doesn't match text outwith these divs. it's fine in firefox, chrome, and even IE6!! Does anyone know what's happening in IE7? My javascript quits working when I am rendering the html? (It works perfectly fine if the page is opened from http address directly). I did some research and concluded that "JavaScript is executed on page load", so when I render my html, my JavaScript functions are not automatically called. My question is how should I call the javascript functions manually? verify.html: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML> <HEAD> <Title>form</Title> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <link rel="stylesheet" type="text/css" href="xupload.css"> </HEAD> <BODY> <form id="myform" enctype="multipart/form-data" action="/cgi-bin/upload.cgi" method="post" onSubmit="return StartUpload(this);"> <DIV id="div1"> <b><font id='x_max_files'>?</font> files <font id='x_max_size'>?</font> Mb total maximum</b> <div id="upload_input"><input id="my_file_element" type="file" name="file_1" size=58></div> <div id="files_list"></div> <p align=center><input type="submit" value="Upload Files" class="myForm" id="submit_btn"></p> </DIV> </form> <iframe src="javascript:false;" name="xupload" style="position:absolute;left:-9999px;"></iframe> <script type="text/javascript"> //Specify your form ID var x_form_id = 'myform'; var x_mode = 1; var x_tmpl_name = ''; </script> <script src="xupload.js" type="text/javascript"></script> </BODY> </HTML> config file: Code: htmlverify = "../verify.html" Perl: Code: if(my $verifypage = $g->{CV}{htmlverify}) { # passing variables xxxxx .... # render the page: send_header(); $p->pf($verifypage); } some js cannot work correctly (not sure whether it is caused by the browser IE8) cannot change the 'value' of a button dynamically: e.g. document.getElementById("bigbutton").value=event.clientX on IE8, the button doesn't change. however if i use xxx.innerHTML=event.clientX then it works anyone help explain? thx I have a javascript that randomly displays a different quote on my website. I have the quote programmed in, and they show up, but the text is tiny. I need help making the text bigger. I am a beginner at this, so i would appreciate help. This is the code: Code: <script language='JavaScript'> function random_content(){ var mycontent=new Array() mycontent[1]='Repent! The end is coming! Were out of chips!' mycontent[2]='I WANT, TO EAT, A DINOSAUR.' mycontent[3]='Last night I lay in bed looking up at the stars in the sky and I thought to myself, where the heck is the ceiling.' mycontent[4]='IT\'S A TRAP!' mycontent[5]='tardo power,activate!' mycontent[6]='LMS if ur gay' mycontent[7]='1,2,...5!' mycontent[8]='Box O Digletts' mycontent[9]='Justice is best served cold, with a side of ranch dressing' mycontent[10]='umm...I got nothing...awkward' mycontent[11]='Once you visit you can never leave' mycontent[12]='50% CaCow' mycontent[13]='almost racist free!' mycontent[14]='The last thing I want to do is hurt you. But it\'s still on the list' mycontent[15]='BOOM! Left turn!' mycontent[16]='Redrum' mycontent[17]='If 4 out of 5 people SUFFER from diarrhea... does that mean that one enjoys it?' mycontent[18]='Never, under any circumstances, take a sleeping pill and a laxative on the same night' mycontent[19]='the beginning of the end' mycontent[20]='Flaming fireballs Batman!' mycontent[21]='gotta catch em\' all' mycontent[22]='for the african children!' mycontent[23]='One sexy thang' mycontent[24]='It\'s Tardolicious!' mycontent[25]='That\'s no moon!' mycontent[26]='Caboose is god?' mycontent[27]='MLIT' var ry=Math.floor(Math.random()*mycontent.length) if (ry==0) ry=1 document.write(mycontent[ry]) } random_content() //--> </script> Hi sorry if this is a very simple question but how do I change the font color for certain elements of this javascript code that the client sees on their brower? This is a count down script and I have made the code red that I am trying to change - any idea how to do this? Thanks v much!!!! <script type="text/javascript"> var today=new Date() //Enter the occasion's MONTH (1-12) and DAY (1-31): var theoccasion=new Date(today.getFullYear(), 03, 21) //Customize text to show before and on occasion. Follow grammer below: var beforeOccasionText="until this event" var onOccasiontext="Event is Today!" var monthtext=new Array("Jan","Feb","Mar","April","May","June","July","Aug","Sep","Oct","Nov","Dec") theoccasion.setMonth(theoccasion.getMonth()-1) //change to 0-11 month format var showdate="("+monthtext[theoccasion.getMonth()]+" "+theoccasion.getDate()+")" //show date of occasion var one_day=1000*60*60*24 var calculatediff="" calculatediff=Math.ceil((theoccasion.getTime()-today.getTime())/(one_day)) if (calculatediff<0){ //if bday already passed var nextyeartoday=new Date() nextyeartoday.setFullYear(today.getFullYear()+1) calculatediff=Math.ceil((nextyeartoday.getTime()-today.getTime())/(one_day)+calculatediff) } //Display message accordingly var pluraldayornot=(calculatediff==1)? "day" : "days" if (calculatediff>0) document.write("<b>"+calculatediff+" "+pluraldayornot+" "+beforeOccasionText+" "+showdate+"</b>") else if (calculatediff==0) document.write("<b>"+onOccasiontext+" "+showdate+"!</b>") </script> Hi all, i'm using this code: Code: var r_text = new Array (); r_text[0] = "Random Text 0"; r_text[1] = "Random Text 1"; r_text[2] = "Random Text 2"; r_text[3] = "Random Text 3"; r_text[4] = "Random Text 4"; r_text[5] = "Random Text 5"; r_text[6] = "Random Text 6"; r_text[7] = "Random Text 7"; r_text[8] = "Random Text 8"; var i = Math.floor(9*Math.random()); { document.write("<Marquee SCROLLAMOUNT=10><FONT-FAMILY: 'Calibri'><FONT-SIZE: 13pt)<B><FONT COLOR='#FFFF00'>" + r_text[i] + "</FONT></B></FONT-SIZE></FONT-FAMILY></Marquee>"); } This code works as far as me getting a right to left marquee, which, every time the page reloads, generates one of the random pieces of text. I'd like to add a piece of coding to this so that on mouseover, the marquee will pause, but I don't have a clue what to add, or where. My other problem: The text is yellow..size 10, yet whatever font family i specify, will ALWAYS appear in the font Georgia (in the browser im using, Firefox.) in both Opera and IE, it comes out Times New Roman! this is a real rooky problem, but i am a rooky and i'd just like to understand why, and how to ACTUALLY get Calibri. Any help would be greatly appreciated I got an index.php Code: <html> <form action="bacakomik.php" method='post'> <select name="kodekomik"> <option value='../komik1/|23'>Judul Komik1</option> <option value="../komik2/|20">Judul Komik2</option> <option value="../komik3/|10">Juduk Komik3</option> <option value="../komik4/|20">Judul Komik4</option> </select> <input type="submit" /> </form> <?php echo ('<select>'); echo ('<option value= "'.$i.'">'.'Page '.$i.'</option>'); echo ('</select>'); ?> </html> As you can see, each of the option brings specific value "../komik1/|23" komik1 is a directory | is a delimiter 23 is the pages in one chapter and can be considered also as how many images are there on a specific directory This is my bacakomik.php Code: <?php $dirkomik = $_POST['kodekomik']; $exploded = explode("|", $dirkomik); echo ($exploded[0]); //picture directory echo ("<br>"); echo ($exploded[1]); //total page in the comic $pagecount = (int)$exploded[1]; //Take last posted value, process it right away echo ('<FORM name="guideform"> '); echo ('<select name="guidelinks">'); $i=1; do { echo ('<option value= "'.$i.'">'.'Page '.$i.'</option>'); $i= $i+1; }while($i <= $pagecount); //Printing option and select echo ("</select>"); ?> <input type="button" name="go" value="Go!" onClick="document.getElementById('im').src=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value+'.png';"> </FORM> <img src="img0.jpg" id="im"> With the current code on bacakomik.php, I only can change the img src of id "im" in the same directory only. What I want is that the Javascript could "add" the "$exploded[0]" variable so that the picture can be loaded from different directory. Anyone can do this? I believe that the fix should be somewhere on input tag inside OnClick, or do you know where? Anyway, I found this on the net http://p2p.wrox.com/php-faqs/11606-q...avascript.html Please help me to those who can... Hi All, I'm building a featured content slider using AnythingSlider. It works fine in FF, Safari, Chrome, and IE8, but in IE7 it will not show the navigation buttons. Take a look at the site here. The navigation buttons are added by the script in a ul called thumbNav. This ul either doesn't load or can't be seen in IE7. Any help would be greatly appreciated as I've got to have this ready for the client by tonight. If any other info is necessary let me know and I'll provide it. Thanks very much, Mike Hi everyone, I've downloaded the curvy corners codes from the following address: http://www.curvycorners.net/downloads/ The instructions in the curvycorners.src.js file say that all i need to do is add the following piece of code which I've inserted into the head section: <script type="text/javaScript" src="js/curvycorners.src.js"></script> <style type="text/css"> <!-- p.round { -webkit-border-radius: 25px; -moz-border-radius: 25px; CCborderRadius: 25px; } --> </style> However, it's not rendering in opera and internet explorer. I wondered if someone could tell me where I'm going wrong? The is the xhtml I'm targeting: Code: <div id="content_wrapper"> <div class="accomm"> <h3 id="accomm"><a href="#" title="Quality accommodation"> Quality accommodation</a></h3> <p class="round">lam et deliciisqui cor resto il eos verciderit ee litate niam eaqui denihicae dolorio rpore, nisinim aut as eum alitior eriaesti atioreiunde erem is sin expelenet, verae dus, conseribus dit odit remqui volestias exceri ullam, con cullatiamet, ut ipite officil igenem non. <a href="about.php">Learn more...</a></p> <p id="fees"><a href="fees.php">Fee structure</a></p> </div> <div class="local"> <h3 id="local_area"><a href="#" title="Our local area"> Our local area</a></h3> <p class="round">lam et deliciisqui cor resto il eos verciderit ee litate niam eaqui denihicae dolorio rpore, nisinim aut as eum alitior eriaesti atioreiunde erem is sin expelenet, verae dus, conseribus dit odit remqui volestias exceri ullam, con cullatiamet, ut ipite officil igenem non. <a href="local_area.php">Learn more...</a></p> <p id="directory"><a href="directory.php">Hospital directory</a></p> </div> <div class="welcome"> <h3 id="packages"><a href="#" title="Welcome packages">Welcome packages</a></h3> <p class="round">lam et deliciisqui cor resto il eos verciderit ee litate niam eaqui denihicae dolorio rpore, nisinim aut as eum alitior eriaesti atioreiunde erem is sin expelenet, verae dus, conseribus dit odit remqui volestias exceri ullam, con cullatiamet, ut ipite officil igenem non. <a href="welcome_packs.php">Learn more...</a></p> <p id="map"><a href="location_map.php">Find us on the map</a></p> </div> </div> </div> Really appreciate any help. Hi there, I am presently banging my head against the wall, while working on an html5 game remake of a classic online game I have struck a problem, that should be a simple figure out and is crushing my brain. I need to produce a 2000x2000 tile map and render it to screen, add objects, remove objects, pick objects, all fine no problem, code for said has been dealt with. What I need to do is pre-render a 2000x2000 map as a base for my tile/object map to go on so to speak. Although I should be able to figure this quickly my brain keeps freezing. What I am after here is theory help really, although any code snippets are welcome. I need to render a tree in freemarker. I am not sure about what technology should be used. I was thinking Jquerys jsTree plugin. My requirements - 1. Tree control -Name and instead of Icon ,i want customized letters(A,B,C) that represents type of element. 2.I dont want dotted lines connecting root and children like folder tree. 3.collapsable. Please suggest what and how can i do .? What I am trying to achieve is when the Input Box value is increased or decreased using the up/down arrows that the new value will be writen to the Canvas, though the code I have works it dosent render properly. I also have a Span Tag absouletly positioned within the canvas which works perfectly but I'd like the Canvas text to work instead. Not sure if it's possible. Code: <!doctype html> <html> <head> <title></title> <!------------------------------------- STYLE -------------------------------------> <style type="text/css"> canvas { background:#222; } #length{ position:absolute; left:10px; top:10px; width:150px; } #text_in_canvas{ position:absolute; left:500px; top:100px; width:400px; font-style: normal; font-size: 25px; color: red; } </style> <!------------------------------------- CODE -------------------------------------> <script type="text/javascript"> var fps = 100; function draw_canvas() { var canvas = document.getElementById("myCanvas"); var context = canvas.getContext("2d");//returns drawing functions to allow the user to draw on the canvas. var width = canvas.scrollWidth; var height = canvas.scrollHeight; // var startPosX = (300); // Start Position from X axis var startPosY = (height - 50); // Start Position from Y axis // var length = document.getElementById("length").value; //Get's value from Text Input Box var text = "This is the number from Input Box: " + length; document.getElementById("text_in_canvas").innerHTML= text; //LEFT BLOCK context.beginPath(); context.rect(0, 0, 250, height); //position & size of left block context.fillStyle = 'black'; //background colour context.fill(); context.lineWidth = 0; context.strokeStyle = 'red'; context.stroke(); context.closePath(); //TEXT context.font = 'bold 28px sans-serif'; // set text font context.textAlign = 'center'; context.fillStyle = '#FFFFFF'; // set text color context.fillText(text, 548, 50); } </script> </head> <body onload="draw_canvas()"> <!-- CANVAS STARTS HERE --> <div id="" style="width:1000px;height:600;margin:auto;position:relative;"> <canvas id="myCanvas" width="1000" height="600" style="border:1px solid #000000;"></canvas> <!-- FORM BEGINS HERE --> <form id="my_form"> <label for="length">Outside too Outside Wallplate Measurement (millimeters):</label> <input type="number" id="length" name="length" step="1" min="0" max="" placeholder="" oninput="JavaScript: draw_canvas()"> </form> <span id="text_in_canvas"></span> <!-- FORM END's HERE --> </div> <!-- CANVAS END's HERE --> </body> </html> I am currently working on a simple site and I was looking into methods to take advantage of html partial rendering to make site maintenance easier without using a server side language. The code for the two pages is as follows: Main html page: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <link href="../css/main.css" rel="stylesheet" type="text/css"/> <link href="../css/default.css" rel="stylesheet" type="text/css"/> <title>Default</title> </head> <body> <div class="navigation" id="nav_div"> <iframe name="nav_frame" onload="loadNav()"></iframe> </div> <script type="text/javascript" language="javascript"> <!-- function loadNav() { nav_frame.location="../static_partials/navigation.htm"; } //--> </script> </body> </html> And the code of navigation.htm is: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <script type="text/javascript" language="javascript"> <!-- function iframeLoad() { parent.document.getElementById("nav_div").innerHTML = document.getElementById("navigation_divs").innerHTML; } //--> </script> <title>Navigation Partial</title> </head> <body onload="iframeLoad()"> <div id="navigation_divs"> </div> </body> </html> The works fine in IE, but in Firefox 3.5.7 the iframeLoad generates an exception. The exception states the following: Code: Permission denied for <file://> to get property Window.document from <file://>. Firefox doesn't seem to like my usage of the parent object in that way, but I am unsure of another way to do it without using a server side language. Hi all, I'm encountering a strange rendering issue with a chunk of code I'm developing. I'm building an object that will construct a drop down-esque menu. The menu has a function (addEntry) to add additional menu items to itself. When the user hovers over a menu entry - I add a class to the element to change the look (basically highlight it). However, when the mose moves over - some strange rendering occurrs and I can't quite seem to figure it out. Please have a look at the following fiddle, and click the link to open the menu. Edit fiddle - JSFiddle Hello, I have two arrays sd[16][16] and gd[16][16] in javascript. I need to compare the values of the arrays. Code: Code: var score=0; document.write("<table>"); for(c1=0; c1<16; c1++) { document.write("<tr>"); for(c2=0; c2<16; c2++) document.write("<td onClick='changeColor(this);'>" + gd[c1][c2] + "</td>"); document.write("</tr>"); } document.write("</table>"); function changeColor(tdd) { if(tdd.bgColor=='white') { tdd.bgColor='red'; if (gd[c1][c2] == sd[c1][c2]) score+=5; else score-=2; } else { tdd.bgColor='white'; } } function scc() { document.getElementById('scf').innerHTML = score; } </script> <br><br><center><button type='button' onclick='scc()'> Click to see current score</button> <p id="scf">0</p> </center> <br><br> <center><input type="submit" value="Get Solution"/></center> When I try to display score by clicking the "Click to see current score" button, the score is not displayed. Could someone please tell me the problem. Hi All, I am desperately pulling my hair out... can you help me understand how I can resolve the below errors: SCRIPT1028: Expected identifier, string or number calender.js, line 318 character 17 SCRIPT1006: Expected ')' blenheim-palace-lunch-cotswolds-p-170.html, line 88 character 35 SCRIPT5007: The value of the property 'getStartDate' is null or undefined, not a Function object blenheim-palace-lunch-cotswolds-p-170.html, line 643 character 7 For this web address... http://tinyurl.com/79msxqm What can I change to fix the issue? The site is working properly in all other browsers but not IE9. Hope you can help. Thanks. I have an html page with javascript on it, but the page will not work properly. Spent a lot of time on this and can not get it right. Wonder if someone ca help. Hi im wondering if someone could be of some help please, im a newbie to javascript and after some help and advice if possible please. Ive used a template from the web which was a quiz template. Im just trying to get my javascript script to work. I want it to populate my html question/advice box so people can input what there answer to the question and it will give them advice. It's for a data classification advice for a work project. I just dont know where im going wrong or what im missing out - ive read loads of help sections on the web and still cant get the javascript to populate my html boxes. Any help or advice would be really appreciated. Thanks Lee Heres my html code which seems to work ok... the box etc is displayed just doesnt have any content. ----------------------------------------------------------------------- Code: <form method="POST"> <div align="center"><center><table BORDER="1"> <tr> <td COLSPAN="2" BGCOLOR="#4C0000"><div align="center"><center><p><font SIZE="+3" COLOR="#FFFFFF">Data Classification </font></td> </tr> <tr> <td COLSPAN="2" BGCOLOR="#4C0000"><div align="center"><center><p><font SIZE="-1" COLOR="#FFFFFF">2010 <a HREF="Data Governance</font> </p> </center></div><div align="center"><center><p><font COLOR="#FFFFFF">Click on "Next Question" to start advice. Be sure to use small letters (no caps) when entering your letter choice.</font> </td> </tr> <tr> <td><b>Question #:</b></td> <td ALIGN="LEFT"><input TYPE="TEXT" NAME="questNo" SIZE="4"></td> </tr> <tr> <td><b>Question:</b></td> <td><div align="center"><center><p><textarea COLS="70" ROWS="2" name="question" wrap="virtual"></textarea></td> </tr> <tr> <td ALIGN="RIGHT"><b>a)</b></td> <td><div align="center"><center><p><input TYPE="TEXT" NAME="choiceA" SIZE="75"></td> </tr> <tr> <td ALIGN="RIGHT"><b>b)</b></td> <td><div align="center"><center><p><input TYPE="TEXT" NAME="choiceB" SIZE="75"></td> </tr> <tr> <td ALIGN="RIGHT"><b>c)</b></td> <td><div align="center"><center><p><input TYPE="TEXT" NAME="choiceC" SIZE="75"></td> </tr> <tr> <td ALIGN="RIGHT"><b>d)</b></td> <td><div align="center"><center><p><input TYPE="TEXT" NAME="choiceD" SIZE="75"></td> </tr> <tr> <td ALIGN="RIGHT"><b>Your choice:</b></td> <td><input TYPE="TEXT" NAME="yourChoice" SIZE="4"></td> </tr> <tr> <td COLSPAN="2"><div align="center"><center><p><input TYPE="button" VALUE="Check Current Advice" onClick="checkAnswer(this.form)"><input TYPE="button" VALUE="Next Question" onClick="nextQuestion(this.form)"> <input TYPE="reset" VALUE="Start Over" onClick="clearForm(this.form)"></td> </tr> <tr> <td ALIGN="RIGHT"><b>Results:</b></td> <td><div align="center"><center><p><textarea COLS="70" ROWS="3" name="Advice" wrap="virtual"></textarea></td> </tr> <tr> </form> -------------------------------------------------------------------------- Now heres my javascript which i just cant seem to get to work or integrate with the html question/advice box. There will be some text in there that was originally part of the template that i was going to remove at a later stage once id got a better underatnding of where i was going wrong. Code: <html> <head> <script LANGUAGE="JavaScript"> <!-- hide this script tag's contents from old browsers ---> function jumpBox(list) { location.href = list.options[list.selectedIndex].value } //Lee Quinn 2010 All Rights Reserved function init() { questions = new Array() questions[1] = "Is the information you are collecting or creating any of the following?" questions[2] = "Is the information you are collecting or creating any of the following?" questions[3] = "Is the information you are collecting or creating any of the following?" questions[4] = "Is the information you are collecting or creating any of the following?" answerA = new Array() answerA[1] = "Marketing brochures, Customer disclosure statements,Published annual reports, Interviews with news media, Press releases" answerA[2] = "Employee Handbook,Telephone Directory,Organization Charts,Policies and Standards,Training Manuals" answerA[3] = "Customer records, Correspondence containing customer information, Credit card listings,Personnel records/Employee performance reviews,Unit business plans,Proprietary/custom software,Budget information,Internal audit reports,Business reports on strategy, exposures etc" answerA[4] = "Strategic Plans,Encryption keys,Details of mergers or acquisitions,Financial results prior to publication,Online access codes such as passwords or pin" answerB = new Array() answerB[1] = "None of the above" answerB[2] = "None of the above" answerB[3] = "None of the above" answerB[4] = "None of the above" rightAns = new Array rightAns[1] = "A" rightAns[2] = "b" rightAns[3] = "c" rightAns[4] = "d" reference = new Array() reference[1] = "You have indicated yes to question 1, therefore the information you are collecting/creating will be classified as PUBLIC information. It is information that can be disclosed to anyone without violating an individual?s right to privacy. Knowledge of this information does not expose CFS to financial loss, embarrassment, or jeopardize the security of assets." reference[2] = "You have indicated yes to question 2, therefore the information you are collecting/creating will be classified as INTERNAL USE information. It is information that, due to technical or business sensitivity, is limited to employees and contractors who work on-site. It is intended for use only within CFS. Unauthorized disclosure, compromise, or destruction would not have a significant impact on CFS or its employees." reference[3] = "You have indicated yes to question 3, therefore the information you are collecting/creating will be classified as CONFIDENTIAL information. It is information that CFS and its employees have a legal, regulatory, or social obligation to protect. It is intended for use solely within defined groups in CFS. Unauthorized disclosure, compromise, or destruction would adversely impact CFS its customers or its employees. Unless otherwise stated all data should be treated as CONFIDENTIAL.Sensitive data = Confidential or Highly Confidential data." reference[4] = "You have indicated yes to question 4, therefore the information you are collecting/creating will be classified as HIGHLY CONFIDENTIAL information, It is the highest level of classification and is information whose unauthorized disclosure, compromise, or destruction could result in severe damage, provide significant advantage to a competitor, or incur serious financial impact to CFS or its employees. It is intended for restricted use by a very small number of people (possibly 0 or 1) with an explicit, predetermined need to know." } function nextQuestion(form) //set the total number of questions equal to quizend { var quizEnd = eval(4 * 1); if(form.questNo.value =5= quizEnd) { form.question.value = "1"; form.choiceA.value = "Marketing brochures, Customer disclosure statements,Published annual reports, Interviews with news media, Press releases"; form.choiceB.value = "None of the above"; form.choiceC.value = "Unsure"; form.yourChoice.value = "a,b,c,d"; form.results.value = "End of Advice. Your final results are listed below."; } else { if(form.questNo.value == "") {form.questNo.value = 1} else { form.questNo.value = eval(form.questNo.value) + 1; } form.question.value = questions[form.questNo.value]; form.choiceA.value = answerA[form.questNo.value]; form.choiceB.value = answerB[form.questNo.value]; form.choiceC.value = answerC[form.questNo.value]; form.choiceD.value = answerD[form.questNo.value]; form.yourChoice.value = ""; form.results.value = ""; if(form.myScore.value == "") {form.myScore.value = 0; } else { form.myScore.value = form.myScore.value; } } } function checkcurrentadvice(form) { var myScore = 0; var curve = 0; if(form.results.value != "") {form.results.value = "Sorry, no guessing allowed. In order to retry this question you will have to start the quiz over. Click on ''Next Question'' to continue."; } else if(form.yourChoice.value == rightAns[form.questNo.value]) { form.myScore.value = eval(form.myScore.value) + eval(1); form.results.value = "Conratulations! You are correct. That brings your cumulative score to " + form.myScore.value + " out of a possible " + form.questNo.value + ". Click on ''Next Question'' to continue."; } else { form.results.value = "Sorry, you are incorrect. Please refer to " + reference[form.questNo.value] + " before retaking the quiz. This brings your cumulative score to " + form.myScore.value + " out of a possible " + form.questNo.value + ". Click on ''Next Question'' to continue." } function clearForm(form) { form.questNo.value = ""; form.question.value = ""; form.choiceA.value = ""; form.choiceB.value = ""; form.choiceC.value = ""; form.choiceD.value = ""; form.yourChoice.value = ""; form.results.value = ""; form.myScore.value = ""; form.percent.value = ""; form.grade.value = ""; } </script> </head> </html> |