26 (edited by edrobinson 2008-12-18 7:08:01 PM)

Re: Unobtrusive $xajax->printJavascript();

Just tried my deferral script in a production script using B2 and I
get an error about undefined function configure()...

My original test was using RC2.

When was ->configure() added?

Any ideas.

NEVER MIND... I messed up:)

Ed

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.

27 (edited by CarlitosWak 2008-12-18 7:21:10 PM)

Re: Unobtrusive $xajax->printJavascript();

Make sure to check this out

http://community.xajaxproject.org/viewt … 628#p26628

I found the configure() on one of the post.  Not to sure.

Re: Unobtrusive $xajax->printJavascript();

!@#$

Using the example script I posted above things don't work...

require_once("QuePhpCommons.php");                //Portability stuff.
define("USEXAJAX", "yes");                                 //Want xajax installed 
//define("USEAS400", "yes");                              //Want to use the AS400 interface
//define("TESTING", "yes");                                /in the test mode?
require_once(INCLUDES."QueStandardsCSS05RC2.php"); //Load the RC2 version of the standard stuff.
//$uriName=basename(__FILE__); //Uncomment to use script deferral
//require_once(INCLUDES."/script_deferral_setup.php"); //Likewise
$db = new intranet_table('');                              //mysql access to intranet
$recnum = $_GET['recnum'];     //Record number of the saved request.

If I uncomment the 2 commented lines then $recnum is not available to the function that processes the page!

I alert it and it is blank.

Any thoughts...

Ed

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.

Re: Unobtrusive $xajax->printJavascript();

what is it that you are trying to accomplish?

Re: Unobtrusive $xajax->printJavascript();

Well, rats!

I added the above imclude to one of my production pages and used RC2. The page is part of an employee time off request process. The page receives the MySQL record number as the query string.

i.e. yadayada.php?recnum=15

In the following code, if I uncomment the 2 lines labeled "<- Problem" then the variable $recnum is always empty. sad

require_once("QuePhpCommons.php");                         //Portability stuff.
define("USEXAJAX", "yes");                                 //Want xajax installed 
//define("USEAS400", "yes");                               //Want to use the AS400 interface
//define("TESTING", "yes");                                //in the test mode?
require_once(INCLUDES."QueStandardsCSS05RC2.php");
//$uriName=basename(__FILE__); //<-- Problem
//require_once(INCLUDES."/script_deferral_setup.php"); //<--Problem
$db = new intranet_table('');  //mysql access to intranet
$recnum = $_GET['recnum']; //Record number of the saved request.

Any ideas?

Ed

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.

31 (edited by edrobinson 2008-12-19 5:26:17 PM)

Re: Unobtrusive $xajax->printJavascript();

OK, here's the deal.

XAJAX uses POST so when I try to retrieve something from the original $_GET it is no longer available.

The solution is to either use a session variable or a hidden input when the page loads. I chose the latter and life is good again.:)

I still do not understand why it works if the deferral scripting is not invoked...

Ed

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.