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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Disable a button in a Different Frame

    I have a 3-frame form. The 3rd frame is named dl_button_frame and contains a form named update_button. The form contains only a save button (named save_button). I want to disable and enable the save button based on the page loaded into frame 2.

    Here's how I'm trying to disable the save button:

    function disable_save() {
    parent.dl_button_frame.document.update_button.save_button.disabled=true;
    }

    The JS function gets called by onLoad:

    <BODY onLoad="disable_save()">

    When I test this I get the error that
    parent.dl_button_frame.document.update_button has no properties.

    Any and All help is appreciated,
    Patrick

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    it is because that frame has not loaded, I think the best bet would be to put the code on the frame that contains the button and do the checking that way.

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]


  •  

    Posting Permissions

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