includes/phpmyadmin/user_details.js
/**
 * Reloads the page to get tables names in a database or fields names in a
 * table
 *
 * @param  object  the input text box to build the query from
 */
Reloads the page to get tables names in a database or fields names in a
table

@param  object  the input text box to build the query from
Reloads the page to get tables names in a database or fields names in a table @param object the input text box to build the query from
function change(the_field) {
    var l        = location.href;
    var box_name = the_field.name;
    var lpos = l.indexOf('?lang');
    if (lpos <= 0) {
        var the_form = the_field.form.elements;
        l            += '?lang=' + the_form['lang'].value
                     +  '&server=' + the_form['server'].value
                     +  '&grants=1'
                     +  '&host=' + escape(the_form['host'].value)
                     +  '&pma_user=' + escape(the_form['pma_user'].value);
        var sel_idx  = the_form['dbgrant'].selectedIndex;
        if (sel_idx > 0) {
            l        += '&dbgrant=' + escape(the_form['dbgrant'].options[sel_idx].text);
        }
        var sel_idx  = the_form['tablegrant'].selectedIndex;
        if (sel_idx > 0) {
            l        += '&tablegrant=' + escape(the_form['tablegrant'].options[sel_idx].text);
        }
    }
    var lpos = l.indexOf('&' + box_name);
    if (lpos > 0) {
        l = l.substring(0, lpos);
    } 
    location.href = l + '&' + box_name + '=' + escape(getSelected(the_field));
} 
function change ( the_field ) { var l = location . href ; var box_name = the_field . name ; var lpos = l . indexOf ( '?lang' ) ; if ( lpos <= 0 ) { var the_form = the_field . form . elements ; l += '?lang=' + the_form [ 'lang' ] . value + '&server=' + the_form [ 'server' ] . value + '&grants=1' + '&host=' + escape ( the_form [ 'host' ] . value ) + '&pma_user=' + escape ( the_form [ 'pma_user' ] . value ) ; var sel_idx = the_form [ 'dbgrant' ] . selectedIndex ; if ( sel_idx > 0 ) { l += '&dbgrant=' + escape ( the_form [ 'dbgrant' ] . options [ sel_idx ] . text ) ; } var sel_idx = the_form [ 'tablegrant' ] . selectedIndex ; if ( sel_idx > 0 ) { l += '&tablegrant=' + escape ( the_form [ 'tablegrant' ] . options [ sel_idx ] . text ) ; } } var lpos = l . indexOf ( '&' + box_name ) ; if ( lpos > 0 ) { l = l . substring ( 0 , lpos ) ; } location . href = l + '&' + box_name + '=' + escape ( getSelected ( the_field ) ) ; }
Reloads the page to get tables names in a database or fields names in a
 table
Reloads the page to get tables names in a database or fields names in a table
// end if
 // end of the 'change()' function
