Announcement

Collapse
No announcement yet.

iFraming a 3rd party form

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • iFraming a 3rd party form

    I have an api from another one of our our applications on our server. I need to display result it in my app.
    What I have done is create a Form app.
    I then put the below in the event OnLoad

    <!DOCTYPE html>
    <html>
    <body>

    <iframe src="https://XXXXXXXXXX/Upload/uploadApi?Profile_ID=XXXXX_1" width="200" height="200"></iframe>

    </body>
    </html>


    But I keep on getting an error Parse error: syntax error, unexpected '<' in /opt/NetMake/v71/wwwroot/scriptcase/app/......

    Please can someone help

  • #2
    You cannot put raw html into events. It always needs to be echo'd or the php needs to be broken by ?> then your html code and start phpt again <php
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Albert - Thanks. Excuse ignorance but can you give me an example using what i shared PLEASE

      Comment


      • #4
        In general, if you want to put html elements in your output from an event then you need to write the html from your php in your event. So like:

        echo '<iframe src="https://XXXXXXXXXX/Upload/uploadApi?Profile_ID=XXXXX_1" width="200" height="200"></iframe>';
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment


        • #5
          Or, as Albert also suggested, you can stop and start the PHP session and insert the HTML without using echo:


          Code:
          ?>       // Stops PHP processing
          
          <iframe src="https://XXXXXXXXXX/Upload/uploadApi?Profile_ID=XXXXX_1" width="200" height="200"></iframe>
          
          <?php     // Restarts PHP processing

          Comment


          • #6
            Thank you so much.
            One last question:
            If I had a form app, and wanted to display the iframe in a specific location on the forms page. Hypothetically the right hand side of the page so I could show other data fields on the left.

            Again thanks for your help here

            Comment

            Working...
            X