简体   繁体   中英

How to post data from an iframe to another iframe at a different page

I have a web calendar module will be work inside of an iframe in page-b. It contains 1 page with two sections. When you enter the zipcodes and housenumber, it hides the inputs and shows the calendar. Works with asp.net

The user wants also an input widget to his homepage. So I made an html widget page and will give the customer inside of an iframe too.

My question is how can I post the inputs (inside of an iframe at page-a) to the iframe at another page (inside of an iframe at page-b)

My language is aspx and the customer is using a php cms (I think joomla). I saw some suggests says put the name of iframe inside of a target property like this:

<form id="kalenderForm" action="page-b.php" target="iframe_name" method="post">

But the thing is I also have to write target="_top" to get out of the iframe in the first place I think.

Any suggestions, that would be really helpful.. Thanks in advance

OK. If I understand this right I think you just want to use sessions. The widget works when it is on the page but you want it to also show the calendar when the widget is on a different page. So once the user has entered their address and you show the calendar, you want them to continue to see their calendar any time they see the widget instead of the address form. The user session should be maintained from page to page.

So in your calendar.aspx you would have something like

psuedo code

if( post.formData ) {
  ... db stuff
  session.showCalendar = true
}

if( session.showCalendar ) {
  ... calendar html stuff ...
} else {
  ... show form html ...
}

clearly I am not as asp guy

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM