New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN: 9781305503922
Author: Patrick M. Carey
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Question
Chapter 9.1, Problem 2QC
Program Plan Intro
To link the tny_functions.js file by using the script element tag in the HTML files asynchronously.
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
please Provide code to attach your HTML file to a script located in the tny_functions.js file. Assume that the script file is loaded asynchronously.
Instruction:
Please write this code in javascript and let me know if there is any issue
Question:
1. Use our HTML template to create a file named as your name (for example if your name is john the file name would be "john.html"). Make sure to update the metadata (title, author, description...) accordingly. This HTML file should contain an h1 heading element that includes your full name and student number.
2. Create an empty element with an id of your name. This element should be used to display your output from JavaScript.
3. Create a JavaScript file named your studentid.js that performs the following:
a. Create a function that will count the number of even numbers contained in the array that is passed to this function. The array may contain values of any type, but you only count the even numbers. This function will return a number (number of instances of even numbers found in the array). Needless to say, the function will return zero, if the array is empty or no even numbers are…
Event Listeners
Go to the co_credit.js file in your editor. Create an event listener for the window load event that retrieves the field values attached to the query string of the page’s URL. Add the following to the event listener’s anonymous function:
Create the orderData variable that stores the query string text from the URL. Slice the orderData text string to remove the first ? character, replace every occurrence of the + character with a blank space, and decode the URI-encoded characters.
Split the orderData variable at every occurrence of a & or = character and store the substrings in the orderFields array variable.
Write the following values from the orderFields array into the indicated fields of the order form:
orderFields[3] into the modelName field
orderFields[5] into the modelQty field
orderFields[7] into the orderCost field
orderFields[9] into the shippingType field
orderFields[13] into the shippingCost field
orderFields[15] into the subTotal field
orderFields[17]…
Chapter 9 Solutions
New Perspectives on HTML5, CSS3, and JavaScript
Ch. 9.1 - Prob. 2QCCh. 9.1 - What is the difference between asynchronously...Ch. 9.1 - Provide the command to display an alert dialog box...Ch. 9.1 - Prob. 8QCCh. 9.2 - Prob. 6QCCh. 9 - Prob. 2RACh. 9 - Prob. 4RACh. 9 - Prob. 5RACh. 9 - Prob. 6RACh. 9 - Prob. 7RA
Ch. 9 - Prob. 8RACh. 9 - Prob. 9RACh. 9 - Prob. 10RACh. 9 - Prob. 11RACh. 9 - Prob. 1CP1Ch. 9 - Prob. 2CP1Ch. 9 - Prob. 3CP1Ch. 9 - Prob. 4CP1Ch. 9 - Prob. 5CP1Ch. 9 - Prob. 6CP1Ch. 9 - Prob. 7CP1Ch. 9 - Prob. 8CP1Ch. 9 - Prob. 9CP1Ch. 9 - Prob. 10CP1Ch. 9 - Prob. 11CP1Ch. 9 - Prob. 12CP1Ch. 9 - Prob. 13CP1Ch. 9 - Prob. 14CP1Ch. 9 - Prob. 15CP1Ch. 9 - Prob. 16CP1Ch. 9 - Prob. 1CP2Ch. 9 - Prob. 2CP2Ch. 9 - Prob. 3CP2Ch. 9 - Prob. 4CP2Ch. 9 - Prob. 5CP2Ch. 9 - Prob. 6CP2Ch. 9 - Prob. 7CP2Ch. 9 - Prob. 8CP2Ch. 9 - Prob. 9CP2Ch. 9 - Prob. 10CP2Ch. 9 - Prob. 11CP2Ch. 9 - Prob. 12CP2Ch. 9 - Prob. 13CP2Ch. 9 - Return to the bc_today.js file and change the...Ch. 9 - Prob. 15CP2Ch. 9 - Prob. 1CP3Ch. 9 - Prob. 2CP3Ch. 9 - Prob. 3CP3Ch. 9 - Prob. 4CP3Ch. 9 - Prob. 5CP3Ch. 9 - Above the randomlnt() function insert a command to...Ch. 9 - Prob. 7CP3Ch. 9 - Prob. 8CP3Ch. 9 - Prob. 9CP3Ch. 9 - Prob. 10CP3Ch. 9 - Prob. 2CP4Ch. 9 - Prob. 3CP4Ch. 9 - Prob. 4CP4Ch. 9 - Prob. 5CP4Ch. 9 - Prob. 6CP4Ch. 9 - Prob. 7CP4Ch. 9 - Prob. 8CP4Ch. 9 - Explore 9. Scroll back to the top of the file and,...Ch. 9 - Prob. 10CP4Ch. 9 - Prob. 13CP4
Knowledge Booster
Similar questions
- Offive365.arrow_forwardA) Write the XHTML code to create a form with the following capabilities: text widgets to collect the Agent connection code, Agent name, passcode, a disconnect button, a cancel button, and a submit button. This document must call one PHP script named "authenticate.php" when the form is submitted. B) Write a PHP script that collects the data from the form of part A and writes it to a file. Use tab characters to separate the fields. I U S X, x2 -arrow_forwardCreate an HTML page that should display the error status message when the user clicks the button ‘Click to Get the Employee Data’ with the id “btn-id” to load the JSON file ‘employee.json’ does not exist. Use jquery ajax() to perform the task. Display the error message “Error Message: Not found” in a div tag with the id ‘err-id’. Note: 1. Do not alter the files employee.html2. Write your code in employee.js file3. Avoid writing the jQuery 'document ready' method for the proper web page visibility.4. Do not use 'ES6' features.arrow_forward
- Please write the following using HTML and JavaScript Thank you!arrow_forward3- The user wants to insert an image with the filename: UTAS.JPG with a height and width of 50px and an alternate text “Salalah”. When the image is clicked, it will link to the UTAS-Salalah website. Which of the following HTML code is suitable for the given instructions? a. <a href=”https://www.sct.edu.om”><img src=”UTAS.JPG” height”50 px” width ”50 px” alt ”Salalah”></a> b. <a href=”https://www.sct.edu.om”></a><img source=”UTAS.JPG” height=”300 px” width=”300 px” alternate=”Salalah”> c. <a href=”UTAS”><image src=”UTAS.JPG” height width=”50 px” alt=”Salalah”></a> d. <a href=”https://www.sct.edu.om” ><img src=”UTAS.JPG” height=”50 px” width=”50 px” alt=”Salalah”> </a>arrow_forwardCreate a web form to help in creating simple random passwords. Your web form should have four text fields named Word1, Word2, Word3, and Word4, as well as “Reset” and “Submit” buttons. You need to create a separate PHP form-processing script that verifies that all four words are entered, that all of them contain only letters, and that all four are between 4 and 7 characters long. Once all of the words have been verified as correct, use the strtoupper() and str_shuffle() functions to produce four suggested jumbled sets of passwords using the words entered in the text fields Note: you need to perform the validation on the server side using PHP scripts. use the preg_match() function to check for lettersarrow_forward
- Kindly provide correct answer with comments and try to attach necessary screenshotsarrow_forward192. Refer to the exhibit. What is the meaning of the term dynamic as displayed in the output of the show frame-relay map command shown?arrow_forwardthis practice assignment wants me to: Create a document named ShowGuestBook.php that dis- plays the names of visitors who have signed the guest book. Use the readfile() function to display the contents of the guestbook.txt file. Note that you will need to use the element for Web browsers to recognize the line breaks. here is my two PHP files and my html codes. I am getting an ( ! ) Parse error: syntax error, unexpected 'POST' (T_STRING) on SignGuestBook.php on line 10! i cant seem to figure out whats the issue , help please!! GuestBook.html <!DOCTYPE> <html><head><title>Guest Book</title></head> <body><h2> Enter your name to sign our guest book </h2><form method="POST" action="SignGuestBook.php"><p>First Name <input type="text" name="first_name"/></p><p>Last Name <input type="text" name="last_name"/></p><p><input type="submit" value="Submit"…arrow_forward
- Create an HTML file using a text editor (e.g., Notepad) in which a video file plays automatically and loops. Your submission should include the following additional components: Title Header Paragraph Provide a short explanation of the purpose of the video file being played Please be sure to submit all required documents in a zip file.arrow_forwardPlease write php and html code just Thank youarrow_forwardDesign HTML Form in javascriptApply the data validation :1. Mobile number field data must be a numeric data and not less than 8 digits,2. The email field must accept the data which must contain the character '@' and dot (.). Andthe character @ must not be the first character and the last dot must at least be onecharacter after the @.On submitting the form, If all these validations are followed, another Html page.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- New Perspectives on HTML5, CSS3, and JavaScriptComputer ScienceISBN:9781305503922Author:Patrick M. CareyPublisher:Cengage LearningNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage