submit page with checkbox-click
TobiPAug 16 2012 — edited Aug 16 2012Greetings!
I need to submit a page with a click on a checkbox, to re-run a query with a new condition depending on the checkbox state. I have not found any solution while searching for on the net. I have tried two ways, both dont work properly.
To validate, I have included a Display-Only-Field, which displays the checkbox value (' ' or 'Y'). With a regular extra submit button, it works fine. But I dont want the user to additionaly need to click on the button, after changing the checkbox state.
+(note: I needed to replace the "<"" for "(" to display correctly. I hope you'll understand what I mean.)+
1st attempt with JavaScript:
In the Pre and Post Element Sections on the checkbox item I wrote the tag:
{code}(a OnClick="this.document.submit();">
...
(/a>{code}Nothing really works there.
2nd attempt, which brought me a bit further, with (a href> and APEX substitution strings:
{code}(a href="f?p=&APP_ID.:2999:&APP_SESSION.:">
...
(/a>{code}The page processing actually takes place, but the checkbox changes back to initial state. So I tried to unclude the checkboxvalue and parameter in the Url:
{code}(a href="f?p=&APP_ID.:2999:&APP_SESSION.::::P2999_TEXTCBX:&P2999_TEXTCBX.:">
...
(/a>{code}But still not working. It also resets the checkbox state while submitting.
I hope you can help me.
Thanks a lot and best regards,
tobi