I have a radio selecton box on a Web form (“Field = Category” , type = Radio Button)
values are retrived from a dblookup to a view.
user can select “Book” ; “Record” ; “DVD”,…
No problem…
Then if the user selects “Book” i have another field to do a dblookup on a view to retrive the Books… (where Category is the key)
(“Field = SubCategory”, type = Dialoglist)…but i cant get it to work ??? i have the "refresh on keyword change select ??
Any ideas…
Subject: Refresh on dialoglist Web form
By default your HTML, generated by notes, does not run on the fly. It send a static page and displays it. So when someone select “Books” it doesn’t run anything (by default) to update the DBLookup.
The EASY but ugly solution is to have the page reloaded when someone selects an item.
The more complex but very nice solution is to use Javascript and arrays.
Each of the arrays load the possible values for Books, DVDs, Records (we use and embedded view).
When the first value is picked, you have code for onChange that updates the second field with the matching array (preloaded).
Here is a javascript code fragment that is at the heart of our routine, called when a value is changed. The user picks a year and province and they are presented with a list of Holidays.
So you get the array element 2007ON and assign it’s valye to the field you want.
“function setOptionsV4() {” + @NewLine +
" var theString; " + @NewLine +
" if (((theYearItem=findObj(‘theYear’))!=null) && ((theProvItem=findObj(‘theProv’))!=null)) {" + @NewLine +
" theString = arrays[ theYearItem.options[ theYearItem.selectedIndex ].text + theProvItem.options [ theProvItem.selectedIndex ].text ];" + @NewLine +
" document.forms[0].xxHolidays.value=theString;" + @NewLine +
" }" + @NewLine +
" };" + @NewLine +
"
" +
Hope that helps.
Subject: Refresh on dialoglist Web form
In the second field, you need to check the “Refresh choices on document refresh”.
That’s all there is to it.
Benoit
Montreal, Canada