1

So I have never done this but what I am doing is getting information from an HTML Form, passing the information to PHP to calculate what I need and then puts it in an iFrame on the HTML page. I have 8 outputs and kind of wish the data to output like this page does: http://pregapptcalc.appspot.com/.

I tried doing some research online but failed at doing so. Does anyone have any great tips or ideas? Thank you for your time

3 Answers 3

1

To simply display a page in an iFrame like this, all you have to do is create the iFrame with JavaScript when you want it. This is very easy with jQuery, or you can use plain JavaScript.

Most people though will choose to use AJAX, and simply populate DIVs with the results. No need to create a whole new iFrame.

Sign up to request clarification or add additional context in comments.

Comments

0

Might want to check out using ajax for a display like the link you posted. I don't know of anyway to pass parameters to an iframe but you could point it to some text file and reload the page but I'm thinking you don't want to do that with the example you lookign at. Look into ajax its fairly straightforward.

Comments

0

It is easier to just render the result of an AJAX call (the information that your PHP returns) using JQuery or another Javascript framework, in a div or span.

You want to use iframes when you have another website completly different that the one you're in, or to embed another website (like have a Google window inside your website).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.