File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes How  to access objects of formelements from other files? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "How  to access objects of formelements from other files?" Watch "How  to access objects of formelements from other files?" New topic
Author

How to access objects of formelements from other files?

Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 541

Hi,
I'd like to get the objects of the forms elements from other Html files into my current Html file. The other Html files are included in the current Html file insided the frame. i,e.. inside <iframe>..</iframe>.
Thanks and regards,
Narendranath.


Cheers,
Naren (SCJP, SCDJWS and SCWCD)
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
First off, you can only do it if they are on the same domain!
Second:
You are going to need hidden form fields in the main form, then you need to fill them in by using:
document.FormName.ElementName.value = parent.FrameName.document.FormName.ElementName.value;
Eric
Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 541

Thank You for your kind reply.
Regards,
Narendranath.
 
IntelliJ Java IDE
 
subject: How to access objects of formelements from other files?
 
Threads others viewed
Getting properties of another file(ex.HTML)?
iFrame related topic
not able to get width and height of another html file inside html
how to embed content of different page in my page?
attaching files through JavaScript
developer file tools