Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

testing for empty string w/ javascript

734426Dec 28 2010 — edited Dec 29 2010
hi -- Quick question.

I have a javascript region that needs to disable some page items if they're not null. (Can't use the read-only condition in this case.)

What I've tried is this:

if (valueOf(&P202_KEY_NAME1.)!==='') {
document.getElementById("P202_KEY_NAME1").disabled = true;
}

(Those are 2 single quotes at the end.)

This comparison fails w/ an error when there's a value in P202_KEY_NAME1.

I've also tried just if (valueOf(&P202_KEY_NAME1.)) ... But it seems to always
test true... even when the item is empty.

What type of item reference and comparison do I need here? They're text items.

Thanks,
Carol
This post has been answered by trent on Dec 28 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 26 2011
Added on Dec 28 2010
6 comments
282 views