This sample can be accessed from:
portal-server-URL/rewriter/JavaScript/functions/url/url.html
Add the rule specified in this sample (if it does not already exist) to the default_gateway_ruleset in the section "Rules for Rewriting JavaScript Source". Edit the default_gateway_ruleset in the Rewriter service under the Portal Server Configuration in the Portal Server administration console.
Restart the Gateway:
./psadmin start-sra-instance –u amadmin – f <password file> –N <profile name>– t <gateway> |
<html> <body> JavaScript URL Function Test Page <br> <script language="JavaScript"> <!-- function test(one,two,three) { alert(one + "##" + two + "##" +three); } test("/test.html","../test.html","123"); window.open("/index.html","gen",width=500,height=500); //--> </SCRIPT> </body> </html>
<Function type="URL" name="test" paramPatterns="y,y"/> <Function type="URL" name="window.open" paramPatterns="y"/>
<html> <body> JavaScript URL Function Test Page <br> <script language="JavaScript"> <!-- function test(one,two,three) { alert(one + "##" + two + "##" +three); } test("/test.html","../test.html","123"); window.open("gateway-URL/portal-server-URL /index.html","gen",width=500,height=500); //--> </SCRIPT> </body> </html>