| Index
» Projects
» phpMyEdit
» Forum
» "Refresh" button |
 |
gimbus109
Joined: 31 Jul 2004
Posts: 6
Location: poland
Posted: 2004-09-03 16:02
Back to top
Reply with quote
|
Hello!
I've made a little modification to phpMyEdit.class.php v1.147. Mayby it will be useful for somebody...
The goal was to have an opportunity to refresh the contents of a grid on a screen while using frames. Clicking "refresh" browser button drives an application to the initial state (or you have to use some session variables etc). With this patch I can refresh only the contents of the desired frame and some alements (links, buttons etc) manually added to the template are displayed correctly after refresh. It could be useful for example when some actions performed by the user in one frame makes changes to the contents displayed in the other frame
Here is a bit modified code of the htmlSubmit function:
| Code: |
function htmlSubmit($name, $label, $css_class_name, $js_validation = true, $disabled = false, $js_submit = false) /* {{{ */
{
// Note that <input disabled> isn't valid HTML, but most browsers support it
$markdisabled = $disabled ? ' disabled' : '';
$ret = '<input'.$markdisabled.' type="submit" class="'.$css_class_name
.'" name="'.ltrim($markdisabled).$name
.'" value="'.(isset($this->labels[$label]) ? $this->labels[$label] : $label);
if ($js_submit) {
if ($js_validation) {
$ret .= '" onClick="return phpMyEdit_form_control(this.form);';
}
else {
$ret .= '" onClick="return this.form.submit();';
}
}
$ret .= '">';
return $ret;
} /* }}} */
|
And one line added to the display_list_table_buttons function:
| Code: |
function display_list_table_buttons($total_recs, $position) /* {{{ */
.......
if ($this->add_enabled()) {
echo $this->htmlSubmit('operation', 'Add', $this->getCSSclass('add', $position), false, false), ' ';
}
// <!-- added
echo $this->htmlSubmit('navop', 'Refresh', $this->getCSSclass('add', $position), false, false, true), ' ';
// added --!>
if ($this->nav_buttons()) {
if ($this->view_enabled()) {
echo $this->htmlSubmit('operation', 'View', $this->getCSSclass('view', $position), false, !$total_recs), ' ';
|
It seems it works OK, but maybe I've missed something.
Pawel
|
jiliray916@
Joined: 01 Nov 2023
Posts: 563
Posted: 2024-01-06 10:26
Back to top
Reply with quote
|
I am incessantly thought about this, thanks for putting up.
roof cleaning bristol
|
QADIRSEO
Joined: 29 Dec 2023
Posts: 1168
Posted: 2024-01-08 11:55
Back to top
Reply with quote
|
very good put up, i definitely love this web site, keep on it
shillong teer result
|
|
Post new topic
Reply to topic
|
|
|
|