Disable input on page load depending on page level item
658004Oct 6 2008 — edited Oct 7 2008Hi All,
I am trying to set the disabled property of a HTML input button when an APEX page is loaded. This can be achieved easily by using getElementById and setting the *"disabled"* property in the onLoad event of the body.
However, I need to keep the state of the button as disabled if the page is refreshed by the user or through a submit. I've stored this state in a page item, however using +$x(PAGE_ITEM_NAME)+ in the onLoad body event does not return me the value stored in the page item. Calling the same code using an onClick of a dummy button returns me the value.
1. What is the appropriate way of getting the value of page_item during a page load?
2. If doing it on a page load is not feasible, is there a way of setting the state of a html input button to disabled using a page process for e.g?
Thanks heaps,
Raihaan