| Index
» Projekty
» phpMyEdit
» Fórum
» Dirty Word - AJAX |
 |
JammerPro
Založený: 07.12.2006
Príspevky: 33
Zaslal: 2009-10-31 13:53
Návrat hore
Odpovedať s citátom
|
OK, now that I've got your attention <grin>, I know all of us PHP programmers hate to use Javascript and Ajax for several reasons (including, but not limited to the user can turn these features off)...
Notwithstanding, it would be really nice to have a form self populate after the user chooses an option from a select box.
For example, I have a select box that lists a case name from a column in table 1 [case.name]. In the same row is a billing rate [case.rate], which is a value entered by the user to show what rate you will bill this client per hour (i.e. $350).
Here's the rub. I use another table [table 2] to enter a client's charge. So, field 1 is a select box showing the names of the cases from table 1 (where you select the case to be charged) and field 2 is where you need to enter the rate... which you have already specified in table 1, but cannot appear here because when you bring up the change screen, PHPMyEdit has no idea what case has been selected in field 1.
Now, you can have field 2 in table 2 made "read only" and lookup the value with an "after" trigger. However, as we all know, this process is invisible on the change screen until after the update process is complete.
I wonder if any of you AJAX gurus out there could find a way to populate field 2, table 2 (rate) upon selection of the "case" (field 1, table 2) from the drop down box above...
My solution has thus far just involved using an after trigger to compare the rate entered with the true rate from table 1, explain it to the user in the trigger screen, then send the user back to make an adjustment... In short, Mickey Mouse and Donald Duck are laughing at this "rigging" to make PHP do something it was not really designed to do (i.e. prepopulate a form based on a selection within the form)...
Any suggestions are definitely welcome!!!!!!!
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|