SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru afridy's Avatar
    Join Date
    Mar 2007
    Posts
    966
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    calling two js function onClick help!

    Hai folks,

    Code:
    onclick="return validate(),submitform()"
    First function only works

    Code:
    function validate(){
      var num=document.getElementById('name').value;
      if (num==""){
         alert ("Name must be provided.");
         return false;
      }
    }
    second function is an ajax form submission

    Code:
    function submitform(){ 
    .......
    }

  2. #2
    SitePoint Guru afridy's Avatar
    Join Date
    Mar 2007
    Posts
    966
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    hai folks,
    i put function 1 code within function 2 code and now it works
    np. thank you.


Bookmarks

Posting Permissions

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