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!

replace carriage return and line feed in javascript

blue72TAAug 17 2011 — edited Aug 17 2011
Hello all,

I'm somehow getting a carriage return/line feed into a hidden column in my tabular form when setting the value in javascript.

Given the following statement how can I replace the carriage return and line feed that appear in F101_QUOTE_LINE_ID and cause invalid number when updating?
html_GetElement('f37_'+vRow).value = GetAppItemVal('F101_QUOTE_LINE_ID')
A couple things to note...

GetAppItemVal is a function to get the value of application item F101_QUOTE_LINE_ID.

I've tried to use replace is the SQL that sets the value for F101_QUOTE_LINE_ID, but that does not work, the CR/LN is getting there after the sql sets the value.

If I make f37 (my tabluar form item) a TEXT FIELD the carriage return and line feed are somehow stripped out and the update works! It's when I make f37 HIDDEN that this problem shows up and the update fails. I need this field to be hidden so I need to strip the CR/LN, either in the javascript or in the Update depending on how they are getting into the column.

Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 14 2011
Added on Aug 17 2011
1 comment
420 views