1. Question: The following code snippet is used in form validation, the validate function returns a true if all validations are correct and returns false if the validation fails. The data is always submitted even if the validation fails, what could be the cause for this? <form name=frmadd method=post action=add.asp onsubmit=" validate() ">

    A
    There is no error, the code is fine

    B
    b. There should be a return statement before the call to the validate function

    C
    c. onsubmit=" validate() " should be replaced with " JavaScript:validate() "

    Note: Not available
    1. Report
  2. Question: Consider the following code: var seter=new Object() seter.color= " blue " How would you delete the color property of the variable seter?

    A
    seter.color delete;

    B
    delete seter.color

    C
    delete(seter.color)

    D
    seter.color.delete

    Note: Not available
    1. Report
  3. Question: An HTML form contains 10 checkboxes all named " chkItems ". Which JavaScript function can be used for checking all the checkboxes together?

    A
    function CheckAll()
       {
               for (z = 0; z < document.forms.chkItems.length; z++)
               {
               document.forms.chkItems[z].checked=true
               }
       }

    B
    function CheckAll()
       {
               for (z = 0; z < document.forms[0].chkItems.length; z++)
               {
               document.forms[0].chkItems[z].checked=true
               }
       }

    C
    function CheckAll()
       {
               for (z = 0; z < document.forms[0].chkItems.length; z++)
               {
               document.forms[0].chkItems.list[z].checked=true
               }
       }

    D
    function CheckAll()
       {
               for (z = 0; z < document.forms[0].chkItems.length; z++)
               {
               document.forms[0].chkItems.list[z].checked=false
               }
       }

    Note: Not available
    1. Report
  4. Question: Which JavaScript feature uses JAR files?

    A
    Object signing

    B
    Style sheets

    C
    Netcaster channels

    D
    Image rollovers

    E
    Form validation

    Note: Not available
    1. Report
  5. Question: Using JavaScript, how can you determine whether the browser is Netscape or some other?

    A
    if(appName=="Netscape"){}

    B
    if(document.appName=="Netscape"){}

    C
    if(navigator=="Netscape"){}

    D
    if(browser=="Netscape"){}

    E
    None of the above

    Note: Not available
    1. Report
  6. Question: Which of the following could you do using JavaScript?

    A
    Form validation

    B
    Display a popup window

    C
    Verify usernames and passwords against the database

    D
    Database access

    E
    Change the color of the page

    F
    Display an alert

    G
    Prompt the user to enter a value

    Note: Not available
    1. Report
  7. Question: You have embedded the document.write() method to write some text within a pair of <TD></TD> table tags. Upon loading the file, however, you get some garbled junk on the page where that text should be. What could be the reason for this?

    A
    The browser does not support JavaScript

    B
    You are using an older version of the browser

    C
    The browser does not support cookies

    Note: Not available
    1. Report
  8. Question: After clicking on a link, your main browser window spawns a small new window and writes some text to it. However, when viewing both window page sources, the small window page source is identical to that of the large. How can this be?

    A
    The function writing to the new window didn't close the document stream

    B
    It cannot happen

    C
    Windows receive the source code of the window that wrote to them

    D
    Since the new window has no filename, it receives the source code of its parent

    Note: Not available
    1. Report
  9. Question: Choose another way to write x ? a = b : a = c

    A
    if ('x') { a = b; } else { a = c; }

    B
    if (x) { a = c; } else { a = b; }

    C
    x : a = c ? a = b

    D
    None of above

    Note: Not available
    1. Report
  10. Question: While coding a loop, you come across a condition where you have to terminate the loop and continue with the statements following the loop. Which statement would you use?

    A
    exit

    B
    return

    C
    continue

    D
    while

    E
    break

    Note: Not available
    1. Report
Copyright © 2025. Powered by Intellect Software Ltd