Ok I would like to start off by saying that Yes, this is an assignment and YES, I am a moron. I have already determined that I need to change my course of study next semester because all of this is WAY over my head, but i do need to pass so that I still qualify for my grants, I plan on leaving all this web stuff to you professionals (I will stick to accounting thank you! I understand numbers)
Anyways, I have my .html page and my .js but no matter what I do nothing seems to work.
and my js file:HTML Code:<!--//Save the HTML file provided in this assignment folder to your computer //The contents of this file are irrelevant to the assignment, you just need to manipulate the file //Hint: the file will need to be altered, it does not contain "id=" /*Change the href Change at least two list items Change some verbiage in a paragraph Add another href Provide a button to toggle between original text and altered text*/ --> <!DOCTYPE html> <html> <body> <script src="A02.js"></script> <font id= "fontSize" size="2" face="verdana,arial,helvetica,sans-serif">Original Points <br />Due: Friday, April 6th, 2012 at 11:59PM <br />Late: If not turned in by Monday at 11:59PM</font> <font size="2" face="verdana,arial,helvetica,sans-serif"><br />Please contact me if you need any help. <b >Put your assignment in a zipped folder and submit it via Blackboard. <br>Zipped folder and assignment naming convention: FirstName_course_Assgn#_StudentId <br /><br /><strong>Include comments and follow the WITC Software Development Standards</strong> <div id ="change" ><a href="http://www.nritweb.info/nritweb/booklist/index.htm">Tim the fix-it guy!</a></div> <br> <ol > <div id="header"><li>A working machine is a happy machine</div></li> <li>If it's broke, I can fix-it</li> <li>Fast and effecient</li> <li>Satisfaction guaranteed</li> </ol> <!--<button onclick=> Change Text</button><br /> <input type="submit" value="submit" onclick="return foo();" />--> <input id= "buttonChange" type="button" value="Change Text" name="change" onclick = "getAllFunctions();"> <input id= "buttonChangeBack" type="button" value="Origianl Text" name="original"> <p>Points breakdown: <ol> <li>As orignially assigned</li> </ol> </p> </body> </html>
Code://Save the HTML file provided in this assignment folder to your computer //The contents of this file are irrelevant to the assignment, you just need to manipulate the file //Hint: the file will need to be altered, it does not contain "id=" /*Change the href Change at least two list items Change some verbiage in a paragraph Add another href Provide a button to toggle between original text and altered text*/ function myFunction() { var textChange = document.getElementById("header"); var link = document.createElement("div"); var target = header.createTextMode("This is text I have created"); textChange.appendChild(target); function changeText() { document.getElementById("change").innerHTML = 'This is the new content'; //document.getElementByTag('color').innerHTML = 'This is the new content'; } function getAllFunctions() { changeText(); myFunction(); } if(document.getElementById('buttonChange').clicked == true) { buttonChange.addEventListener("click", getAllFunctions, false); } if(document.getElementById('buttonChangeBack').clicked == true) { window.location.reload(); } }


Reply With Quote


Bookmarks