www.webdeveloper.com
Results 1 to 5 of 5

Thread: Can anybody help me answer some of these questions?

  1. #1
    Join Date
    Nov 2009
    Posts
    7

    Can anybody help me answer some of these questions?

    So I'm taking my first JavaScript class in school and the semester is very close to being over.
    I have a lot of work to catch up on and my teacher isn't the best professor.

    Right now I have 6 questions left to answer before I try to start working on my actual programs, but I can't really figure out the answers to them.

    The questions are:

    1.Explain how to simulate limited dynamism and interactivity with simple hypertext links.

    2.Why do you need to use the getElementById (), getElementByName (), or getElementByTagName () method?

    3.Explain why you would use the sub expression.

    4.How do you use DHTML to show and hide an underline beneath an <a> element when a user places his or her mouse pointer over a link?

    5.Explain the difference between the display and visible properties.

    6.Explain how to create traveling animation with DHTML.


    You can be as descriptive as you want, as even a one sentence answer should be useful.
    So if anyone would be so kind as to help me out with any of these questions, you'd be saving me from one extra step that would contribute to the loss of my sanity..because quite frankly this stuff is really confusing to me.

  2. #2
    Join Date
    Feb 2006
    Posts
    2,927
    # 5 should be, display and visibility, not visible.

    The sub expression and travelling animations are terms specific to your class-
    you must've had your ipod on, saving your sanity, when it was brought up in class.

    Can't be too careful with your sanity- a mind is a terrible thing to use.

    I bet you wish your name was hoppy...

  3. #3
    Join Date
    Jan 2004
    Location
    Washington DC
    Posts
    1,107
    1.Explain how to simulate limited dynamism and interactivity with simple hypertext links.

    If that actually made sense, I could help with the answer

    2.Why do you need to use the getElementById (), getElementByName (), or getElementByTagName () method?

    This is rudimentary, learn it

    3.Explain why you would use the sub expression.

    There is a "method" called "sub()" but if you use it in the real world, you will be shot because it has absolutely no use since it was added to Internet Explorer 3. (What the hell are they teaching you in school?)


    4.How do you use DHTML to show and hide an underline beneath an <a> element when a user places his or her mouse pointer over a link?

    You don't. You use CSS :hover pseudo class.

    5.Explain the difference between the display and visible properties.

    Since "visible" is only available in Netscape Navigator 4.0 (visibility="visible") (circa 1997), it has no relevance to modern internet browsers. "display" on the other hand is not a property but a CSS style rule.

    6.Explain how to create traveling animation with DHTML.

    You don't. With modern internet Javascript libraries, you use built-in functions to animate the top and/or left position of a given DOM element

    Truthfully, if this is the CRAP that they are teaching you in school, you might as well be learning FORTRAN!
    Last edited by crh3675; 12-01-2009 at 08:46 PM.

  4. #4
    Join Date
    Nov 2009
    Posts
    7

    Well Thanks

    I managed to get something down for these with your help crh3675. But your comment at the end made me think. I mean if what we're "learning" isn't even right, then why bother with it?

    The professor doesn't even teach us anything anyway, so actually mrhoo, it hardly was brought up. I can see why you'd think it would be though..considering it is a school, where beginners are supposed to be taught the subject matter. But no. It's pathetic.

    Anyway thanks for the help. Hopefully I can at least get the credits for this class and maybe just get a book and teach myself afterwards.

  5. #5
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    some comments:

    1. crh3675 is absolutely right. What, for God's sake, means: "to simulate limited dynamism" ? Or "limited interactivity"? With "simple hypertext links"? I wonder how a complex one could look like

    2. The methods are getElementsByName() and getElementsByTagName(). They return always collections of elements.

    And the question "Why do you need to use ..." is absolutely silly. I could have answered : "Why not?" The referential methods are the basis of JavaScript - before doing anything with some document's elements, you must refer those elements, a way or another. Before aiming a target you must know where that target is.

    6. You can't. At least you can not a full traveling animation on using external objects (images). All you can do is to move them on a 2D dimension plane, from a x1:y1 position to another x2:y2 position. And even there you can not rotate, skew or distort them. And changing their size will make the images out of shape or deformed. So far (at a cross-browser level), JavaScript is limited within this sort of movements.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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



Recent Articles