why can't I display the grid and a button at the same time?

I have difficulty to display the grid and a button on the same page. It is very strange.
what I have for the grid is the activewidgets.php and I want to do paging, so I append the following codes for the activewidgets.php

// // bottom page control buttons
$html .= "<"."div".">\n";
$html .= "<"."button onclick='goToPage(-Infinity)'".">"."&lt;&lt;"."</"."button".">\n";
$html .= "<"."button onclick='goToPage(-1)'".">"."&lt;"."</"."button".">\n";
$html .= "<"."span id='pageLabel'"."></"."span".">\n";
$html .= "<"."button onclick='goToPage(1)'".">"."&gt;"."</"."button".">\n";
$html .= "<"."button onclick='goToPage(Infinity)'".">"."&gt;&gt;"."</"."button".">\n";
$html .= "</"."div".">\n";

// button click handler
$html .= "<"."script".">\n";
$html .= " function goToPage(delta){ var count = $name.getProperty(\"row/pageCount\"); var number = $name.getProperty(\"row/pageNumber\"); number += delta; if (number < 0) {number = 0} if (number > count-1) {number = count-1} document.getElementById('pageLabel').innerHTML = \"Page \" + (number + 1) + \" of \" + count + \" \"; $name.setProperty(\"row/pageNumber\", number); $name.refresh(); }\n";
$html .= " goToPage(0); \n";
$html .= "</"."script".">\n";

That is from the /patch/paging1.htm . I also wondered that maybe it is the complicated button codes messes the thing, so I tried a simple button,

$html .= "<"."div".">\n";
$html .= "<"."input type=\"button\" value=\"test\"".">\n";
$html .= "</"."div".">\n";

however, it cannot been displayed as well.

I put the activewidgets.php inside an iframe, does it matter?
When I try to just display the activewidgets.php, it got button appearing in the web page but the grid said "'obj_data[...]' is null or not an object " I know this is because of the data is not retrieved properly. So it means that the button can be displayed but just cannot be displayed together with the grid with data.
I am confused by this for 2 days already. Really need your advice.

thanks a lot
puzzled by paging
September 29,

This topic is archived.

See also:

Back to support forum