The Common.php code is good
I edited Example1.php to include the following (expanding on lines 49 -> 55):
- Code: Select all
...
<script type="text/javascript">
document.writeln('Test 1: <br />');
trackHistory = false;
document.writeln('Test:2: <br />trackhistory= ' + trackHistory + '<br />');
var ajaxUrl = 'Example1.php'; /* option 1
var ajaxUrl = '<?php echo $_SERVER['PHP_SELF']; ?>'; /* option 2
document.writeln('Test:3: <br><div> '+ ajaxUrl + '</div>');
document.writeln('Test:4: <br><div>ajaxUrl= '+ ajaxUrl + '</div>');
toAjaxTableEditor('update_html','');
</script>
<?php
}
...
... swapped lines "option 1" and "option 2" around though essentially got the following:
- Code: Select all
Test 1:
Test:2:
trackhistory= false
Test:3:
/lapwing/updates/Example1.php
Test:4:
ajaxUrl= /develop/updates/Example1.php
with or without the full path depending on option 1 or 2
I got the following line from the logs when
- Code: Select all
Jan 20 11:32:17 blah.foo.bar httpd2-prefork: PHP Fatal error: Call to undefined function mb_convert_case() in /srv/www/htdocs/develop/updates/php/AjaxTableEditor.php on line 113
which is
- Code: Select all
$this->tableTitle = mb_convert_case(str_replace('_',' ',$this->tableName),MB_CASE_TITLE, "UTF-8");
p.s. I am running
- openSUSE 11.2
- Code: Select all
Linux blah 2.6.16.60-0.42.7-xenpae #1 SMP Tue Nov 3 11:20:42 UTC 2009 i686 i686 i386 GNU/Linux
- php 5
- Code: Select all
PHP 5.2.5 with Suhosin-Patch 0.9.6.2 (cli) (built: Sep 24 2009 12:23:06)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
- MySQL 5.0
- Code: Select all
mysql Ver 14.12 Distrib 5.0.26, for suse-linux (i686) using readline 5.1