DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: quiz about dhtml

  1. #1
    alex Guest

    quiz about dhtml


    Hi,
    I am new to Dhtml, could you help me to answer these questions, and send
    to me, thanks very much for your help!

    Question 1:
    Given a URL, called ˇ°home.htmˇ±, and two GIFs, called ˇ°homeoff.gifˇ± and
    ˇ°homeon.gifˇ±, create a simple HTML page with a button that will go to the
    URL if clicked. The button should display ˇ°homeon.gifˇ± when the mouse is
    paused over the button and ˇ°homeoff.gifˇ± when it is not. Embed the rollover
    in a Javascript function. What attribute would you use to display a ˇ°tipˇ±
    when the mouse is paused over the button? What attribute would you use to
    control the width of a border around the button?


    Question 2:
    Create an HTML page with a form containing a text field (for a username),
    password field, a selection of options (ˇ°i2ˇ±, ˇ°Manugisticsˇ±, ˇ°Adexaˇ±),
    and a panel of radio buttons (ˇ°B2Bˇ±, ˇ°SCPˇ±). When the user clicks the
    submit button, do the following client-side validation before actually performing
    the form action (which can be anything you like):
    ˇ¤check that the text and password fields have some text entered,
    ˇ¤check that at least one option is chosen from the selection and
    ˇ¤check that a radio button has been clicked.
    If the validation fails, then tell the user and do not perform the form action.


    Question 3:
    Create a dynamic element containing a GIF, called ˇ°homeon.gifˇ±, in an HTML
    page that can be shown or hidden with the click of a button. The button should
    act like a toggle; that is, if the element is hidden, then clicking the button
    should show the element and if the element is shown, then clicking the button
    should hide the element. Make sure that it can work in both Internet Explorer
    4+ and Netscape Navigator 4+. As a bonus, make it work for Netscape Navigator
    6.



  2. #2
    Frederiek Guest

    Re: quiz about dhtml


    If you're new to DHTML, and Javascript for that matter, you're better off
    finding yourself some tutorials.
    I could give you the code for all your questions, but that wouldn't help
    you to get an understanding and continue on your own.

    Get yourself Dan Steinman's DynDuo, a cross-browser DHTML tutorial, available
    for download too, at <http://www.dansteinman.com/dynduo/>.
    Go see the FAQ's and articles at <http://www.irt.org/>.
    And for Netscape 6 DHTML issues, see <http://www.scottandrew.com/index.php...dhtml_w3c.html>.

    As for the width of the border around images, just set its "border" attribute
    in the <img> tag, eg
    <img src=... width="xx" height="xx" border="2" alt=alternative text for the
    image describing its function">.
    (Personally, I prefer a border of "0".)

    Good luck.

    cya
    Frederiek


    "alex" <nicky_pu@hotmail.com> wrote:
    >
    >Hi,
    >I am new to Dhtml, could you help me to answer these questions, and send
    >to me, thanks very much for your help!
    >
    >Question 1:
    >Given a URL, called ˇ°home.htmˇ±, and two GIFs, called ˇ°homeoff.gifˇ± and
    >ˇ°homeon.gifˇ±, create a simple HTML page with a button that will go to

    the
    >URL if clicked. The button should display ˇ°homeon.gifˇ± when the mouse

    is
    >paused over the button and ˇ°homeoff.gifˇ± when it is not. Embed the rollover
    >in a Javascript function. What attribute would you use to display a ˇ°tipˇ±
    >when the mouse is paused over the button? What attribute would you use to
    >control the width of a border around the button?
    >
    >
    >Question 2:
    >Create an HTML page with a form containing a text field (for a username),
    >password field, a selection of options (ˇ°i2ˇ±, ˇ°Manugisticsˇ±, ˇ°Adexaˇ±),
    >and a panel of radio buttons (ˇ°B2Bˇ±, ˇ°SCPˇ±). When the user clicks the
    >submit button, do the following client-side validation before actually performing
    >the form action (which can be anything you like):
    >ˇ€check that the text and password fields have some text entered,
    >ˇ€check that at least one option is chosen from the selection and
    >ˇ€check that a radio button has been clicked.
    >If the validation fails, then tell the user and do not perform the form

    action.
    >
    >
    >Question 3:
    >Create a dynamic element containing a GIF, called ˇ°homeon.gifˇ±, in an

    HTML
    >page that can be shown or hidden with the click of a button. The button

    should
    >act like a toggle; that is, if the element is hidden, then clicking the

    button
    >should show the element and if the element is shown, then clicking the button
    >should hide the element. Make sure that it can work in both Internet Explorer
    >4+ and Netscape Navigator 4+. As a bonus, make it work for Netscape Navigator
    >6.
    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center