I have an interactive report in Oracle Apex 4.1. I need to pass a column value to an apex item when i click a link button on that interactive report.
I have searched on Google and found a solution :
onclick="$s('P4_PAGEITEM', #COLUMN_NAME#); return false;"
But it seems it’s only working for numbers. When I try passing a string value it always returns wrong number format.
Also, can I access an interactive report column value from JavaScript?
#COLUMN_NAME#is a substitution string. It will literally put the value of the column for that row in the string.When the value is a number, it will generate
Now, if the value would be a string
To deal with this, alter your link with adding quotes around
#COLUMN_NAME#All HTML on the page you see is accessible from javascript/jQuery and only requires you to use the correct selector. You do need to understand HTML and the DOM though.
A good start is always using a browser with the correct tools which will allow you to inspect elements, html, dom, javascript, css,… An example is the Firebug plugin for Firefox.
Targeting values in a report requires you to know its markup which you can find by inspecting the generated page html. Keep in mind that page and region templates can make a difference depending on the theme you are using.
If you are stuck on this, post a new question about it and provide html and an explanation of what you are trying to get at.
This question is an example of targetting values in a table: How to select a row element value from Oracle APEX 4 Classic Report (row element from a table tags)