I think I am getting close to finding this out. So, FYI, I may not need you to respond to my last posting (below). I was able to get a clue from one of the samples where more than a single parm is passed via js. It appears I need to use [parm1, parm2] syntax in the js. I am still digging through the wc docs, etc to find the "nice" way to retrieve these parms since it appears they are not passed in "expected form" to the fox function (they come in as 0.00 and 0.00, parm 1 & 2). IOW, for FUNCTION DispositionChange(tcID, tcDispCode), tcID = 0.00 and tcDispCode = 0.00. I see that REQUEST.cFormVars contains &Parm1 and &Parm2 values matching the values passed by js, but I am not sure of the recommended method of acquiring these in m fox function.
Thanks -B
Hi Rick,
Ok it's werking now. The main problem (besides my complete lack of JS know-how) was the libraries were not loading properly. Including the <script src="/<my virtual>/scripts/jquery.js"> lines in the page fixed this. for some reason the ~/scripts path is not werking.
I very much appreciate the awesome doc re dynamic selections loading--this very cool and will werk for my application!
For now, however, I have already taken on more than I should for the current project. <s> So, I am going to continue building the selection lists into the page (and causing bloat) for now and attempt the more graceful solution when I have more time. Also, note that I am adding the columns via VFP code, not in the page itself (like the demo). I am doing this to allow users to choose which columns are displayed without having to hard code the entire union set in the page (at least, for now / FYI). I suspect this is maybe not a good thing and I need to just code the columns in the page to make accessing selected values more straight-foward, but I can't help wondering if there's not an easy way to pass the selected value along with the record ID in the callback?
If so, I need another "clue" regarding how to acquire the list control's value in the JS and pass it back in addition to passing back my record ID/key. What do you recommend?
IOW, I have the following snippet in my page.
I tried using the following with no luck.
-B
Several problems with your code: events should have no JavaScript tag (and it needs to be javascript all lower when you do use it). Additionally your first parameter needs to be in quotes.
FireBug or the IE Script debugger are your friend - they will show you the errors in your page code or when page is executed and fails - otherwise these errors fail silently which is highly undesirable.
However I would recommend that you dynamically load the drop downlist only when needed rather than rendering it into the page for each item (unless each item has different options) to avoid page bloat due to duplication.
+++ Rick ---
I want to execute some Java script to call a method on the server to update a record, much like the DeleteCustomer example where the list is refreshed by using Java to fadeout the affected record and the entire page does not need posted back--this is very sweet (BTW).
However, instead of deleting the record via a link, I want the user to be able to select a status from a selection / list. If the status changed, I want to remove the record from the list using JS.
I've tried this for a couple of days now using the onchange event attribute. I am able to get this to work with a link, but not with a SELECT tag.
Please help.
In the snippet below, _2VG0F1QUF is the value of by record ID.