javascript onclick this button but onclick other button

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • perhapscwk
    New Member
    • Sep 2007
    • 123

    #1

    javascript onclick this button but onclick other button

    I want to write something like below.

    after click the button, it will auto click the other 2 button in the same page,
    how i can do this? the number 14 and 17 are always different when the page load.

    another question, how to use javascript to get the id name for 'save14' but
    i only need the number after 'save'?

    Code:
    <input type='button' name='save value='Save' onclick=\"saveContact()\" >";
    
    <input type='hidden' name='save value='Save14' onclick=\"saveContactnew('14')\" >";
    <input type='hidden' name='save value='Save17' onclick=\"saveContact('17')\" >";
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    you just need to call the functions with the corresponding parameter ... there is no need to 'fire' a click event ...

    Comment

    Working...