CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Input parameters to self

Print topic Send  topic

Author Message
dbernhar
Posted: 01/22/2002, 8:26 PM

I'm looking for a way in codecharge to have a page set it's own input parameters. In essence this "hard-codes" a couple of values in the php code generated by CC. Is there a way to append paramname=value to the sParams list when the page is opened? This way, the paramname=value string appears in the URL when the page is activated.

Currently, (in PHP) I have every form that calls my page appending the param=value to the sParams string or the sActionFileName string. I've tried appending param=value to the sParams string in my page and form/open events, but the parameter is not getting set.

here's my code:
if ($sParams != "")
$sParams .= "&FormcategoriesGrid2_Page=2&FormcategoriesGrid3_Page=3";
else
$sActionFileName .= "&FormcategoriesGrid2_Page=2&FormcategoriesGrid3_Page=3";

This is put in every "afterX event" (like AfterUpdate) of every form that lists categoriesGrid as its action page. I can't seem to put this same code block in the categoriesGrid/page Open, or it's respective form/opens and have the parameter available via "get_param()".

My implementation is, I have a db w/100+ category names in it. The names are sorted alphabetically (via SQL query) and loaded into three side-by-side updatable grid forms (w/checkboxes next to category names). I turn Page Navigation on and set the number of records(n) I want displayed on each grid form (in form/properties), then hard-code $iPage to match the Grid (1st grid, second grid, or third) so that the first (n) category-names are displayed in the first Grid, second (n) in second grid, and remainder in last grid. $iPage value is obtained by a get_param() call. I'd like categoriesGrid page to self-set that variable, rather than each form that calls categoriesGrid to have to append the variable to sParams or the URL string.

Any ideas?

Thanks!

Dena
Nicole
Posted: 01/23/2002, 5:00 AM

Dena,
to force parameters values appear in url string they should be passed from any other page. The workaround in your case I suppose is to check in e.g. Open event of the page are the particular parameters were passed. But they aren't stored in sParams variable (the parameters to be sent from the page are stored there).
Use getenv("QUERY_STRING") to get the string of passed parameters. Check them and if e.g. no parameters were passed redirect user to the same page but add proper parameters to url.


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.