View Full Version : Getting a form result into a Iframe
aclips
10-22-2007, 10:55 PM
Hello all!!
I have a form that gets information from an external server and i need the results to be displayed on a Iframe under my website. It may be in a Iframe or displayed on a another page in my website, here a bit of the code i have :
<form action="http://external.server.feeder.htm" method="GET" name="f" id="f" >
<input type="hidden" name="LPR" id="LPR" value=0>
<input type="hidden" name="MPR" id="MPR" value=0>
.
.
.
.
input type="submit" value="Search" class="button" name="submit" id="submit" target="results"></td>
<td><input type="reset" value="Reset" class="button" name="limpar" id="limpar"></td>
</form>
I hope you can help me on this
Kind Regards
Aclips
djr33
10-23-2007, 03:47 AM
<form target="framename">
the target attribute works the same way as with links (<a target="...">).
aclips
10-23-2007, 07:18 AM
<form target="framename">
the target attribute works the same way as with links (<a target="...">).
Hi DJR33, thanks for replying, i have done that but it is not showing on the iframe, its keeps opening a new page, here's the code i'm using:
<form action="http://external.server.feeder.htm" method="GET" name="f" target="results" id="f" >
<input type="hidden" name="LPR" id="LPR" value=0>
<input type="hidden" name="MPR" id="MPR" value=0>
.
.
.
input type="submit" value="Search" class="button" name="submit" id="submit" target="results"></td>
<td><input type="reset" value="Reset" class="button" name="limpar" id="limpar"></td>
</form>
"hidden" iframe, to post results:
<iframe width="0" id=”results” name="results" height="0" border="0" frameborder="0" scrolling="auto" align="center" hspace="0" vspace=""></iframe>
Regards
Aclips
jscheuer1
10-23-2007, 03:48 PM
There are a few things about the code as you describe it in your post that raise flags for me.
Don't use the target attribute in the submit button tag.
Running a page from another server in this manner might be a security violation, or be blocked by that server, or by its code from being 'en-framed'.
An iframe should be at least 1 by 1, not 0 by 0, as you have it.
There could be other problems.
aclips
10-23-2007, 11:52 PM
There are a few things about the code as you describe it in your post that raise flags for me.
Don't use the target attribute in the submit button tag.
Running a page from another server in this manner might be a security violation, or be blocked by that server, or by its code from being 'en-framed'.
An iframe should be at least 1 by 1, not 0 by 0, as you have it.
There could be other problems.
Deleted the target fom submit
The permision ofr getting the files form the external server is granted and has no 'en-framed'
I have changed the Iframe for 1by1
Still its not working :(
I was thinking that the content page that the external server sends after the form is submited has an filled header, would that header get the ifram to simply not work properly?
Or maybe the fact that the result html link returns in something like this:
http://external.server.results.htm?LPR=0&MPR=0&nat=&typ=&bus=&stt=&twn=&ngh=&zon=&LAR=0&MAR=&LPR=0&MPR=&ORD=0&ORC=1&ref=&nre=5&submit=Search
What you think?
Regards
Aclips
jscheuer1
10-24-2007, 02:58 AM
Without seeing the site, I can only guess. Oh, I already did that. Anyways, with a complex setup, seeing it might not help much either, but at least I would have a fighting chance.
Having a query string on the URL shouldn't have any effect, unless it triggers yet another action on the part of the external server.
As an experiment, make the iframe like 200 by 200, just to see if anything is showing up in it or not.
aclips
10-24-2007, 07:05 AM
Ok, the website is www.bestsilvercoast.com and the trouble is getting the result from the form of the quick search on the index page.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.