Reputation: 14125
i have a html page called main.html which have a frame frame1 and a text box txt and i am displaying another html page called tree.html in frame1 and i want to access data of text box in tree.html which is shown in frame1 of main.html. is it possible? if yes then how?
Upvotes: 1
Views: 1191
Reputation: 36081
I'm not sure if this would suit as you don't say why you're needing to do this but if it's to pass values entered into a textbox to a new page, couldn't you use a Query string?
Upvotes: 0
Reputation: 187030
window.parent.document.getElementById("txt1").value
here txt1 is the id of the textbox in the parent page of the iframe.
See window.parent
Upvotes: 2