You are here: Re: Posting Data Between Frames « All PHP « IT news, forums, messages
Re: Posting Data Between Frames

Posted by Erwin Moller on 08/18/05 11:34

Raffi wrote:

> I'm developing an application where the main page has an iframe that
> contains the form. The "Submit" button is located on the main page (not
> the iframe). Is it possible to get the form data from the iframe when
> the "Submit" button is pressed in the main browser page?
>
> Thanks,
> Raffi

Yes, easy enough with Javascript.
Without Javascript, things get a lot more complicated (and I will not
discuss them here.)

Try reposting your question in comp.lang.javascript for detailed
description.

The idea is:
- Add a function to the event pressing the submitbutton.
(eg make it a button, and add onClick, or use onSubmit)
- read all the values from the form
val1 = document.forms.myinnerframeform.firstname.value;
val2 = document.forms.myinnerframeform.street.value;
etc.

Now call a function in your other frame (mainpage)
parent.frames.mainwindow.getThis(val1,val2);

But it has nothing to do with PHP.

Regards,
Erwin Moller

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация