1 Replies - 873 Views - Last Post: 03 August 2011 - 11:49 PM

#1 itdoell  Icon User is offline

  • D.I.C Head

Reputation: 8
  • View blog
  • Posts: 239
  • Joined: 13-January 11

Opening a PHP file without page refresh

Posted 03 August 2011 - 05:00 PM

I want to make a file editor that opens after a user submits a file. However I need to do this without the page refreshing. I can't do it with an iframe because it will be a lightbox style editor, and when they are finished editing it should close automatically, which can't be done (to the best of my knowledge) if I load it in an iframe. So does anyone know how this can be accomplished? How I can submit values to a PHP file and display the file without page refresh.

I know how to submit the file using AJAX, but I don't know how it would be possible to load the file with the new database values without refreshing the page. Any help is very much appreciated, thank you.

Is This A Good Question/Topic? 0
  • +

Replies To: Opening a PHP file without page refresh

#2 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1010
  • View blog
  • Posts: 3,566
  • Joined: 05-June 09

Re: Opening a PHP file without page refresh

Posted 03 August 2011 - 11:49 PM

You use AJAX again. You can simply do them one after another, load in the HTML you require from the database and put it into the new page straight up.

So basically, once your file upload is finished, either have that request return some HTML you can inject into your page, or immediately do another request that will grab the new HTML you need to popup that editor and use that.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1