SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Is this right?

  1. #1
    Obsessive designer Infizi's Avatar
    Join Date
    May 2004
    Location
    North Pole
    Posts
    450
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is this right?

    Ok, my java isnt great, but im trying to disable a button on my form.....

    <script language="JavaScript">
    function buttonoff(){
    document.023.Submit.disabled=true
    }
    </script>


    it dosent work, why?
    New Design - PHP Slowly flowing in!

    Infizi Studio's

  2. #2
    Obsessive designer Infizi's Avatar
    Join Date
    May 2004
    Location
    North Pole
    Posts
    450
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    changed a bit....
    now its
    <script language="JavaScript">
    function buttonoff(button){
    document.023.button.disabled=true;
    }
    </script>

    <input type="Submit" name="Submit" OnClick="javascript:buttonoff(this)" Value="Upload">
    New Design - PHP Slowly flowing in!

    Infizi Studio's

  3. #3
    SitePoint Evangelist SpaceFrog's Avatar
    Join Date
    Jan 2005
    Location
    Outerspace
    Posts
    511
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <input type="Submit" name="Submit" OnClick="this.disabled=true" Value="Upload">
    don't bother about putting Javascript: in an onclick event I don't suppose the browser is expecting a pancake recipe but just javascript.

  4. #4
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <script language="PancakeRecipe">
    function MakePancake() {
    var ingredients = ["egg","milk","flour","butter"];
    return ingredients.mix().fry();
    }
    </script>


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
  •