Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: Form Actions

  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Brisbane, Australia
    Posts
    181
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Arrow Form Actions

    When a button is clicked; an event occurs.


    but this event can change.
    i dont want the event to be assigned to the button
    and i dont want a function to choose what even to happen

    i would like javascript to manage the events.

    document.userdefform.elements["item"].onClick = "selectit(this)";

    this doesnt work..
    but it's the theroy i'm describing.


    any ideas?
    -mR_eGo
    _______________________
    Programming since
    3 years old.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Brisbane, Australia
    Posts
    181
    Thanks
    1
    Thanked 0 Times in 0 Posts
    anyone?
    -mR_eGo
    _______________________
    Programming since
    3 years old.

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,042
    Thanks
    0
    Thanked 251 Times in 247 Posts
    try:
    document.userdefform.elements["item"].onclick = function(){selectit(this)};

  • #4
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    or try:

    document.userdefform.elements["item"].onClick = selectit(this);
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #5
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,042
    Thanks
    0
    Thanked 251 Times in 247 Posts
    watch the case, it should be onclick and using your solution will call the function immediately when that line is executed. What you want to do is assign the handler not execute it immediately.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •