MichaelMcDonald
Posts: 640
|
Posted: 11/11/2012, 6:43 PM |
|
Is it possible to simply post a URL parameter with the On Click event of a button without using $Redirect; as all I want to do is send a Page = 1 url parameter so that my search results load into the first page when a large page size has been specified using the navigator, otherwise results load in the subsequent pages and the navigator back button has to be pressed to get to them and view them...
_________________
Central Coast, NSW, Australia.
|
|
|
bannedone
Posts: 273
|
Posted: 11/11/2012, 6:51 PM |
|
Hi
Not sure I completely understand what U wanna do here.
Can U elaborate a little or "Moon Bounce" more detail?? LOL
_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2 |
|
|
MichaelMcDonald
Posts: 640
|
Posted: 11/11/2012, 7:58 PM |
|
Nice Pic.
I want to set the active page to be "1" on a grid where pagesize is used.
I have tried using the "Set Active Page" action to set to Page 1, but it generates an incorrect Button component name and so there is no matching named event handler. I tried rectifying with a component name change, but no avail, etc, etc... and so abandoned that idea when i realised why so many other onclick events don't work where they have to relate to an event handler.
Apart from that, there is another problem and I may have to re-create the grid. What I have tried as a workaround is to add a textbox with a default value of "1" on my search form. This works on other search forms. When I press the search button it posts a value "gridAssetPage=1" and shows up in the URL bar.
But with this grid, it doesn't overwrite an the existing PageSize value, pressing that search button posts "gridAssetPage=1" but if my grid is on page2 or so on, what I get in the URL bar is 2 PageSize parameters: gridAssetPage=1 and gridAssetPage=2, and so the grid stays open on page2 because it is reading: gridAssetPage=1&gridAssetPage=2
_________________
Central Coast, NSW, Australia.
|
|
|
bannedone
Posts: 273
|
Posted: 11/11/2012, 8:06 PM |
|
Thanks... LOL Though I would join your pic rotation LOL
Have you tried something like this in the server side OnClick event Custom Code for a button like so?
header("HTTP/1.1 301 Found");
header("Location:your_page.php?gridAssetPage=1");
exit;
Or maybe try setting preserve parameters to none for that record or button...
_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2 |
|
|
MichaelMcDonald
Posts: 640
|
Posted: 11/11/2012, 9:55 PM |
|
Between a rock and a hard place...
There are about 15 other url parameters that I actually want to keep and don't want to have to resend them....just want the one to overwrite....
_________________
Central Coast, NSW, Australia.
|
|
|
bannedone
Posts: 273
|
Posted: 11/11/2012, 10:08 PM |
|
Then maybe try remove parameter for that single parameter and hope the search submit will put it back in correctly after removing the old one...
Just a thought.
If that does not work.. I have another idea to try but it will take some experimentation.. So let me know...
_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2 |
|
|
MichaelMcDonald
Posts: 640
|
Posted: 11/11/2012, 10:45 PM |
|
Sorted it.
Problem was with the search form for some reason the POST function was failing on the first press of submitbutton.
Re-created form and placed a hidden field on the form "gridLocationPage" (was not asset, but that was just an erroneous type) was def something wrong... anyhoo new search form w hidden field gridLocationPage has a before show:
$searchLocation->gridLocationPage->SetValue("1");
Works a treat and ensures that all search results are loaded in and displayed from Page 1.
_________________
Central Coast, NSW, Australia.
|
|
|
bannedone
Posts: 273
|
Posted: 11/11/2012, 11:26 PM |
|
Good News Bro...
Having Fun???
BTW I have picked out a radio!!!
An ICOM IC 9100 with a 1kw linear
Should be able to "Moon Bounce" you... LOL
_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2 |
|
|
|