Click to See Complete Forum and Search --> : Problem submitting a form from within an <iframe>


chestertb
10-14-2003, 07:17 AM
Hi all,

I'm using an iframe on my site for the main content.

Evereything works just fine EXCEPT... I can't seem to submit a form from within the iframe.

Here is an extract from the html...

<form name="lookup" action="http://www.[name_of_site_]/search.jsp" METHOD="post">
<input type="text" name="domain.name" size=15>
<input type="hidden" name="domain.tld.com" value="OK" checked>
<a href="javascript:document.lookup.submit()">Go!</a>
</form>

Note that the form submits a name and the .com tld to our domain names reseller page, and I don't want to use this forum as some sort of backhand promotion vehicle, so I've left the [name_of_site] out.

Here's the problem...

When the page is run on its own, it works as per spec. When the page is laoded into an iframe (called "content") and the user clicks Go!, it loads the target page, but does not submit the data.

Any suggestions?

Thanks
IB

Khalid Ali
10-14-2003, 08:10 AM
how about this...

<a href="#" onclick="document.lookup.submit(); return false;">Go!</a>

chestertb
10-14-2003, 09:37 AM
Nope.

Sorry. That didn't fix it. Same effect. As a stand alone, the page submits just fine. Once in the iframe, it just doesn't send the data.

I've noted that the name of the text field to be submitted is "domain.name", and this is out of my control. Could it be the fieldname that is stuffing it up?

Or...

should I try putting the submit function on the top page and submitting from there, and if so, how do I read the data in the iframe form from the top page?

IB