Also, if you want a GET call using load method you need
the params in the URL but in this case you expose the params
in the URL (anybody can see your request sniffing the net also
using https), and you have a size limit for params data.
using GET call:
$("#mydiv").load("myserverside.php?param1=va
This is the jQuery inside code for load function:
load: function( url, params, callback, ifModified ) {
[...]
// Default to a GET request
var type = "GET";
if ( params )
// If it's a function
if ( jQuery.isFunction( params ) ) {
[...]
Thanks. I did the following with your function in a file named
ajaxdebug.php:
$('#debug').load("ajaxdebug.php",{Title:'NewCourse'});
I get this: Array ( )
However, when I roll my own ajax using a select that calls a custom js
function that calls ajaxdebug.php, it shows the following:
Array ( [
$_GET is just an array. I generally add a dbug function in PHP like
so:
function dbug($var)
{
print "" . print_r($var) . "";
}
Then just call dbug($_GET); anywhere you want to see the name/value
pairings.
-khoker
On Apr 18, 4:01 pm, duggoff <[EMAIL PROTECTED]> wrote:
> I added some deb
I added some debug code to my php file, so that it will give a value
of -1 to it's $campname variable if it can't find anything in $_GET.
I've tried these:
var campName = 'NewCourse';
$('#table').load("camp_table2.php",{Title:campName});
returned value is -1 (didn't get the Title:Coursename pair
Doug,
I didn't try it, but I would expect the key/value pair to look like
this:
{ key : 'value' }
In your example ...
$('#table').load("camp_table2.php", { Title : 'Campname' } );
-khoker
On Apr 18, 3:05 pm, duggoff <[EMAIL PROTECTED]> wrote:
> I've gone through the tutorial for Quick and
duggoff wrote:
I've gone through the tutorial for Quick and Dirty Ajax (http://
15daysofjquery.com/quick-and-dirty-ajax/14/) and I'm having a problem.
I have a php file that queries a database and returns a populated
table. If I call it from my browser like this: camp_table.php?
Title=Campname i
7 matches
Mail list logo