PDA

Click to See Complete Forum and Search --> : form submit, Iframe


Matrixxx
Jul 30th, 2005, 11:17 AM
Hi Friends,

First of all i don't know anything of javascript. Planning to learn such a long time. I need it now for a small function. I have a page with 2 Iframe's in. One inframe is called "content_food" and there is a list in with radio buttons in a form that have a action to a asp page. What i need to do is submit that form from that iframe but my button is on the second iframe. How can that be done?

thanks,

anotherVBnewbie
Jul 30th, 2005, 12:38 PM
I don't think that you'll be able to do that due to browser security. The 2nd Iframe would have to accesss the parent in order to identify the other Iframe and I'm pretty sure that isn't going to be allowed, but perhaps I am wrong...

A good source of JS is http://javascript.internet.com and if it's possible to do what you want it's likely there is a script there that will get you started.

Matrixxx
Jul 30th, 2005, 04:00 PM
I don't think that you'll be able to do that due to browser security. The 2nd Iframe would have to accesss the parent in order to identify the other Iframe and I'm pretty sure that isn't going to be allowed, but perhaps I am wrong...

A good source of JS is http://javascript.internet.com and if it's possible to do what you want it's likely there is a script there that will get you started.


Ok thanks will sure take a look at it.
So if it isn't possible in 2iframe can i make a floating button on the same iframe where the form is in. a button that stays on the bottom of top of the list. that iframe is a list so it is a long scroll. If i can make the button scroll automaticly over the list then it is also ok. Now the button is on top of the page and if you select a item you have to scroll all the list back to hit that submit button.

thanks,

anotherVBnewbie
Jul 31st, 2005, 05:50 PM
I'm pretty sure that javascript.internet.com will have some code for floating buttons of some type.

You could put the button in the parent window since the parent can access all child frames.

Matrixxx
Aug 2nd, 2005, 06:57 AM
Ok and if i put the button in the parent window how can i submit a form in a child iframe?

anotherVBnewbie
Aug 2nd, 2005, 11:53 AM
You can access the child through the DOM (for full coverage of the document object model I'd suggest checking the msdn site), i.e. "document.frames[0].document.forms[0].submit" assuming that the iframe you are submitting is the first one and the form is the first form in that frame.