Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » onmouseover displayed comments (APEX 4.0)
onmouseover displayed comments [message #549130] Wed, 28 March 2012 04:46 Go to next message
balckbandit5
Messages: 104
Registered: December 2011
Senior Member
Hello Smile

The following is an extract of a report query:
decode((select pmr.IS_APPROVED   
       from PMO_MILESTONE_REVIEW pmr   
       where pmr.MILESTONE_ID = pm.MILESTONE_ID   
       and pmr.ROLE_ID = 1),  
        1, '<div id="yes" onmouseover="toolTip_enable(event,this,'''||(select pmr.comments 
       from PMO_MILESTONE_REVIEW pmr 
       where pmr.MILESTONE_ID = pm.MILESTONE_ID 
       and PMR.ROLE_ID = 1)||''')"> </div>'

The problem, is that when the comment contains an apostrophe it doesn't work...
Is there a way to work around this?

thanks Smile

[Updated on: Wed, 28 March 2012 04:47]

Report message to a moderator

Re: onmouseover displayed comments [message #549134 is a reply to message #549130] Wed, 28 March 2012 04:52 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Umm ... maybe REPLACE, in order to make two apostrophes for a single one?

 1, '<div id="yes" onmouseover="toolTip_enable(event,this,'''||(select REPLACE(pmr.comments, chr(39), chr(39)||chr(39))
from PMO_MILESTONE_REVIEW pmr
Re: onmouseover displayed comments [message #549138 is a reply to message #549134] Wed, 28 March 2012 04:59 Go to previous messageGo to next message
balckbandit5
Messages: 104
Registered: December 2011
Senior Member
Doesn't seem to work, I checked the page source and it has the double apostrophes
onmouseover="toolTip_enable(event,this,'don''t listen to Verification, they is wrong')"

but it doesn't show anything when I hover over the picture
Re: onmouseover displayed comments [message #549139 is a reply to message #549138] Wed, 28 March 2012 05:06 Go to previous messageGo to next message
c_stenersen
Messages: 255
Registered: August 2007
Senior Member
Prefixing the quote with a backslash should escape it.
Re: onmouseover displayed comments [message #549140 is a reply to message #549139] Wed, 28 March 2012 05:08 Go to previous messageGo to next message
balckbandit5
Messages: 104
Registered: December 2011
Senior Member
assuming I can use the same method littlefoot posted above what's the chr(XX) for a backslash?
Re: onmouseover displayed comments [message #549141 is a reply to message #549140] Wed, 28 March 2012 05:10 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
92
Re: onmouseover displayed comments [message #549142 is a reply to message #549141] Wed, 28 March 2012 05:14 Go to previous messageGo to next message
balckbandit5
Messages: 104
Registered: December 2011
Senior Member
Ok it works now Smile

thanks
Re: onmouseover displayed comments [message #549145 is a reply to message #549142] Wed, 28 March 2012 05:22 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Speaking of CHR: for a future reference, here's how you can easily find what you are looking for:
SQL> select level, chr(level) from dual
  2  connect by level <= 130;

     LEVEL C
---------- -
         1 ☺
         2 ☻
<snip>
        32
        33 !
        34 "
        35 #
        36 $
        37 %
        38 &
        39 '
        40 (
        41 )
        42 *
        43 +
        44 ,
        45 -
        46 .
        47 /
        48 0
        49 1
        50 2
        51 3
        52 4
        53 5
        54 6
        55 7
        56 8
        57 9
        58 :
        59 ;
        60 <
        61 =
        62 >
        63 ?
        64 @
        65 A
        66 B
        67 C
<snip>
        91 [
        92 \
        93 ]
        94 ^
<snip>
       130 é

130 rows selected.

SQL>
Re: onmouseover displayed comments [message #549245 is a reply to message #549145] Thu, 29 March 2012 02:11 Go to previous messageGo to next message
balckbandit5
Messages: 104
Registered: December 2011
Senior Member
oh ok thanks
and presumably I can just add "where chr(LEVEL) = 'something' " to find a specific one quickly?
Re: onmouseover displayed comments [message #549246 is a reply to message #549245] Thu, 29 March 2012 02:12 Go to previous message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You can try and find it out.
Previous Topic: can I make LOV conditional for Radio Buttons?
Next Topic: reports and LIST OF VALUES items APEX
Goto Forum:
  


Current Time: Thu Mar 28 11:23:13 CDT 2024