This content has been marked as final. Show 5 replies
I had posted a solution to a similar question in the thread below:
Enable Disable APEX_ITEM
And of course, you need to tailor the JS function as per your requirements.
Vedant wrote:You should use any other event to trigger the JS function from the text field columns, like "onkeydown".
I have seen the link, That is based on select list. In select list if i select the value than it disable to the item.
But in my case I have two text field item ,That is not based on any condition.
If i enter any value in one text box second should disable and vice versa.
Vedant wrote:I haven't tested this code; but the following can be your approach:
Could you help me to write the code. My column in tabular form are 13,14,15,16
If i enter value in field 13 then 14 and 16th column should disable and
If i enter value in field 14 then 13 and 15th column should disable.
How i can do this?
Thanks & Regards
In your browser, right-click each of your columns (one at a time) and choose "inspect element" to check the HTML element attributes. Assuming that the 13th column in your tabular form is rendered in the HTML as f13, 14th column as f14, 15th column as f15 and 16th column as f16, write this JS function in the page HTML header:
The above JS function is fired when the user tabs out of the 13th column. The function then checks the length of the value entered by the user in the 13th column. If the length is greater than 0, it disables the 14th and 15th columns. Else, it enables them.
The above code is for your first scenario:
If i enter value in field 13 then 14 and 16th column should disableYou can do the same for the other scenario.
Hope this is clear. Or else, give me access to your workspace and I can try the above there.