Call a javascript function in an iframe from other frame

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fuhrer
    New Member
    • Dec 2006
    • 30

    Call a javascript function in an iframe from other frame

    Hi all,

    i have an HTML page divided in 2 Frames (frame1,frame2) ;
    in frame1 i have an iframe(datamain ), my problem is :

    i'm trying to call a javascript function( hidemenu() ) in the iframe from the 2nd Frame(frame2) but it didn't work
    parent.frame1.d atamain.hidemen u();

    what should i do????

    Thanks
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    You need to give the iframe a name and use the frames array:
    Code:
    frames['iframename']
    See this page.

    Comment

    Working...