add to iframe the javascript of the parent

Posted on 2003-03-13
Medium Priority
Last Modified: 2011-09-20
I have created an html page with an iframe

The content of the iframe is a code which has a table like this (without HTML and BODY tags):

        <td><a href="javascript:go()">go</a>

Javascript fuction called go is defined in the html page which has the iframe

When I display the html and I click on the link, a javascript error appear.
I know that adding the javascript code to the iframe I can resolve this, but my question is:
Can I pass the javascript of the parent html to the iframe without add it to the iframe?


Question by:felixmal
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 14

Accepted Solution

avner earned 750 total points
ID: 8127937
Just use :
<a href="javascript:top.go()">go</a>

or :
<a href="javascript:parent.go()">go</a>

LVL 14

Expert Comment

ID: 8282144
Why is it a B are you missing any info ?

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question