Output of my perl having a link to a javascript method .....

Hi,
    I have a html page with 2 frames. The upper frame is the output of  a perl program. There is a link in upper frame which should call a javascript
method to change the source of my lower frame.  
   Now how do the output of my perl program have a link pointing to some javascript method in parent page.

Regards,
Pankaj
pankaj_gargAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jhurstCommented:
This is not a perl problem but a Javascript one
0
jhurstCommented:
I agree with your rejection since somewhow EE lost the second part of my response, here it is again:

You need something like the following, where the test.htm will create two frames, the lower one then invokes a function in the upper:

test.htm:
<html>
<frameset rows=200,*>
<frame src=test1.htm>
<frame src=test2.htm>
</frameset>
</html>

test1.htm - this has the function
<HTML>
<body>
<script>
function f()
  {alert("What");
  }
</script>
</body>
</html>

test2, this invokes the function, after a delay:
<HTML>
<body>
test2
<script>
setTimeout("self.parent.frames[0].f()",1000);
</script>

</body>
</html>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pankaj_gargAuthor Commented:
Hey Jhurst,
      Sorry for delayed reply, I was not in town.

Actually my problem is bit different, I have several
links in test1.html
like link1 , link2 ......linkn and depending on the
link you clicked on I have to change the source
file for the second frame ie change test2 to something
else.
 I have to develop something like a FAQ list , depending on the question you click, I have to display
the corresponding details from a file.

Pankaj
 
0
pankaj_gargAuthor Commented:
Hey Jhurst,
      Sorry for delayed reply, I was not in town.

Actually my problem is bit different, I have several
links in test1.html
like link1 , link2 ......linkn and depending on the
link you clicked on I have to change the source
file for the second frame ie change test2 to something
else.
 I have to develop something like a FAQ list , depending on the question you click, I have to display
the corresponding details from a file.

Pankaj
 
0
jhurstCommented:
same method will work.  I have shown you how to access the objects of the other frame.  You can just:
<input type=button onClick=whatever() ...
and the whatever() can reach into the self.parent.frames and change the src values.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Perl

From novice to tech pro — start learning today.