on 04-15-2004 5:26 PM
Hi All:
I have a .js file with client functions. I am trying to call the function for client events of PDVDynPage. I am wondering how to include the js file with the PDVDynPage.
I have tried the following code in ProcessBeforeOutput event.
IPortalComponentRequest request = ((IPortalComponentRequest) getRequest());
IPortalComponentResponse response = (IPortalComponentResponse) this.getResponse();
IPortalComponentContext context = request.getComponentContext();
IResource jsResource = request.getResource(IResource.SCRIPT, request.getWebResourcePath()+"/scripts/myscript.js");
response.include(request, jsResource);
I did not work.
Any leads would be great.
cheers
-srini
hi you add this code in your jsp page
<% IResource jsResource = componentRequest.getResource(IResource.SCRIPT, "scripts/your.js");
response.addResource(jsResource); %>
and remove this code from PBO
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.