Jump to content

Display the contents of a third party website page in a div


lynxus

Recommended Posts

Hi guys,

 

Please help :)

 

Im trying to display the output of a php file on a normal html page.

 

For instance, i have

index.html with a div, Inside that div i want the page to load data.php from another server and display it in the index.html page.

 

Basically it so data.php generates a normal table with soem data in, I need to insert that table into index.html ( thats on another server )

 

Ive tried <script language="javascript" src="http://blaaa.com/data.php"></script>

 

But nothing happens..

 

Am i doing something wrong? is my .php script outputting the format wrong?

 

 

Thanks

G

 

Link to comment
Share on other sites

Either would work.

 

On the one hand, iframes don't autoscale according to their content, so a document.write might be better. On the other hand, making sure you've escaped quotation marks properly can get rather complicated when you're outputting html through javascript through php.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.