InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What Does The Enableviewstatemac Setting In An Aspx Page Do? |
|
Answer» Setting EnableViewStateMac=true is a security MEASURE that allows ASP.NET to ensure that the viewstate for a page has not been tampered with. If on Postback, the ASP.NET framework detects that there has been a change in the value of viewstate that was sent to the BROWSER, it raises an error - Validation of viewstate MAC failed. Use <%@ Page EnableViewStateMac="true"%> to set it to true (the DEFAULT value, if this attribute is not specified is also true) in an aspx page. Setting EnableViewStateMac=true is a security measure that allows ASP.NET to ensure that the viewstate for a page has not been tampered with. If on Postback, the ASP.NET framework detects that there has been a change in the value of viewstate that was sent to the browser, it raises an error - Validation of viewstate MAC failed. Use <%@ Page EnableViewStateMac="true"%> to set it to true (the default value, if this attribute is not specified is also true) in an aspx page. |
|
| 2. |
What Is The Difference Between Sessionstate And Viewstate? |
|
Answer» VIEWSTATE is specific to a page in a SESSION. Session state refers to user specific data that can be accessed across all PAGES in the WEB APPLICATION.
ViewState is specific to a page in a session. Session state refers to user specific data that can be accessed across all pages in the web application.
|
|
| 3. |
What Web Sites Do You Feel Use Javascript Most Effectively (i.e., Best-in-class Examples)? The Worst? |
|
Answer» The best SITES are the ONES that use JavaScript so transparently, that I'm not aware that there is any scripting on the PAGE. The worst sites are those that try to IMPRESS me with how MUCH scripting is on the page. The best sites are the ones that use JavaScript so transparently, that I'm not aware that there is any scripting on the page. The worst sites are those that try to impress me with how much scripting is on the page. |
|
| 4. |
Taking A Developer’s Perspective, Do You Think That That Javascript Is Easy To Learn And Use? |
|
Answer» One of the reasons JavaScript has the word "script" in it is that as a programming language, the vocabulary of the core language is compact compared to full-fledged programming languages. If you already PROGRAM in JAVA or C, you actually have to unlearn some concepts that had been beaten into you. For example, JavaScript is a loosely typed language, which means that a variable doesn't care if it's holding a string, a number, or a REFERENCE to an object; the same variable can even change what type of data it holds while a script runs. The other part of JavaScript implementation in browsers that makes it easier to learn is that most of the objects you script are pre-defined for the author, and they largely represent PHYSICAL things you can see on a PAGE: a text box, an image, and so on. It's easier to say, "OK, these are the things I'm working with and I'll use scripting to make them do such and such," instead of having to dream up the user interface, conceive of and code objects, and handle the interaction between objects and users. With scripting, you tend to write a _lot_ less code. One of the reasons JavaScript has the word "script" in it is that as a programming language, the vocabulary of the core language is compact compared to full-fledged programming languages. If you already program in Java or C, you actually have to unlearn some concepts that had been beaten into you. For example, JavaScript is a loosely typed language, which means that a variable doesn't care if it's holding a string, a number, or a reference to an object; the same variable can even change what type of data it holds while a script runs. The other part of JavaScript implementation in browsers that makes it easier to learn is that most of the objects you script are pre-defined for the author, and they largely represent physical things you can see on a page: a text box, an image, and so on. It's easier to say, "OK, these are the things I'm working with and I'll use scripting to make them do such and such," instead of having to dream up the user interface, conceive of and code objects, and handle the interaction between objects and users. With scripting, you tend to write a _lot_ less code. |
|
| 5. |
Can Javascript Code Be Broken In Different Lines? |
|
Answer» Breaking is POSSIBLE within a string STATEMENT by USING a BACKSLASH at the end but not within any other javascript statement.that is , is possible but not document.write Breaking is possible within a string statement by using a backslash at the end but not within any other javascript statement.that is , is possible but not document.write |
|
| 6. |
What Is A Prompt Box? |
|
Answer» A prompt box ALLOWS the USER to enter INPUT by providing a TEXT box. A prompt box allows the user to enter input by providing a text box. |
|
| 7. |
What Is The Difference Between An Alert Box And A Confirmation Box? |
|
Answer» An ALERT box displays only one BUTTON which is the OK button WHEREAS the Confirm box displays TWO buttons namely OK and cancel. An alert box displays only one button which is the OK button whereas the Confirm box displays two buttons namely OK and cancel. |
|
| 8. |
How To Access An External Javascript File That Is Stored Externally And Not Embedded? |
|
Answer» This can be achieved by using the following TAG between HEAD tags or between BODY tags. <script SRC="abc.js"></script>
This can be achieved by using the following tag between head tags or between body tags. <script src="abc.js"></script>
|
|
| 9. |
How To Set The Focus In An Element Using Javascript? |
|
Answer» <script> FUNCTION setFocus() { if(focusElement != NULL) { document.forms[0].elements["myelementname"].FOCUS(); } } </script>
<script> function setFocus() { if(focusElement != null) { document.forms[0].elements["myelementname"].focus(); } } </script>
|
|
| 10. |
How To Determine The State Of A Checkbox Using Javascript? |
|
Answer» VAR checkedP = window.document.getElementById("myCheckBox").CHECKED; var checkedP = window.document.getElementById("myCheckBox").checked; |
|
| 11. |
How To Get The Contents Of An Input Box Using Javascript? |
|
Answer» USE the "VALUE" PROPERTY.
Use the "value" property.
|
|
| 12. |
What Is The Difference Between A Web-garden And A Web-farm? |
|
Answer» Web-garden - An IIS6.0 feature where you can configure an application POOL as a web-garden and also specify the number of worker processes for that pool. It can help improve performance in some cases. Web-farm - a general term referring to a cluster of physically separate machines, each running a web-server for SCALABILITY and performance (contrast this with web-garden which refers to MULTIPLE processes on one single PHYSICAL machine). Web-garden - An IIS6.0 feature where you can configure an application pool as a web-garden and also specify the number of worker processes for that pool. It can help improve performance in some cases. Web-farm - a general term referring to a cluster of physically separate machines, each running a web-server for scalability and performance (contrast this with web-garden which refers to multiple processes on one single physical machine). |
|
| 13. |
What Does "1"+2+4 Evaluate To? |
|
Answer» Since 1 is a STRING, EVERYTHING is a string, so the RESULT is 124. Since 1 is a string, everything is a string, so the result is 124. |
|
| 14. |
What Boolean Operators Does Javascript Support? |
Answer»
|
|
| 15. |
What Are The Problems Associated With Using Javascript, And Are There Javascript Techniques That You Discourage? |
|
Answer» Browser version incompatibility is the biggest problem. It requires knowing how each scriptable browser version implements its object model. You see, the incompatibility rarely has to do with the core JavaScript language (although there have been improvements to the language over time); the bulk of incompatibility issues have to do with the object models that each browser version implements. For EXAMPLE, scripters who started out with Navigator 3 implemented the image rollover because it looked cool. But they were dismayed to find out that the image object wasn't scriptable in Internet Explorer 3 or Navigator 2. While there are easy workarounds to make this FEATURE work on newer browsers without disturbing older ones, it was a painful LEARNING experience for many. The second biggest can of worms is scripting CONNECTIONS between MULTIPLE windows. A lot of scripters like to have little windows pop up with navigation bars or some such gizmos. But the object models, especially in the older browser versions, don't make it easy to work with these windows the minute you put a user in front of them--users who can manually close windows or change their stacking order. More recently, a glitch in some uninstall routines for Windows 95 applications can disturb vital parts of the system Registry that Internet Explorer 4 requires for managing multiple windows. A scripter can't work around this problem, because it's not possible to detect the problem in a user's machine. I tend to avoid multiple windows that interact with each other. Browser version incompatibility is the biggest problem. It requires knowing how each scriptable browser version implements its object model. You see, the incompatibility rarely has to do with the core JavaScript language (although there have been improvements to the language over time); the bulk of incompatibility issues have to do with the object models that each browser version implements. For example, scripters who started out with Navigator 3 implemented the image rollover because it looked cool. But they were dismayed to find out that the image object wasn't scriptable in Internet Explorer 3 or Navigator 2. While there are easy workarounds to make this feature work on newer browsers without disturbing older ones, it was a painful learning experience for many. The second biggest can of worms is scripting connections between multiple windows. A lot of scripters like to have little windows pop up with navigation bars or some such gizmos. But the object models, especially in the older browser versions, don't make it easy to work with these windows the minute you put a user in front of them--users who can manually close windows or change their stacking order. More recently, a glitch in some uninstall routines for Windows 95 applications can disturb vital parts of the system Registry that Internet Explorer 4 requires for managing multiple windows. A scripter can't work around this problem, because it's not possible to detect the problem in a user's machine. I tend to avoid multiple windows that interact with each other. |
|
| 16. |
What And Where Are The Best Javascript Resources On The Web? |
|
Answer» The best place to start is SOMETHING called the meta- which provides a high-level OVERVIEW of the JavaScript help available on the Net. For INTERACTIVE help with specific problems, nothing beats the primary JavaScript Usenet newsgroup, comp.lang.javascript. NETSCAPE and Microsoft also have vendor-specific developer discussion groups as WELL as detailed documentation for the scripting and object model implementations. The best place to start is something called the meta- which provides a high-level overview of the JavaScript help available on the Net. For interactive help with specific problems, nothing beats the primary JavaScript Usenet newsgroup, comp.lang.javascript. Netscape and Microsoft also have vendor-specific developer discussion groups as well as detailed documentation for the scripting and object model implementations. |
|
| 17. |
How To Embed Javascript In A Web Page? |
|
Answer» javascript code can be embedded in a web PAGE between <script langugage="javascript"></script> tags javascript code can be embedded in a web page between <script langugage="javascript"></script> tags |
|
| 18. |
Are Java And Javascript The Same? |
|
Answer» No.java and javascript are two DIFFERENT languages. No.java and javascript are two different languages. |
|
| 19. |
Is A Javascript Script Faster Than An Asp Script? |
|
Answer» Yes.Since JAVASCRIPT is a client-side SCRIPT it does require the web server's help for its computation,so it is always FASTER than any server-side script LIKE ASP,PHP,etc.. Yes.Since javascript is a client-side script it does require the web server's help for its computation,so it is always faster than any server-side script like ASP,PHP,etc.. |
|
| 20. |
What Does The "access Is Denied" Ie Error Mean? |
|
Answer» The "Access Denied" ERROR in any browser is due to the following reason. The "Access Denied" error in any browser is due to the following reason. |
|
| 21. |
Text From Your Clipboard? |
|
Answer» It is true, TEXT you last copied for pasting (copy & paste) can be STOLEN when you visit web sites USING a combination of JAVASCRIPT and ASP (or PHP, or CGI) to write your possible sensitive data to a database on another server.
It is true, text you last copied for pasting (copy & paste) can be stolen when you visit web sites using a combination of JavaScript and ASP (or PHP, or CGI) to write your possible sensitive data to a database on another server.
|
|
| 22. |
How To Write A Script For "select" Lists Using Javascript |
|
Answer» 1. To REMOVE an ITEM from a LIST set it to null. 2. To truncate a list set its length to the maximum size you desire. 3. To delete all options in a select object set the length to 0. 1. To remove an item from a list set it to null. 2. To truncate a list set its length to the maximum size you desire. 3. To delete all options in a select object set the length to 0. |
|
| 23. |
Methods Get And Post In Html Forms - What's The Difference? |
Answer»
|
|
| 24. |
What Is The Data Type Of Variables Of In Javascript? |
|
Answer» All VARIABLES are of OBJECT TYPE in JAVASCRIPT. All variables are of object type in JavaScript. |
|
| 25. |
In A Pop-up Browser Window, How Do You Refer To The Main Browser Window That Opened It? |
|
Answer» USE WINDOW.opener to REFER to the MAIN window from pop-ups. Use window.opener to refer to the main window from pop-ups. |
|
| 26. |
What Is Negative Infinity? |
|
Answer» It’s a number in JAVASCRIPT, DERIVED by dividing negative number by ZERO. It’s a number in JavaScript, derived by dividing negative number by zero. |
|
| 27. |
What Does Isnan Function Do? |
|
Answer» RETURN TRUE if the ARGUMENT is not a NUMBER. Return true if the argument is not a number. |
|
| 28. |
Are You Concerned That Older Browsers Don't Support Javascript And Thus Exclude A Set Of Web Users? Individual Users? |
|
Answer» Fragmentation of the installed base of browsers will only get worse. By definition, it can never improve unless absolutely everyone on the PLANET threw away their old browsers and upgraded to the latest gee-whiz versions. But even then, there are plenty of discrepancies between the scriptability of the latest NETSCAPE Navigator and Microsoft Internet Explorer. The situation makes scripting a challenge, especially for newcomers who may not be aware of the limitations of earlier browsers. A lot of effort in my books and ancillary material goes toward helping scripters know what features work in which browsers and how to either workaround limitations in earlier browsers or raise the compatibility COMMON denominator. Designing scripts for a Web site requires making some hard decisions about if, when, and how to implement the advantages scripting OFFERS a page to your AUDIENCE. For public Web sites, I recommend using scripting in an additive way: let sufficient content stand on its own, but let scriptable browser users receive an enhanced experience, preferably with the same HTML document. Fragmentation of the installed base of browsers will only get worse. By definition, it can never improve unless absolutely everyone on the planet threw away their old browsers and upgraded to the latest gee-whiz versions. But even then, there are plenty of discrepancies between the scriptability of the latest Netscape Navigator and Microsoft Internet Explorer. The situation makes scripting a challenge, especially for newcomers who may not be aware of the limitations of earlier browsers. A lot of effort in my books and ancillary material goes toward helping scripters know what features work in which browsers and how to either workaround limitations in earlier browsers or raise the compatibility common denominator. Designing scripts for a Web site requires making some hard decisions about if, when, and how to implement the advantages scripting offers a page to your audience. For public Web sites, I recommend using scripting in an additive way: let sufficient content stand on its own, but let scriptable browser users receive an enhanced experience, preferably with the same HTML document. |
|
| 29. |
How Can Javascript Be Used To Personalize Or Tailor A Web Site To Fit Individual Users? |
|
Answer» JavaScript allows a Web page to PERFORM "if-then" kinds of decisions based on browser VERSION, operating system, user input, and, in more recent browsers, details about the screen size in which the browser is running. While a server CGI program can make some of those same kinds of decisions, not everyone has access to or the EXPERTISE to create CGI programs. For example, an experienced CGI programmer can examine information about the browser whenever a request for a page is made; thus a server so equipped might serve up one page for Navigator users and a different page for Internet Explorer users. Beyond browser and operating system version, a CGI program can't know more about the environment. But a JavaScript-enhanced page can instruct the browser to RENDER only certain content based on the browser, operating system, and even the screen size. Scripting can even go further if the page author desires. For example, the author may include a preference screen that lets the user determine the desired background and text color combination. A script can save this information on the client in a well-regulated local file called a cookie. The next time the user comes to the site, scripts in its PAGES look to the cookie info and render the page in the color combination selected previously. The server is none the wiser, nor does it have to store any visitor-specific information. JavaScript allows a Web page to perform "if-then" kinds of decisions based on browser version, operating system, user input, and, in more recent browsers, details about the screen size in which the browser is running. While a server CGI program can make some of those same kinds of decisions, not everyone has access to or the expertise to create CGI programs. For example, an experienced CGI programmer can examine information about the browser whenever a request for a page is made; thus a server so equipped might serve up one page for Navigator users and a different page for Internet Explorer users. Beyond browser and operating system version, a CGI program can't know more about the environment. But a JavaScript-enhanced page can instruct the browser to render only certain content based on the browser, operating system, and even the screen size. Scripting can even go further if the page author desires. For example, the author may include a preference screen that lets the user determine the desired background and text color combination. A script can save this information on the client in a well-regulated local file called a cookie. The next time the user comes to the site, scripts in its pages look to the cookie info and render the page in the color combination selected previously. The server is none the wiser, nor does it have to store any visitor-specific information. |
|
| 30. |
How To Set A Html Document's Background Color? |
|
Answer» document.bgcolor PROPERTY can be SET to any APPROPRIATE COLOR. document.bgcolor property can be set to any appropriate color. |
|
| 31. |
What Can Javascript Programs Do? |
|
Answer» Generation of HTML PAGES on-the-fly without accessing the Web server. The user can be given control over the browser like User input validation Simple computations can be performed on the client's MACHINE The user's browser, OS, screen size, etc. can be detected DATE and Time HANDLING Generation of HTML pages on-the-fly without accessing the Web server. The user can be given control over the browser like User input validation Simple computations can be performed on the client's machine The user's browser, OS, screen size, etc. can be detected Date and Time Handling |
|
| 32. |
How Do You Target A Specific Frame From A Hyperlink? |
|
Answer» Include the name of the frame in the target ATTRIBUTE of the HYPERLINK. <a HREF=”mypage.htm” target=”myframe”>>My Page</a> Include the name of the frame in the target attribute of the hyperlink. <a href=”mypage.htm” target=”myframe”>>My Page</a> |
|
| 33. |
How To Create Arrays In Javascript? |
|
Answer» We can declare an array like this We can declare an array like this |
|
| 34. |
How Do You Convert Numbers Between Different Bases In Javascript? |
|
Answer» Use the parseInt() function, that takes a string as the first parameter, and the BASE as a SECOND parameter. So to convert hexadecimal 3F to decimal, use parseInt ("3F", 16); Use the parseInt() function, that takes a string as the first parameter, and the base as a second parameter. So to convert hexadecimal 3F to decimal, use parseInt ("3F", 16); |
|
| 35. |
What Are Javascript Types? |
|
Answer» NUMBER, String, BOOLEAN, Function, Object, Null, UNDEFINED. Number, String, Boolean, Function, Object, Null, Undefined. |
|
| 36. |
How To Shift And Unshift Using Javascript? |
|
Answer» <SCRIPT type="text/javascript"> <script type="text/javascript"> |
|
| 37. |
How To Make A Array As A Stack Using Javascript? |
|
Answer» The POP() and push() functions turn a harmless array into a stack The pop() and push() functions turn a harmless array into a stack |
|
| 38. |
How To Create A Function Using Function Constructor? |
|
Answer» The FOLLOWING example illustrates this The following example illustrates this |
|
| 39. |
What Does Break And Continue Statements Do? |
|
Answer» Continue statement CONTINUES the current loop (if label not SPECIFIED) in a NEW iteration WHEREAS BREAK statement exits the current loop.
Continue statement continues the current loop (if label not specified) in a new iteration whereas break statement exits the current loop.
|
|
| 40. |
What Is A Hypertext Link? |
|
Answer» A HYPERTEXT link is a special TAG that links one page to another page or RESOURCE. If you click the link, the browser jumps to the link's DESTINATION.
A hypertext link is a special tag that links one page to another page or resource. If you click the link, the browser jumps to the link's destination.
|
|
| 41. |
What Is The Simplest Html Page? |
|
Answer» HTML Code:
HTML Code:
|
|
| 42. |
What Is A Tag? |
|
Answer» In HTML, a tag tells the browser what to do. When you write an HTML page, you ENTER TAGS for many reasons -- to change the appearance of TEXT, to show a graphic, or to make a LINK to another page.
In HTML, a tag tells the browser what to do. When you write an HTML page, you enter tags for many reasons -- to change the appearance of text, to show a graphic, or to make a link to another page.
|
|
| 43. |
How Do I Update Two Frames At Once? |
|
Answer» There are two basic techniques for updating multiple frames with a single link: The HTML-based technique links to a new FRAMESET document that specifies the new combination of frames. The JavaScript-based solution uses the onClick attribute of the link to update the additional frame (or frames).
There are two basic techniques for updating multiple frames with a single link: The HTML-based technique links to a new frameset document that specifies the new combination of frames. The JavaScript-based solution uses the onClick attribute of the link to update the additional frame (or frames).
|
|
| 44. |
How Do I Make Sure My Framed Documents Are Displayed Inside Their Frame Set? |
|
Answer» When the sub-documents of a frameset state are accessed directly, they appear without the context of the surrounding frameset.
When the sub-documents of a frameset state are accessed directly, they appear without the context of the surrounding frameset.
|
|
| 45. |
How Do You Create Tabs Or Indents In Web Pages? |
|
Answer» There was a tag proposed for HTML 3.0, but it was never adopted by any major browser and the draft SPECIFICATION has now expired. You can simulate a tab or indent in various ways, INCLUDING using a transparent GIF, but none are quite as satisfactory or widely supported as an official tag would be. My page looks good on one browser, but not on another. There are slight differences between BROWSERS, such as Netscape Navigator and Microsoft Internet Explorer, in areas such as page MARGINS. The only real answer is to use standard HTML tags whenever possible, and view your pages in multiple browsers to see how they look. There was a tag proposed for HTML 3.0, but it was never adopted by any major browser and the draft specification has now expired. You can simulate a tab or indent in various ways, including using a transparent GIF, but none are quite as satisfactory or widely supported as an official tag would be. My page looks good on one browser, but not on another. There are slight differences between browsers, such as Netscape Navigator and Microsoft Internet Explorer, in areas such as page margins. The only real answer is to use standard HTML tags whenever possible, and view your pages in multiple browsers to see how they look. |
|
| 46. |
Are There Any Problems With Using Frames? |
|
Answer» The fundamental problem with the design of frames is that framesets create states in the BROWSER that are not addressable. Once any of the frames within a frameset changes from its default CONTENT, there is no longer a way to address the current state of the frameset. It is difficult to bookmark - and impossible to LINK or index - such a frameset state. It is impossible to reference such a frameset state in other media. When the sub-documents of such a frameset state are accessed directly, they appear without the context of the surrounding frameset. Basic browser functions (e.g., printing, moving forwards/backwards in the browser's history) behave differently with framesets. Also, browsers cannot identify which frame should have focus, which affects scrolling, searching, and the USE of KEYBOARD shortcuts in general. Furthermore, frames focus on layout rather than on information structure, and many authors of framed sites neglect to provide useful alternative content in the NOFRAMES element. Both of these factors cause accessibility problems for browsers that differ significantly from the author's expectations and for search engines. The fundamental problem with the design of frames is that framesets create states in the browser that are not addressable. Once any of the frames within a frameset changes from its default content, there is no longer a way to address the current state of the frameset. It is difficult to bookmark - and impossible to link or index - such a frameset state. It is impossible to reference such a frameset state in other media. When the sub-documents of such a frameset state are accessed directly, they appear without the context of the surrounding frameset. Basic browser functions (e.g., printing, moving forwards/backwards in the browser's history) behave differently with framesets. Also, browsers cannot identify which frame should have focus, which affects scrolling, searching, and the use of keyboard shortcuts in general. Furthermore, frames focus on layout rather than on information structure, and many authors of framed sites neglect to provide useful alternative content in the NOFRAMES element. Both of these factors cause accessibility problems for browsers that differ significantly from the author's expectations and for search engines. |
|
| 47. |
How Do I Make A Frame With A Vertical Scrollbar But Without A Horizontal Scrollbar? |
|
Answer» The only way to have a FRAME with a vertical scrollbar but without a horizontal scrollbar is to DEFINE the frame with SCROLLING="AUTO" (the default), and to have content that does not require horizontal scrolling. There is no way to specify that a frame should have one scrollbar but not the other. Using SCROLLING="yes" will force SCROLLBARS in both DIRECTIONS (even when they aren't needed), and using SCROLLING="no" will inhibit all scrollbars (even when scrolling is necessary to access the frame's content). There are no other values for the SCROLLING attribute. The only way to have a frame with a vertical scrollbar but without a horizontal scrollbar is to define the frame with SCROLLING="auto" (the default), and to have content that does not require horizontal scrolling. There is no way to specify that a frame should have one scrollbar but not the other. Using SCROLLING="yes" will force scrollbars in both directions (even when they aren't needed), and using SCROLLING="no" will inhibit all scrollbars (even when scrolling is necessary to access the frame's content). There are no other values for the SCROLLING attribute. |
|
| 48. |
How Do I Get Out Of A Frameset? |
|
Answer» If you are the author, this is easy. You only have to add the TARGET attribute to the link that takes readers to the intended 'outside' DOCUMENT. Give it the value of _top. In many current browsers, it is not possible to display a frame in the FULL browser window, at least not very easily. The reader would need to copy the URL of the DESIRED frame and then REQUEST that URL manually. I would recommend that authors who want to OFFER readers this option add a link to the document itself in the document, with the TARGET attribute set to _top so the document displays in the full window if the link is followed. If you are the author, this is easy. You only have to add the TARGET attribute to the link that takes readers to the intended 'outside' document. Give it the value of _top. In many current browsers, it is not possible to display a frame in the full browser window, at least not very easily. The reader would need to copy the URL of the desired frame and then request that URL manually. I would recommend that authors who want to offer readers this option add a link to the document itself in the document, with the TARGET attribute set to _top so the document displays in the full window if the link is followed. |
|
| 49. |
Why Do My Links Open New Windows Rather Than Update An Existing Frame? |
|
Answer» If there is no existing frame with the name you used for the TARGET attribute, then a new browser window will be OPENED, and this window will be assigned the name you used. Furthermore, TARGET="_blank" will open a new, unnamed browser window. In HTML 4, the TARGET attribute value is case-insensitive, so that abc and ABC both refer to the same frame/window, and _top and _TOP both have the same meaning. However, most browsers treat the TARGET attribute value as case-sensitive and do not recognize ABC as being the same as abc, or _TOP as having the SPECIAL meaning of _top. Also, some browsers include a security FEATURE that prevents documents from being hijacked by third-party framesets. In these browsers, if a document's link TARGETS a frame defined by a frameset document that is located on a different server than the document itself, then the link opens in a new window instead. If there is no existing frame with the name you used for the TARGET attribute, then a new browser window will be opened, and this window will be assigned the name you used. Furthermore, TARGET="_blank" will open a new, unnamed browser window. In HTML 4, the TARGET attribute value is case-insensitive, so that abc and ABC both refer to the same frame/window, and _top and _TOP both have the same meaning. However, most browsers treat the TARGET attribute value as case-sensitive and do not recognize ABC as being the same as abc, or _TOP as having the special meaning of _top. Also, some browsers include a security feature that prevents documents from being hijacked by third-party framesets. In these browsers, if a document's link targets a frame defined by a frameset document that is located on a different server than the document itself, then the link opens in a new window instead. |
|
| 50. |
How Can I Display An Image On My Page? |
|
Answer» Use an IMG element. The SRC attribute specifies the location of the image. The ALT attribute PROVIDES alternate text for those not LOADING IMAGES. For EXAMPLE: Use an IMG element. The SRC attribute specifies the location of the image. The ALT attribute provides alternate text for those not loading images. For example: |
|