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!

Copy large text value with javascript

Earl LewisMay 1 2006 — edited May 1 2006
I'm messing around with setting up a button on a page to copy the value of a hidden page item (that's getting it's value set from a page computation) to a textarea item - using javascript.

My javascript function is as follows:

function setItem(pSourceItem, pDestItem){
if (document.getElementById(pSourceItem).value != "")
document.getElementById(pDestItem).value = document.getElementById(pSourceItem).value;
}

And I call it from the button as follows:

javascript:setItem('P899_SRC','P899_DEST')

The javascript function is in a custom library that I've loaded and properly referenced in the page where I'm trying to run this opertion. I don't get any errors about the function not existing or anything like that.

However, the value never gets copied from the source to the destination. Obviously I'm doing something wrong and I just can't see what it is. Can anyone see anything wrong here??

Odd thing is I've used this very function to set text field items and it worked just fine. Doesn't seem to like the textarea item for some reason.

Earl
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 29 2006
Added on May 1 2006
10 comments
488 views