...

View Full Version : Disable a button in a Different Frame



patrickj
03-11-2005, 02:16 PM
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

A1ien51
03-11-2005, 06:25 PM
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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum