By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,384 Members | 1,794 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,384 IT Pros & Developers. It's quick & easy.

Submit form in another frame

P: n/a
Ori
Hi!

This is my problem...

I have two frames. one which is my website (top frame), and the other
is someone else website. I want to simulate a submit in the other
website (lower frame)when a user is clicking on a button in my site
(the top frame).

Can i do it?
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
or*******@hotmail.com (Ori) writes:
I have two frames. one which is my website (top frame), and the other
is someone else website. I want to simulate a submit in the other
website (lower frame)when a user is clicking on a button in my site
(the top frame).

Can i do it?


No.
Tha standard security model in browsers will not allow cross domain
scripting.

If the page is just for personal use and your browser is IE, you can
look into HTML-applications (Google for HTA).

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2

P: n/a
"Ori" <or*******@hotmail.com> wrote in message
news:b4**************************@posting.google.c om...
<snip>
I have two frames. one which is my website (top frame),
and the other is someone else website. ... <snip>Can i do it?


No. Browser security requires that scripts originating on one domain are
not allowed access to the DOMs of pages from a different domain. There
is just too much potential for abuse if they were.

Richard.
Jul 20 '05 #3

P: n/a
You might be able to do something like that by tearing the target form
apart.

If you are somewhat conversant with forms, you could create a URL
string which would simulate the form being submitted.

ie If your site is hosted at www.host1.com and the target site has a
page which submits to www.host2.com/processor with the following
inputs FirstName, Surname, PhoneNumber.
You can hardcode a link which will act like a submission of that page
like
the following:
http://www.host2.com/processor?First...ber=1800800800

That link can then be targetted at whatever frame you want.

NOTE: I have only tested this within my work's intranet, so there is
no difference in Domain Names, as such, I cannot comment on whether
this solution is the best for your application.

Luke
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.