Forum Moderators: phranque

Message Too Old, No Replies

how can I put a default value to a text box in an iframe

         

yanov

6:32 pm on Mar 25, 2006 (gmt 0)

10+ Year Member



Hello guys,

I've got a little problem with the transfering of values to an iframe.I've got a main page where I'm collecting data from the customer then the customer may choose from 3 different iframes on my site but he needs to fill the same text boxes so I need to transfer the data from my main page to the different pages of the iframe (notice that the iframe is more than one page!) in order to make it easier for the customer.

Does anybody knows how I can do this. Is it possible at all?

Thanks,
Asen

Dijkgraaf

1:06 pm on Mar 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How is the main page calling the Iframes?

If the Iframe are embeded in the main page, then you should be able to access object in the frame via something like the following JavaScript Object.
document.frame[#].form. etc. (you will have to double check the exact syntax is it is very late at night here :-)
where # is the number of the frame.

Another method is to set the URL of the Iframe to a new URL that includes a query string, and have the Iframe page parse that as it reloads.

I've used both methods sucesfully.