EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: rondc on March 08, 2013, 07:26:41 AM



Title: Passing URL Param to get_users.php
Post by: rondc on March 08, 2013, 07:26:41 AM
I'm using the example below and have a question about how best to pass a URL param value to get_users.php
to apply criteria to the query in get_users.php.  Thanks   

$('#dg').edatagrid({ 
        url: 'get_users.php', 
        saveUrl: 'save_user.php', 
        updateUrl: 'update_user.php', 
        destroyUrl: 'destroy_user.php' 
    }); 


Title: Re: Passing URL Param to get_users.php
Post by: devnull on March 08, 2013, 10:17:46 PM
What about this:

Code:
var userid = 'someone';
$('#dg').edatagrid({
        url: 'get_users.php?userid='+userid,
        saveUrl: 'save_user.php',
        updateUrl: 'update_user.php',
        destroyUrl: 'destroy_user.php'
    });