Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Client Side VBScript to disable a button from a IFRAME

Status
Not open for further replies.

ironhide1975

Programmer
Feb 25, 2003
451
US
Can someone give me a quick code example of Client Side VBScript specifying that a Button in the parent frame (the code for this is in another page loaded by an IFRAME) can disable a button in the parent page's form?

In short, Page A loads Page B, but if you choose to load Page B, it disabled the form buttons on Page A.

 
Give the button an id (say btnid). Put a line in the onload handler like this.
[tt] if not (window.parent.document.getElementById("btnid") is nothing) then
window.parent.document.getElementById("btnid").disabled=true
end if
[/tt]
 
Ok small change is there a way to just tell a button on a page in an IFRAME to hide the DIV on the parent page?

For example, I click button on Page B to hide a DIV on Page A.

 
>Ok small change is there a way to just tell a button on a page in an IFRAME to hide the DIV on the parent page?
Same construction. How do you hide a div on the same page? Transcribe it to the above construction shown and put it in the onclick handler.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top