1

I want to provide some free appointment service. e.g. doctors can integrate a calendar in their homepage. Possible patients can book an appointment on the doctor's page and must fill a little multipage form. (2-3 pages)

What is the best way the doctors can include the calendar and the multipage form on their site? I think iframes are deprecated or not? I was exposed to use jQuery. What do you think, is this the right way?

franzlorenzon
  • 5,845
  • 6
  • 36
  • 58
thomas
  • 164
  • 11

2 Answers2

2

If you don't want to do an Iframe, then create a simple script.js they can include on their site that will load the form into a div. It will also have to submit via AJAX as well.

Use an iframe if you wanted to prevent cross-domain scripting.

b01
  • 4,076
  • 2
  • 30
  • 30
1

You will not be able to display an external (Cross-Domain) form directly using any flavor of javascript. The only client-side solution is to use an iframe.

This is a restriction to prevent cross site scripting (XSS) attacks. There are modern alternatives like Microsoft's Cross-Domain Request (XDR), but this is a proposal and will not work in all browsers. Getting this to work client side will be a large undertaking.

There is one caveat: Server side languages do not have the same safeguards in place against XSS that modern browsers do. If you were to write a handler in a server side language that echoed the contents of an external form to your page, then you could indeed use jQuery, or JavaScript in general, to display this without using an iFrame.

MaxPRafferty
  • 4,819
  • 4
  • 32
  • 39