Welcome to WebmasterWorld Guest from 54.162.93.137

Forum Moderators: open

Message Too Old, No Replies

Add text to iframe?

     
3:50 pm on Jan 7, 2008 (gmt 0)

10+ Year Member



I have a iframe in a html page the displays one line of text.

<iframe src="external url" frameborder="0" width="189" height="15"></iframe>

I need to insert text into the iframe so it displays on one line like this:

Extra text here: iframe text here

How can I do this?

Thank you.

5:55 pm on Jan 7, 2008 (gmt 0)

10+ Year Member



Something like this?

index.html

<html>
<body>

<script type="text/javascript">
function text2add(){
return '<font color=red>This is my new text!</font>';
}
</script>

Main page! Frame below.

<br><br>

<iframe src="iframe.html"></iframe>

</body>
</html>

iframe.html

<html>
<body>

<script type="text/javascript">
document.write(parent.text2add());
</script>

This is my iframe

</body>
</html>

6:25 pm on Jan 7, 2008 (gmt 0)

10+ Year Member



Thank you Trace but I don't understand where the original iframe (src etc,) goes.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month