0

I i have an iframe in a page and I want to be able to submit value to both the parent window and the iframe at the same time.

the form on the parent window is

<form name="ptform" action="javascript:void(0);" onsubmit="javascript:handleSubmit();">
   <input class="zipcode" type="text" size="35" id="location" value="">
   <input class="method" type="hidden" id="method">
    <input class="search" type="submit" value="Search">
</form>

and the form on the iframe is

    <form action="/embed/" method="get" onsubmit="return geocode()">
        <div id="addrWrap">
            <input type="text" id="addr" maxlength="100" autocomplete="off" />
        </div>
        <div id="searchWrap">
            <input type="button" id="search" value="o" alt='Search' title='Search' onclick="geocode()" />
        </div>
    </form>

How do I combine the form to submit to both the parent window and the iframe at the same time?

1 Answers1

-2

You can use HTML5 postMessage to achieve this.

http://html5demos.com/postmessage2

Thanks, Karthik