Jump to content

Create button for popup window to display contents of text file


te7

Recommended Posts

I have a Php application that already has 2 buttons with input on the index page that perform some functions and output to different Php pages. Works good. How do I add a button with no input that would just perform a function and then just display a popup window showing the contents of a text file? I want to add several of these buttons for different functions and just display the contents of the resulting text files in popup windows. Any help would be greatly appreciated. Thanks in advance.

 

So I'm assuming the text file you want viewed is on the server and not part of the current page? If so you'd want to use AJAX in conjunction with a MODAL window. Click the button, it fires off an ajax request to the server to retrieve the specified file, when the retrieved info is sent back to the browser display it in a MODAL popup window.

 

This can only be done using javascript and I'd recommend using jQuery if you aren't already.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.