Include Javascript

Is there an easier way to include a javascript file for use by content server 6 ? According to the admin guide, it is a multipart 4 step process with multiple data entry templates, a presentation template and multiple content items, just to get it there.

Hi, Mickey -
What are you trying to do? I'm guessing there are a few ways you can do this, but I'm not sure what exactly you're bumping into.
* could use a large text field and just parrot the info back to screen
* create a property called "jsfile" or something and then plop this into your presentation template...
<SCRIPT language="JavaScript" src="<pcs:value expr="jsfile.location"></pcs:value>"></SCRIPT>
You would need to configure your data entry and presentation templates to support this.
That help at all?
Thanks,
Eric

Similar Messages

  • "Error: the xajax Javascript file could not be included. Perhaps the URL is incorrect? URL: /includes/javascript/xajax_js/xajax.js". other posters with a xajax error on this board got the response to go look for developer resources. (i'm not a developer)

    I'm on a mac running 10.6.8, was using Firefox 6.02 when the problem started, i performed a clean install of 7.01, installed the latest Flashplayer, and reinstalled java (the 10.6.5 update file from apple's site).
    I seem able to load video at youtube.com, and was able to load web-based irc chatrooms at ircchat.tv. however, at jamplay.com a paid member site, all of the lessons are flash video, and there's a live video feed chat room that is also flash based, and I am not able to view this content. the video content pops up the error message "Error: the xajax Javascript file could not be included. Perhaps the URL is incorrect?
    URL: /includes/javascript/xajax_js/xajax.js" and the clicking on the "launch chatroom" button does exactly nothing.
    I have contacted the jamplay site team but their recommendations are the steps I have already taken, mentioned above, that did not resolve the issue.
    some links to content on their site visible without being a member:
    http://www.jamplay.com/
    this one has a flash interface that, if things were working, would have a video in the center and members and staff talking abouth that area of the site when you click on one of the title buttons. Now that I am having this problem, nothing is clickable and there's no indication that there should be a video in the center. The error message regarding xajax does not come up at all.
    http://www.jamplay.com/guitar-lessons/beginners/1/527-16-circle-of-fifths
    same thing. video content is missing, xajax error does not appear.
    http://www.jamplay.com/live
    when I load these all content except the video loads on the page. this page does not give me the error at all, just does not load the video
    I can't seem to recreate the actual error without being logged in as a member of the site.
    The apple support team gave me a one-time free suppport ticket to troubleshoot an ethernet issue I was having. Unfortunately, the databases I removed were not deemed either by apple or me to be noteworthy or necessary to retain (all of them were for software I not longer have or use). I don't know which plist file might have been the one I need now. I did reinstall the java and flash items. The only other item that I think it might be is a set of belkin router software that I uninstalled because i'm not using any belkin hardware anymore.
    If someone has any kind of idea I would be most appreciative.

    That's a comment in the file. It has no effect at all.

  • JavaScript help Including JavaScript in a .js File Referenced by the Page

    I need help with JavaScript. I have been doing the Advanced Tutorial, and still don't feel that understand how to make it work.
    The example in "Oracle Database Application Express User's Guide" shows this line:
    <script src="http://myserver.myport/my_images/custom.js" type="text/javascript"></script>
    I understand that "my_images" is hypothetical, but where is the real equivalent to this?
    Is there a working example/tutorial of Including JavaScript?
    <li />Also how does one create AJAX functionality?
    If I want to do something like this http://www.w3schools.com/ajax/ajax_server.asp
    in APEX, where do I place the "time.asp" script?
    <li />Can we assume that the HTML and ASP file are in the same directory?
    Please any assistance with these topics are greatly appreciated.

    Hello,
    >> what is the directory structure you would use for /my_images/custom.js? Where does one load these .js files? where is it in the local machine?
    C:\oracle\product\10.2.0\db\Apache ?
    The documentation only gives you a possible example (and I might agree that it’s not the best one). You should put your external JS files (on the server OS file system) wherever it will be most accessible and maintainable for you. The best place, IMHO, is under the /images/javascript/ directory. The reason is very simple. You can use the alias /i/, which defined in your DAD file, to gain a very simple path to the file. In this case, the loading statement will look similar to the following:
    <script src="/i/javascript/custom.js" type="text/javascript"></script>
    >> Do you mean "Oracle Database PL/SQL Packages/Types and htp packages?"
    I’m assuming you are talking about the on-demand process. This is a regular PL/SQL anonymous block, which will be fired only upon specific request - http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10499/bldr.htm#BABEAIIE . This is the mechanism for handling the server side of AJAX.
    >>Anythig else available for us to levarage?
    Denes examples site can also be a valuable resource - http://htmldb.oracle.com/pls/otn/f?p=31517:1 .
    Regards,
    Arie.

  • How to include JavaScript in a list instance's form in Visual Studio

    So I know you can use JSLink to include JavaScript files in list definitions in Schema.<g class="gr_ gr_8 gr-alert gr_spell ContextualSpelling ins-del multiReplace" data-gr-id="8" id="8">xml</g> like so:
    <Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" JSLink="~site/SiteAssets/Scripts/jquery-1.11.1.min.js" />
    But how can I do this with a list instance that I'm provisioning that's based on the tasks list definition? Is there somewhere I can include JSLink in the instance's Elements.xml?

    If you would have your own custom list definition, you could deploy a custom form for your list instance, and set the JSLink element of the Form. You cannot set it "globally" for the list, only per form.
    If your list instance is based on a built-in list instance (like Tasks in your case) you should set the JSLink property from code. If you would like to deploy the list instance and set the JSLink property from a .wsp package, you should lookup the list form
    and set this property from a feature receiver. If you already created / deployed the list instance, the simplest method is to set the property via PowerShell. See the code samples for PowerShell and C# in this thread.

  • How to include javascript in Edge?

    I am new to jQuery and Edge.
    I want to add some "Drag" functions to my project and I browsed the forum and found a javascript plugin. So I downloaded the js files and placed them in my project folder (the folder containing .an and .html)
    I searched the forum and found a way to include javascript which is adding the following code in compositonReady event
    $("<script type='text/javascript' charset='utf-8' src='myjs.js'>").appendTo("#Stage");
    and I replaced "myjs.js" with the plugin file name but it seems not working. When I view the html code there is only "MyProject_edgePreload.js" in it. Thanks for guiding me what's wrong here.

    Better tools are available: yepnope() and $.getScript().
    1) About yepnope(): you can download samples file here.
    2) $.getScript() is a jQuery function :  $.getScript("js fileName", function(){ your code });

  • Trouble including JavaScript on page

    I am having trouble including inline JavaScript on a JSF page. The code is something like this:
    <f:subview id="footer">
        <b>&#169; 2005</b> <a href="mailto:[email protected]">[email protected]</a><br />
        <b>Last Updated by:</b> <a href="mailto:[email protected]">[email protected]</a><br />
        <b>Last Modified:</b> <script type="text/javascript"><![CDATA[document.writeln(new Date(document.lastModified).toString());]]></script>
        <br />
        <b>Page Loaded at:</b> <script type="text/javascript"><![CDATA[document.write(new Date());]]></script>
        <br />If you experience any problems with this page, we would appreciate to <script type="text/javascript"><![CDATA[var href = "mailto:[email protected]?subject=Problem with webpage: " + document.title; document.writeln("<a href=" + href + ">hear about it</a> from you.");]]></script>
    </f:subview>None of these inline scripts are being run and the JavaScript console says that document.writeln/document.write is not a function!
    My Javascript functions which are defined in an external file and then linked in via the script tag seems to work fine.
    I have included the inline javascript in CDATA sections to avoid complaints about the jsp not being well formed (I'm using the JSP XML format for my pages). Is this the right approach? or could this be what is causing the problem?
    Any light anyone can give me with regards to this will be greatly appreciated.

    Hi,
    Thanks for your help. Unfortuantely that is not the problem. I do however, acknowledge your advice on doing the work on the server which seems good so I have replaced these scripts with things like
    <fmt:formatDate value="${sessionScope.rbb.lastModifiedDate}" type="both" pattern="dd/MM/yyyy, hh:mm:ss a" />which as u say is a much better solution. Anyway, I would still like to know what the problem is for future reference.
    Interestingly enough when I execute the following code:
                  var str = "";
                  for(var aProp in document)
                   str += "" + aProp + "\n";
                  alert("Properties in document...\n" + aProp);The only property I get for document is: evaluate
    Does anyone know what is happening?
    AFAIK, the correct way to include Javascript in an XHTML doc is as follows:
    <script type="text/javascript">
    <![CDATA[
    //script goes here
    ]]>
    </script>But I'm not even sure if the problem is in the way I am including the javascript anymore. Any help would be appreciated.

  • Accessing JSP variables in Included Javascript

    Hey All,
    I want to hide my javascript to be viewed on the client browser.
    I know we can do that with the javascript include ,But i am using JSP variables in
    Included javascript.I can't access those variables any more.
    Does anybody know any workarround.
    Thanx
    Vijay

    Hi Vijay,
    I am also facing the same problem of hiding javascript in the client browser. My javascript variables are getting initialised on the fly using JSP. Since JSP is compiled on the server side, one can't compile .js file on the client side.
    What u can do is to divide your page into frames with
    <frameset rows="100%,0%">. Now put your form hidden fields or the .js file in frame 2 which is not visible to the user and then assign your jsp variables in the frame2 html/jsp page. Now access your variables from frame2 in frame1 using
    var i = parent.frames[1].document.forms[0].elements[0].value
    Assuming that there is 1 form and 1 hidden field in frame2 html/jsp page.
    I hope u get the logic rite....
    I had done it for application but problem is that our users are real MORONS and they keep doing ctrl+F5 which takes them to the Indexpage.
    If you get some other solution then please mail it to my email address
    [email protected]
    Regards
    Vimlesh

  • How to include javascript and HTML in analysis output?

    Is there any document for that? Currently I set Treat Text As HTML under Data Format tab and include some simple HTML in Column formula, but I doubt it is correct way to include javascript and HTML in ayalysis output. Can anybody provide any idea or sample?
    Thanks

    Hi,
    i am not sure about javascript but yes treat text as Html is used to utilize HTML power in OBIEE.There are many examples of this.Common uses are a href,GoNav and PortalPagenav fuction.These function are mix of HTML and OBIEE.We gebrally use this option when we want to carry out some HTML operation on data rendered by OBIEE.Common example is to make data values a hyperlink for which we use a href
    See the below links for GoNav and a href
    http://108obiee.blogspot.com/2009/09/go-url-request-navigation-between.html
    Creating Hierarchies on Direct Database Requests
    You can also write java scripts here.
    Regards,
    Sandeep

  • Managing included javascripts

    Hi
    Are there any way to manage the included javascripts in Muse?
    We have a custom jquery plugin, which does not work with the jQuery muse automatically wants to include. However, if we comment it out (after exporting to html), and include a normal jquery-min.js file, it works perfectly.
    However, when we do that, there comes a popup with some muse-scripts not working.
    Including the working one in the top doesn't work, since it gets overrided in the bottom.
    Looking forward for some answers
    Regards,
    Agidon A/S

    When you bring a PRSM single device mode CX under management of PRSM in multiple device mode, the managing PRSM will discover the existing policies and give you the option to import and continue using them as-is.

  • Error  while parsing JSF jspx page when including javascript  loops

    Hi All,
    I have a jspx document which contains jsf tags including trinidad tags. I have added a javascript function in the page, which contains a for loop statement, however when I run the page I get an error
    com.sun.facelets.FaceletException: Error Parsing /xAdvisorWeb/bundles/receivetask/manageinbox.jspx: Error Traced[line: 48] The content of elements must consist of well-formed character data or markup.
    at com.sun.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:234)
    at com.sun.facelets.compiler.Compiler.compile(Compiler.java:104)
    at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:192)
    at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:141)
    at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:93)
    at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:503)
    at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:553)
    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:178)
    at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:995)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:326)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:290)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:213)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:90)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
    at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
    Please note that normal javascript code has worked in my jsf page, this problem only occurs only when I add for loop or while loop in the javascript function. Can we not add javascript loops in a jsf page? Is there something else I need to include?
    This is the relevant code snippet :
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:tr="http://myfaces.apache.org/trinidad"
    xmlns:ch="http://www.chordiant.com/jsf"
    xmlns:chrd="http://chordiant.com/jsf/chrd">
    <f:view locale="#{preferLocale.locale}">
    <f:verbatim escape="true">
    <script>
    function validateInput(){
    for(int i=0;i<3;i++)
    alert('Hi');
    return false;
    </script>
    </f:verbatim>
    <tr:commandLink styleClass="ttmBtnCmdLink" onclick="return validateInput();"
    action="#{manageInbox.executeTaskForAssignedWorkItems}">
    <tr:outputText value="#{msgs.execute_btn}"
    styleClass="ttmBtnOutTxt" />
    </tr:commandLink>
    Any help will be much appreciated.
    Thanks in advance,
    Debajyoti

    M-Y wrote:
    replace "<" with "& l t ;"
    remove spaces in "& l t ;" when u paste it in ur code
    in my previous 2 replies i entered it with out spaces and it was getting converted to "<"The forum engine parses HTML entities. So just replace the & by its HTML entity &amp; and it will work: &lt;.
    But no, this is not going to work. JavaScript doesn't recognize HTML entities as operators.
    Follow the suggestion rlubke gave. Or, even better, put all Javascripts in its own .js file and include this file in the HTML head.

  • Best way to include javascript-script into different struts-pages

    Hi,
    I'm running a struts-based webapplication using the tiles-templates for my layout. Now I have to use some javascript-code for a pop-up window and another javascript for tracing on multiple pages but in different combinations. As I do n't want to copy-paste it on every page, but put it on a single place for better maintenance I'm wondering what would be the best way to do this together with the struts-logic.
    I thought about the following options:
    1.) Using the "template:put" feature like this:
    <template:put name='js' content="/myJavascripts.jsp"> I don't think this would be a good option, as I always have to include the whole javascript and I cannot distinguish between my two different javascripts
    2.) Using the template:insert feature like this:
    <template:insert template="/myJavascripts.jsp"/>. This is a lot better, as I can split my two javascripts into two different files and can always decide, which one to include with the template:insert tag. But I'm not sure, if this is conforming with the struts-concept, as I do not use any template:put or template:set tags
    3.) Using simple jsp:include or <%@ include ... %> tags.
    This would be the easiest way to include my pages with <%@ include file='/myJavascripts.jsp' %>. Same advantages like template:insert but I don't need the additionally features of the template:insert-tag. But still the same question: is this the concept of struts? Or will I become any difficulties with this concept later??
    Any recommendations or further ideas are greatly appriciated.
    Thanx for your help
    Thomas

    Getting PDFs to download is fairly easy and the method is described here.....
    http://www.iwebformusicians.com/WebMusic/PDFs.html
    To get multi page docs to display in the browser requires the use of Google Docs viewer, ISSUU or some such thing....
    http://www.iwebformusicians.com/PromoPage/ISSUU.html
    Safari is the only browser I know of that will display PDFs in an iFrame without a plugin.

  • How to include javascript file (.js) to pages in portal

    Hi,
    I have been trying to include a javascript file (something.js) to a portal. actually, I want to include it on a html portlet that will be my navigation page.
    I have used the code below to add the js file, but it seems not working
    <script language="JavaScript1.2" src="/javascript/cp_navigation.js">
    </script>
    I have uploaded the js file to the /ora9ias/enterprise/portal/javascript folder (created) in portal server. is there any configuration that I have left out?
    another thing, if I want to include some of the js file to the <head> section, am I possible to do it? and how?
    thanks

    Jerry,
    Where to find this? give the date or the name, please?
    *We're often desperate users that are under pressure to make these Oracle applications WORK for our employers!
    Your help in making us efficient is definitely appreciated!

  • How to include javascript on form load

    Hello,
    I am new to JDeveloper. I wanted to include multiple javascript files in a jspx file. Then involve one of the functions in the javascript file. Below is what I am trying to do, but seems like the syntax is wrong:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <html>
    <head>
    <script language='JavaScript' src='jslib/script1.js' type='text/javascript'></script>
    <script language='JavaScript' src='jslib/viewer.js' type='text/javascript'></script>
    </head>
    <body onload="javascript:initializeViewer()">
    <f:view>
    <af:document>
    <af:form></af:form>
    </af:document>
    </f:view>
    </body>
    </html>
    </jsp:root>
    When using firebugs, I realized that the page takes only the first js file. Also, the onload event is deleted.
    Thanks for any help

    The following blog post demonstrates this:
    http://thepeninsulasedge.com/blog/2007/06/22/adf-faces-rc-more-on-javascript/
    --RiC                                                                                                                                                                                                                                                                       

  • How to include javascript resources in  Facelet tag library

    I've been trying out Duncans watermark behavior tag (https://blogs.oracle.com/groundside/entry/placeholder_watermarks_with_adf_11). Indeed a great article and the example work perfectly when the tag library is included within the project and when the javascript resource (common.js) file is added to the document using af:resource tag.
    I would like to create a deployable tag library, including a setWatermarkBehavior tag, for reuse in various apps. I'm able to create and deploy the tag library as a ADF library and include it for use in an application. But on runtime, the pages are not able to find the "addWatermarkBehavior" method, which I hoped automatically got loaded from the javascript file defined in the tag library jar. In the tag library file, I've added a "adf-js-features.xml" in META-INF. This file and the .js file is included in the ADF library jar. "adf-js-features.xml" looks like this:
    <adf-js-features xmlns="http://xmlns.oracle.com/adf/faces/feature">
    <features xmlns="http://xmlns.oracle.com/adf/faces/feature">
    <feature>
    <feature-name>adfExtTaglib</feature-name>
    <feature-class>com/cgi/adf/ext/taglib/js/adfExtTaglib.js</feature-class>
    </feature>
    </features>
    </adf-js-features>
    I'm not sure, what value should be used for "feature-name" - I've tried many different "meaningful" names. I presume, that the ADF framework, should automatically discover all "adf-js-features" files and automatically load js-file on pages, which are using tags from the particular tag library. But apparently I'm missing something. In the facelets page used for testing, I have these few components.
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns:adfext="http://xmlns.cgi.com/adf/ext">
    <af:document title="testAdfExtTaglib" id="d1">
    <!-- af:resource type="javascript" source="/resources/js/common.js" / -->
    <af:form id="f1">
    <af:inputText label="Label 1" id="it1">
    <adfext:setWatermarkBehavior value="CHR-Nr"/>
    </af:inputText>
    </af:form>
    </af:document>
    </f:view>
    Doing some debugging, I can confirm that the "getScript" method of the setWatermarkBehavior class is called. I can also find the javascript produced by the "getScript" method in the DOM. But I cannot find anywhere in the DOM, where the javascript file from the tag library is loaded.
    Please, help me out?
    Edited by: wmjaboj on 2012-09-23 23:58

    The Javascript source URI has the value "RES_NOT_FOUND".
    If I try to access it using ".../faces/javax.faces.resource/javascript.js?ln=js" I get a blank page (contains a Html and Body only).
    If I try to access it using ".../faces/resources/js/javascript.js" I can download the javascript file from the taglib.
    If I manually copy the javascript.js file from the taglib into the enclosing project and save it in "resource/js", then the javascript source URI is resolved correctly to ".../faces/javax.faces.resource/javascript.js?ln=js" and I can downloaded it, but then it is the local copy and not the one from the taglib jar.
    Do I need some specific configuration in web.xml or other deployment descriptors, to be able to use "javax.faces.resource"?
    The only configurations whoch smells like "javax.faces.resource" is this context param: javax.faces.FACELETS_RESOURCE_RESOLVER=oracle.adfinternal.view.faces.facelets.rich.AdfFaceletsResourceResolver
    In web.xml various "resource" servlets is defined (I'm not sure whether I need them, JDeveloper has created them automatically):
    a) resources = org.apache.myfaces.trinidad.webapp.ResourceServlet, maps to: /adf/*, /afr/*, /bi/*
    b) adflibResources = oracle.adf.library.webapp.ResourceServlet, maps to: /adflib/*
    I appreciate your help.

  • Including JavaScript into a JSP Page

    Hi,
    How do i include a piece of JavaScript <SCRIPT> stuff into a JSP Page?
    Right now i have an HTML Page that includes some <SCRIPT> code. Now many other HTML files use this piece of <SCRIPT> stuff. How do i remove it , put it in one place(I mean where to put it and what would that file be called) and in a JSP page call this <SCRIPT> code?
    Please help . i'm pretty new to JSP and JavaScript.
    Thanks in Advance.
    Phani
    /**** CODE
    <SCRIPT language=javascript>
    <!--
         if ((document.images) && ("Netscape" != navigator.appName) && (navigator.appVersion.indexOf('Mac') == -1))
         document.write("<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"http://www.telia.se/tews/css/1.css\">");
         else if ((document.images) && ("Netscape" != navigator.appName) && (navigator.appVersion.indexOf('Mac') > 1))
         document.write("<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"http://www.telia.se/tews/css/5.css\">");
         else if (("Netscape" == navigator.appName) && (parseInt(navigator.appVersion) == 4) && (navigator.appVersion.indexOf('Mac') == -1))
         document.write("<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"http://www.telia.se/tews/css/2.css\">");
         else if (("Netscape" == navigator.appName) && (parseInt(navigator.appVersion) == 4) && (navigator.appVersion.indexOf('Mac') > 1))
         document.write("<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"http://www.telia.se/tews/css/3.css\">");
         else if (("Netscape" != navigator.appName) && ("Microsoft Internet Explorer" != navigator.appName))
         document.write("<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"http://www.telia.se/tews/css/6.css\">");
    // -->
    </SCRIPT>

    Ok, first let us make clear the demarcation between java and javascript.
    Java runs on the server, and produces an HTML page which is sent to the client.
    That HTML page may contain javascript code on it to run on the client side.
    As the page is loaded, javascript may be compiled/run on the client.
    So you have some javascript code which you want to include on every page as template text?
    I would do this in JSP by using the include directive to add that bit of template text to every single JSP page.
    ie
    header.jspf
    <SCRIPT language=javascript>
    <!--
    if ((document.images) && ("Netscape" != navigator.appName) && (navigator.appVersion.indexOf('Mac') == -1))
    document.write("<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"http://www.telia.se/tews/css/1.css\">");
    else if ((document.images) && ("Netscape" != navigator.appName) && (navigator.appVersion.indexOf('Mac') > 1))
    document.write("<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"http://www.telia.se/tews/css/5.css\">");
    else if (("Netscape" == navigator.appName) && (parseInt(navigator.appVersion) == 4) && (navigator.appVersion.indexOf('Mac') == -1))
    document.write("<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"http://www.telia.se/tews/css/2.css\">");
    else if (("Netscape" == navigator.appName) && (parseInt(navigator.appVersion) == 4) && (navigator.appVersion.indexOf('Mac') > 1))
    document.write("<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"http://www.telia.se/tews/css/3.css\">");
    else if (("Netscape" != navigator.appName) && ("Microsoft Internet Explorer" != navigator.appName))
    document.write("<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"http://www.telia.se/tews/css/6.css\">");
    // -->
    </SCRIPT>
    <noscript>
      // stuff here for when the browser does not support javascript
    </noscript>And then in every jsp page
    <%@ page include="header.jspf" %>
    // rest of the JSP pageThe file "header.jspf" will be included with every jsp page served, and you only need to update that page in one place.
    If you have a JSP2.0 container you can define a jsp prelude which will be the same as having the <%@ page include="header.jspf" %> on every page.
    You do this in the web.xml file:
    Something like this:
      <jsp-property-group>
         <url-pattern>*.jsp</url-pattern>
         <include-prelude>/WEB-INF/jspf/prelude1.jspf</include-prelude>
      </jsp-property-group>The specified file will be loaded into every JSP page without the JSP page having to define the import itself.
    Hope this helps,
    evnafets

  • Using the rewriter to include javascript code on an external webpage

    -We are running Sun Portal Server 6.2
    -When users go to GOOGLE.COM through our gateway. I want the google page to be rewritten in such a way that it includes a piece of javascript code. (Written by me)
    In all the examples of the Sun documentation, I noticed only possibilities of rewriting tags so that it includes the gateway URL. Is it possible to actually replace a specific HTML tag with your own code or just even add code using the Sun Portal Rewriter service ???
    Anybody any clues ?

    I may have a (very bad) solution.
    You explode the /opt/SUNWps/libgateway.jar. In ressources subdir you have SRAPConvertSystem.js.
    It seems to be the javascript code the rewriter add at the beginning of the page.
    Try to edit the file, add some javascript at the end, redo the jar file and put it back in /opt/SUNps/lib.
    I did not try this. Maybe it's working, maybe not.

Maybe you are looking for

  • Error while doing confirmation with cor6

    Dear PP gurus, I am getting following error while doing confirmation. please suggest. "Error while importing from memory QAPO SAPLQEEV 0400000363" Thanks in advance Kailash T.

  • Getting error oracle.jbo.RowCreateException: JBO-25017:

    Hi, I am getting below error when I try to add new line dynamically in the table oracle.jbo.RowCreateException: JBO-25017: Error while creating a new entity row for FeedbackInvLineEO. Any suggestions plz.This is very urgent..:-( How can i achive addi

  • Viewing recordings in another room

    I have my BT Vision setup in my TV room. Is it possible to somehow Play back recordings on the Vision box on a TV located in another room? 

  • Job Work Scenario / process mapping is required

    Hi Experts, This is the following system how the client is doing in legacy system and they want like that in SAP. is it possible in SAP? 1. With out sales order they are doing the production ( customer will give Grey material ) 2. once production is

  • Jdbc/8.1.5/oci cannot connect

    Hi, We are not able to access the database using JDBC driver(oci8). We are able to connect to the database using thin driver or the JDBC-ODBC bridge. Also SQLplus can connect using scott/tiger@fpdev We used the following code to access the database u