Welcome to WebmasterWorld Guest from

Forum Moderators: incrediBILL

Message Too Old, No Replies

anchor link in a iframe

10:25 pm on May 13, 2011 (gmt 0)

New User

5+ Year Member

joined:Apr 21, 2011
posts: 30
votes: 0

Hi guys,

How are you all?

Im putting together a site at the moment and it uses an iframe for a form because that's what they want it.

Is there a way to have a button in the main page and on click send it to the textbox inside the iframe?


3:19 am on May 14, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
votes: 0

When you create the iframe, you can give it an id attribute: <iframe id="mxyzptlk">

Then when you create an anchor tag in the parent page, you can use a target="mxyzptlk" attribute to target changes within the iframe. This normally means refreshing the iframe's entire content to a different URL.

Changing just a textbox on the iframed URL would not be an HTML functionality, and unless you want to refresh the entire URL, you would probably use AJAX or JavaScript. If that is what you want to do, we've got a dedicated JavaScript and AJAX forum [webmasterworld.com] where you can ask for more detailed help, if needed.
4:29 pm on May 15, 2011 (gmt 0)

New User

5+ Year Member

joined:Apr 21, 2011
posts: 30
votes: 0

Thanks Tedster,

They have now decided they dont want an iframe so this is not going to be a problem anymore. But i will look into it for future reference.

Thanks for taking the time to reply
12:26 pm on June 2, 2011 (gmt 0)

New User

5+ Year Member

joined:June 2, 2011
posts: 8
votes: 0

I'm glad they decided to not use iframes, I am not a big fan. Though, that's just me ;)

[edited by: incrediBILL at 12:45 pm (utc) on Jun 2, 2011]
[edit reason] sigs removed [/edit]


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members