Jump to content

Running a seperate php file


Awanka

Recommended Posts

I need the code in the following php file to run:

 

========'recentCampSettingsExcel.php'==================

 

<?php

include 'includes/php_includes.php';

 

session_start();

$_SESSION['firstTime'] = 'GIRL';

session_write_close();

 

//window.close();

?>

=================================================

I'm currently executing this file with the following line of code:

 

<a href="javascript:void(0)" onclick=openPopup('recentCampSettingsExcel.php', 'recentCampSettingsExcel', 600, 500)"><b>(Export to Excel)</b></a>

 

I don't want to open it up using a popup though.  Is there some other function I can use that just executes whatever code is in the file without opening up anything?

Link to comment
Share on other sites

If thats the case have a read up on AJAX. Here is an [ur=http://www.ajaxfreaks.com/tutorials/1/0.php]Introduction Tutorial[/url] on AJAX. It still uses ajax but it allows you to call a script in the background. AJAX can also return the results from the processed filed to the HTML page too.

Link to comment
Share on other sites

You can accomplish this without AJAX.  Use the DOM to create an invisible iframe and point the src attribute at the script you'd like to run.  When the iframe is created, you can assign it an onload event handler that destroys the iframe; that way you aren't left with dozens of iframes if the user clicks the link multiple times.

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.