In Oracle Apex, if you will try to set the target page items from the calling page items having the special characters such as Comma (,), Hash (#) or Ampersand (&), etc. Then you may experience the error "Uncaught Error: Syntax error, unrecognized expression
" when you will click the link to open the target page and the target page will show nothing due to error. In this tutorial, I will show you how you can escape special characters when passing parameters to other pages.
Escape Special Characters in Oracle Apex Example
I have the customer data and in the street address field there are many kinds of special characters and I need to pass this field as a parameter to the other page. The following is the screenshot of the data:
Now to pass this field as a parameter to other pages means by setting the target page value to this field I am using the backslashes (\) to escape the special characters of this field to prevent the "Uncaught Error: Syntax error, unrecognized expression
" error. As shown in the below image:
Now because of the backslashes around the Value field (\#CUST_STREET_ADDRESS1#\
), you will not experience the error.
This is the field from an Interactive Report, if you are passing the value from an Interactive Grid or a normal Page Item then use the following syntax:
\&CUST_STREET_ADDRESS1.\ \&P19_CUST_STREET_ADDRESS1.\
To escape HTML online, check this tool.
Related tutorials:
- Oracle Apex – Create Download BLOB Link in Report
- Oracle Apex: Highlight Row on Link Click of Interactive Report