Hi, I'm Cathy, a Web Designer/Developer/WordPress Fanatic/Salesforce.com APEX Coder, etc. and I'm from the Philippines. Learn more about me...

How to access element values inside an iframe using Javascript?

Published by under Web Development on Sunday, August 2nd, 2009 at 12:23 am

Here’s another helpful post for beginners in how to access element values inside an iframe.

var txt = window.frames["iframeName"].document.forms["formName"].elements["elementName"].value;

Tip:  To avoid confusion, your page elements should have the same Id and Name.

I hope this helps!

No responses yet