Interfacing two scripts

Results 1 to 2 of 2

Thread: Interfacing two scripts

  1. #1
    Join Date
    Dec 1969

    Default Interfacing two scripts

    Dear Fellas,<BR> I have two script that I would like to interface together.<BR>One is a menu item that is spawned across a frame so that the menu item is active in the frame that the second script is active. This can be seen at<BR>The second script is a slide show script that selects a set of pictures to preview, this can be seen at<BR>The slide show is controlled by setting an array index and executing the function javascript:setslide(9). <BR>The menu I am using has a string field for the path to the file that you want to load. I tried to make this path execute the javascript function but this didn&#039;t work, I think i&#039;m missing a relative statement like parent.&#039;Framename&#039; etc but I am not too sure as I am a very new user to javascript. <BR>Any help very much appreciated.<BR>Thanks<BR>Pete

  2. #2
    Join Date
    Dec 1969

    Default Yeah, parent.framename...

    You have this frameset:<BR><BR>&#060;frameset rows="*" cols="170,*" frameborder="NO" border="0" framespacing="0"&#062;<BR> &#060;frame src="./menu1.html" name="leftFrame" scrolling="no" noresize&#062;<BR> &#060;frameset rows="130,25,*" frameborder="NO" border="0" scrolling ="no" framespacing="0"&#062;<BR> &#060;frame src="./Travel/header.html" name="topFrame" scrolling="no" noresize&#062; <BR> &#060;frame src="./Travel/menu2.html" name="menuFrame"&#062;<BR> &#060;frame src="./Travel/index_frame.html" name="mainFrame" scrolling = "yes"&#062;<BR> &#060;/frameset&#062;<BR>&#060;/frameset&#062;<BR><BR>But you are missing a name on the inner frameset. Say:<BR><BR> &#060;frameset NAME="INNER" rows="130,25,*" frameborder="NO"<BR> border="0" scrolling ="no" framespacing="0"&#062;<BR><BR>Add that name, and then from your "menu1.html" code, in your "leftFrame", if you wanted to muck with something in the "mainFrame" you would do:<BR> parent.INNER.mainFrame.xxxx<BR><BR>Or, to go the other way (have something in "mainFame" muck with "leftFrame") you&#039;d do<BR> parent.parent.leftFrame<BR><BR>Untested--I always put inner framesets in their own frames AND files, for flexibility--but it should work.

Posting Permissions

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