?
Solved

add to iframe the javascript of the parent

Posted on 2003-03-13
2
Medium Priority
?
307 Views
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):

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

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?

Regards

0
Comment
Question by:felixmal
[X]
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
2 Comments
 
LVL 14

Accepted Solution

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

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






0
 
LVL 14

Expert Comment

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

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