function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
deepak Chamoladeepak Chamola 

JSENCODE is not letting the script to run

Hey guys,

I applied JSENCODE in my VF page like :
<apex:outputText value="Please Wait... {!JSENCODE(outputText)}" escape="false"
                    rendered="{!IF(outputText=='',false,true)}" style="color:red;" />


and my controller for the same page has this variable 'outputText', a string variable which contains :

outputText = 'Call Script is Launching..<script>window.top.location.href =\'' + redirectUrl + '\'</script>';

but when i launch it, it should go to a new page but instead its just printing the whole string as it is.

Please Wait... Call Script is Launching..\u003Cscript\u003Ewindow.top.location.href =\'/apex/mypageurl\'\u003C/script\u003E 

any help would be great.