Web Analytics Made Easy -
StatCounter Help, fUNCTION TASK? - BASIC so help - CodingForum

Announcement

Collapse
No announcement yet.

Help, fUNCTION TASK? - BASIC so help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help, fUNCTION TASK? - BASIC so help

    Okay I have a Classwork Due tomarrow and im still lost...
    if you want to know what im doing please click this

    http://www.bigbadbrain.com/western/web101/js2/js7_3.htm

    basically i need to do various thing using a function but what i need most help right now on are...

    4. Write a function that accepts two textboxes as objects and switches their values.

    5. Write a function that accepts an object and two values representing the distance in the horizontal and vertical directions. The object should be moved the amount specified.

    ---------------------------------------------

    okay i got the code for 4. - but i dont know what im doing wrong can someone help?

    <html>
    <head>
    <script>
    function Change(x,y){
    x = y
    y = x
    }
    </script>
    </head>
    <body>
    <input type ="text" id="txt1" value="Switch"/>
    <input type ="text" id="txt2" value="Me"/>
    <input type ="button" onclick="Change(txt1.value,txt2.value)" value="Clickers">
    </body>
    </html>

    for number 5. im really lost in, and if you can give the code or resourses to do so ill be helpful, i never learn map in HTML, so im kinda lost...

  • #2
    You can change the values of a text box with

    document.FormName.ElementName.Value;
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

    Comment

    Working...
    X