CODE: red = intended answer; blue = actual answer, in addition or instead of intended; red = did not answer during exam; correct answer
Server-Side Includes (SSIs)
A.
Include text files in our pages, as they are loaded
B.
Insert the values of the HTTP variables in the page sent back to
the browser
C.
Execute other programs or scripts, such as CGI and ISAPI
applications D. all of the above
The encoding performed by escape() is like the URL encoding used
to encode query strings and other portions of a URL that might
include spaces, punctuation, or characters outside the standard
ASCII character set. A. true
B. false
var str = "Apples are round, apples are juicy, and apples are sometimes red.";
var replStr = /apples/g;
var newStr = str.replace(replStr, "oranges");
Using the information above newStr will be
A. Apples are round, oranges are juicy, and apples are sometimes red. B. Apples are round, oranges are juicy, and oranges are sometimes red.
C. oranges are round, apples are juicy, and apples are sometimes red.
D. oranges are round, oranges are juicy, and oranges are sometimes red.
the code of the scripts that run on the server will be
visible in the browser
A. true B. false
SOURC: Wikipedia: Client-side Scripting - "In contrast, server-side scripts, written in languages such as Perl, PHP, and server-side VBScript, are executed by the web server when the user requests a document. They produce output in a format understandable by web browsers (usually HTML), which is then sent to the user's computer. The user cannot see the script's source code (unless the author publishes the code separately), and may not even be aware that a script was executed. The documents produced by server-side scripts may, of course, contain client-side scripts."
Which of the following are methods A. alert B. prompt C. open D. write
An example of Server-Side Includes (SSIs) notation is
A.
<INCLUDE="includes/header.txt"> B. <% EXEC CMD = "/utils/cmdtest.exe?10024" %>
C.
<SCRIPT LANGUAGE="JavaScript1.1"
SRC="formcheck.js">
D. none of the above
document.write(example + " of how to use concatenation");
document.write(example, " of how to use concatenation");
the statements above produce the same results A. true
B.
false
TEST:
An important reason to specify names for the windows and frames
is that those names can be used as the value of the TARGET
attribute of the <A>, <MAP>, and <FORM> tags A. true
B. false
CONTRARY: Window Object - "An important reason to specify names for the windows and frames is that those names can be used as the value of the TARGET attribute of the <A>, <MAP>, and <FORM> tags. This tells the browser where you want the results of activating a link, clicking on an image map, or submitting a form to be displayed."
cookies can be created either from the server or the browser A. true
B. false
How do you refer to the third element of the second form on a
page?
A. document.forms[2].elements[2]
B. document.forms[0].elements[1] C. document.forms[1].elements[2]
D. document.forms[1].elements[3]
Properties of objects are, in many ways, just like JavaScript
variables and can contain any type of data, including arrays,
functions, and other objects. A. true
B. false
The client initiates a CGI process by: A.
By clicking a hypertext link that runs the script
directly B. "Submit" button in an HTML form
C.
calling an object’s property
D.
none of the above
SOURCE: CGI Process - "CGI programs were shown to be invoked by a URL. The URL could be entered directly into a Web browser or stored in a Web page as a hypertext link or the destination for HTML form information." Get and Post Methods
- "The client initiates a CGI process by clicking any of the following on an HTML page:
The expiry date of a cookie by default is 24 hrs
A. true B. false
SOURCE: Cookies "A cookie without a valid (future) expiry date will not be stored on your machine but will be available for the duration of the current session (ie. until you log off)." Truth about Cookies
text-transform: capitalize;
Transforms john doe into JOHN DOE
A. true B. false
SOURCE: CSS - Text
- "capitalize
- Capitalizes the first letter of each word. For example: "john doe" will be "John Doe".
"
For questions 27 & 28.
<% for (i = 1; i <= 7; i++) { %>
<FONT SIZE="<% = i %>">Hello
World!</FONT><BR>
<% } %>
The above code is syntactically correct for an Active Server
Page A. true
B. false
Active Server Pages allows you to manipulate files in general on
the server
A. true B. false
SOUCRCE: Intro to ASP; ASP Basics; "The Server object provides access to methods and properties on the server. Most of these methods and properties serve as utility functions. The most frequently used method is the one that creates an instance of an ActiveX component (Server.CreateObject). "
cSendFree =
form.SendFree.options[form.SendFree.selectedIndex].value A. cSendFree == Seybold
B. cSendFree == Patricia
Seybold Report
C. cSendFree == ""
D. none of the above
function testButton(form){
var alertStr = "";
for (Count = 0; Count < 3; Count++){
if (form[Count].checked) alertStr += "CheckBox " + (Count + 1) + " is checked\n"; }
if (!alertStr) alertStr = "No CheckBox was selected";
alert (alertStr); }
"form validation" can done either on the browser or on
the server A. true
B. false
<form>
<input id="x" type="text" value="Mouse over the color"
size="20">
<input id="y" type="button" value="Mouse over the color">
</form>
<script>
function changeColor(color) {
document.getElementById('x').style.color = color;
}
</script>
TEST:
The MouseOver will change the text in the input field to blue A. true
B. false
<SELECT NAME="list1" MULTIPLE="4"> is a valid statement
A. true B. false
SOURCE: The Select Element - "Using the MULTIPLE attribute, you can enable the user to select more than one choice in a scrollable selection list: <SELECT NAME="test" SIZE="2" MULTIPLE>"; JavaScriptKit.com
- Multiple is "Boolean that indicates whether this SELECT allows more than one option to be selected simultaneously."
Use the following information for Questions 43 & 44
The "code" below resides on qstring.asp.
<A HREF="qstring.asp?Size=Medium&Color=Yellow">
This link will demonstrate the Request.QueryString object.
</A>
<P>
The current value of Size is <% =
Request.QueryString("Size") %><BR>
The current value of Color is <% = Request("Color") %>
This example uses which method A. GET
B. POST
C. CGI
D. none of the above
SOURCE: GET and POST Methods;
REASON: "The GET Method transfers the data within the URL itself. Under the GET Method, the browser might initiate the HTTP transaction as follows:
GET HTTP/1.1 /cgi-bin/addrform.pl?first=John&last=Smith "
The current value of Color is (before the hyperlink is clicked) A. ""
B. Yellow
C. results in an error
message
D. none of the above