JavaScript and CSS info in WPC

Hi all,
Is it possible to keep CSS (Stylesheet) and Javascript information from older html web pages and bring them into Web Page Composer? We have some older intranet web pages which we now want to display in the portal without ofcourse using URL iViews; so the content remains local to KM and the relevant roles can be assigned to different authors and editors of the website so it can be modified through the portal and WPC?
Any tips, hints and helpful suggestions are welcome.
Regards,
Tony.

Hi Tony.
Yes, it's possible. Read [Wiki WPC FAQ|https://wiki.sdn.sap.com/wiki/display/KMC/WebPageComposer-FrequentlyAskedQuestions+%28FAQ%29#WebPageComposer-FrequentlyAskedQuestions%28FAQ%29-WhataboutusingstandardHTMLpagesinWPC%3F].
KM supports relative links in HTML documents so it may be necessary include any dependent files in the same folder as the HTML document.
In case of a web page and its dependent files are stored in different folders you need editing the source html code:
1. use Portal Drive and any text editor (I prefer Notepad++. It has the feature "Search and Replace in files") to open the html source file.
2. search for links to dependent files and add the following pattern: /irj/go/km/docs//<path to an dependent file>/ before a filename, for example:
You have a web page with css file. The page is stored in documents repository under the folder with ID old_pages. The css is resides in css folder.
So the existing code
<LINK REL=STYLESHEET TYPE="text/css" HREF="css/style.css">
should be replaced with the
<LINK REL=STYLESHEET TYPE="text/css" HREF="/irj/go/km/docs//documents/old_pages/css/style.css">
Best regards,
Aliaksandr

Similar Messages

  • Embedded Javascript and CSS removed from mail

    Hey folks,
    I wrote a small app to send a html email to myself.
    When I sent it inline all the embedded javascript and css were removed.
    When sent as a .html page attachment and opened from within the browser (Gmail, Mozilla 2.0)
    all the embedded script and css were gone. However when downloaded to the machine, it was all there.
    Looks like this is a browser issue, would anyone know how to get around it?
    It's so that I can have collapsable headers in my email message.
    Thanks,
    Mark.

    Hi Tony.
    Yes, it's possible. Read [Wiki WPC FAQ|https://wiki.sdn.sap.com/wiki/display/KMC/WebPageComposer-FrequentlyAskedQuestions+%28FAQ%29#WebPageComposer-FrequentlyAskedQuestions%28FAQ%29-WhataboutusingstandardHTMLpagesinWPC%3F].
    KM supports relative links in HTML documents so it may be necessary include any dependent files in the same folder as the HTML document.
    In case of a web page and its dependent files are stored in different folders you need editing the source html code:
    1. use Portal Drive and any text editor (I prefer Notepad++. It has the feature "Search and Replace in files") to open the html source file.
    2. search for links to dependent files and add the following pattern: /irj/go/km/docs//<path to an dependent file>/ before a filename, for example:
    You have a web page with css file. The page is stored in documents repository under the folder with ID old_pages. The css is resides in css folder.
    So the existing code
    <LINK REL=STYLESHEET TYPE="text/css" HREF="css/style.css">
    should be replaced with the
    <LINK REL=STYLESHEET TYPE="text/css" HREF="/irj/go/km/docs//documents/old_pages/css/style.css">
    Best regards,
    Aliaksandr

  • Including external javascript and css files in servlet

    Hello,
    I am struggling to generate an HTML page from within a servlet using external javascript and css files. I am not sure how to point the servlet to the external files.
    Any code sample to accomplish the above will be much appreciated.
    Thanks inadvance,
    Antana.

    Can't you just include the following in your servlet?
           response.setContentType("text/html");
            PrintWriter out = response.getWriter();
            out.println("<html>");
            out.println("<head>");
            out.println("<title>Getting CSS</title>");
            out.println("<link rel='stylesheet' type='text/css' href='yourCSS.css' />");
            out.println("<script language='JavaScript' SRC='yourScript.js'></script>");
            out.println("</head>");
           //...

  • 4.2 "Include Standard JavaScript and CSS" option removed ?

    Hi,
    APEX 4.2, Oracle 11g r2.
    I was using the option *"Include Standard JavaScript and CSS"* from the page attributes. It was set to *"No"* in all pages as I manage my own JQuery versions.
    We upgraded to 4.2 yesterday, and I see the option is still here on 4.2.
    I simply tried to set it to "Yes" for a test, but now the option has disappeared !! I can't set it back to "No"...
    In each page, if I set it to "Yes" and apply changes, the option is not here when I go back to the page attributes.
    Bug ?
    Or maybe this option has been removed from 4.2 ?

    Hi,
    yes this has intentionally been removed for applications / pages which do not use the feature. As you mentioned yourself and what we have seen from other customers is that someone doesn't just want to exclude that on a single page and instead want to control it for the application. Which made it a little bit cumbersome, because a developer had to set it for each new page.
    That's why we have created a page template placeholder for *#APEX_JAVASCRIPT#* and *#APEX_CSS#* to give you full control where to load the APEX libraries and if you don't want to load them, just remove them from the page template as Vikram already pointed out.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • How to optimize portal javascript and css - where is scriptset property ?

    Hi,
    I've downloaded <a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d164c5ee-0901-0010-4fbf-d0856b5c8a84">How to Finetune Performance of Portal Platform</a> document,
    which contains portal performance optimization tips.
    In this pdf file there is a section about optimizing javascript and css code by using
    scriptset  property and there is also appropriate reference to the help.sap.com portal page.
    The problem is that this page is not there so I'm unable to configure this scriptset property.
    Any ideas where can it be found?
    Regards,
    Ladislav

    yes - go into System Adminstration --> System Configuration and then Service Configuration (in the detailed Nav).
    In there, find application com.sap.portal.epcf.loader - In Services --> epcfloader the property you seek is script.set and you should change from standard to optimize.  Then you need to restart the service.
    Hope that helps
    Haydn

  • Vertical menu using javascript and css

    Hi all,
    I have to build a vertical top-level menu for a customer. for a few days I surfing the internet to find a good sample. The only sample I found is http://javascript.internet.com/navigation/expanding-menu.html. this is what the customer wants. But this sample has just one level of subitems. I need a sample or source with dynamical levels of subitems. I'am not so formiliar with javascript and css to build it by my own very quickly.
    Has someone a sample for me or can someone change the sample so that I can use it in my toplevel menu.
    Richard

    Richard,
           Are you trying to implement this vertical menu at Portal's Top Level Navigation? If so, please be aware that these menu's might run into issues which SAP will not support.
            Also, there might be issues with upgrades on your portal. We have encountered the same for your client implementation and had to finally decided against the idea until SAP released their own version.
           Hope this helps.
    Regards,
    Winston
    PS: reward points if you find this useful

  • How to  include external javascript and css resources to a jsf?

    I need to include external css and javascript files to my jsf page. Using the code below does not work because all the styles on the css page are ignored and the functions within the js files are not executed.
    <link rel="stylesheet" type="text/css" href="/resources/styles/style.css" />
    <script language="JavaScript" src="/resources/javascript/util.js"></script>When I try to execute any js function within a script tag on a jsf page I get an object expected error.
    I googled about my problem and found this piece of code for importing styles for an external css.
    <style type="text/css">
    @import url("/resources/styles/style.css");
    </style>How could I add an external javascript file to my jsf?

    Used the relative urls in my first post as well as these, and both were not working.
    <link rel="stylesheet" type="text/css" href="./resources/styles/style.css" />
    <script language="JavaScript" src="./resources/javascript/util.js"></script>The ./ tells that the external file can be found by starting at the current directory and working down the path to the specified file. This is my directory structure. Index.jsf is the file that references the external js and css files.
    -Webcontent
    |_index.jsf
    |_resources
    |__styles
    | |__style.css
    |__javascript
    |__util.js
    Either way I still can't reference the files that I need. Calling a javascript function results in an object expected error, and the styles are ignored.
    If I include the js file directly in the jsf then I can get it to work. I don't want to do this because I have created a handful of seperate js files, and do not want to include all of them in one page. I am using myfaces and tomahawk if that helps.

  • Where to put own JavaScript and CSS-Stylesheets in GlassFish ?

    Hi out there,
    we have some applications which are using external JavaScript libraries, CSS-Stylesheets and Images.
    On OHS we had a directory for those files which we aliases in dads.conf.
    Where do we have to put this directory when switching to GlassFish and Apex Listener ?
    Regards and thanks
    Markus

    Hi Markus,
    if you use the "regular" GlassFish, this shouldn't be a big issue. Just create a subdirectory in the GlassFish's docroot-directory for each alias you have now and copy the corresponding content into that directory. See "Copy Oracle Application Express Images" in the Listener documentation - the handling for other static content is similar to the handling for images.
    If you plan to test this with the Embedded Web Container (embedded GlassFish), this will not work that way, because you only have the fixed contexts for images, apex and the listener-internal functions.
    -Udo

  • Handling Javascript and CSS in JEditorPane

    I am just beginning to play around with java.net and URLs, and have the following code snippet:
    URL home = new URL("http://www.google.com");
    JEditorPane ep = new JEditorPane();
    ep.setPage(home);
    ep.setEditable(false);
    ep.addHyperlinkListener(new HLinkListener(ep));
    JScrollPane scroll = new JScrollPane(ep);Where the JEditorPane is inside of a JFrame, and HLinkListener is a seperate class with just the HyperlinkListener interface and hyperlinkUpdate method.
    This works for what I want it to, just a basic GUI representation of a URL, but is unable to handle any pages that involve CSS or JavaScript. Google has turned up many all inclusive packages, like Cobra, but what I was wondering is if anybody has any experience with a particular Java JS/CSS parser, or if there was a basic way, ie one with only a couple of imports and new objects, that would allow JS and CSS to be displayed.

    I would like to know what is JEditorPane capable of
    doing in terms of displaying HTML with CSS, and how
    do you set it up. JEditorPane has no support for CSS
    If JEditorPane is not the best option with HTML thatit's not
    has positioning in CSS, can somebody suggest
    something else that has better support for CSS than
    JEditorPane?Search google for 'JDIC' find the WebBrowser component
    I would greatly appreciate any response (Anylet's not get carried away here
    suggestion or links to additional information will be
    great too!)
    Thanks,
    Victor Gutierrez

  • Javascript and CSS questions

    Just two quick questions. First, I am trying to change the value of one of my backing bean properties using js. It is a boolean and what I tried was:
    onfocus="{ ${displayOnly} = true}"
    however, as expected, this tries to set the actual value of displayOnly (false) to true which cant be done. How do I set the variable displayOnly to true?
    My other questions is about css. I have a panelgrid which has many inputText and labels. Using a styleclass on the panelgrid changes the styles of the labels but the inputText stay the same. Is there a way to write a subclass of my panelgrids style (pgstyle)? I tried .pgstyle t:inputText and .pgstyle #t:inputText but neither worked. As you can see, I have no idea what I am doing when it comes to subclassing style classes so I would appreciate any help I can get.

    Just two quick questions. First, I am trying to
    change the value of one of my backing bean properties
    using js. It is a boolean and what I tried was:
    onfocus="{ ${displayOnly} = true}"
    however, as expected, this tries to set the actual
    value of displayOnly (false) to true which cant be
    done. How do I set the variable displayOnly to true?JavaScript is executed on the client side. Your backing bean lives on the server side. So the only way to modify the backing bean properties is when the server is processing a request. You can use JavaScript to help define what this request will be and even invoke it, but you cannot directly change the backing bean via JavaScript.
    >
    My other questions is about css. I have a panelgrid
    which has many inputText and labels. Using a
    styleclass on the panelgrid changes the styles of the
    labels but the inputText stay the same. Is there a
    way to write a subclass of my panelgrids style
    (pgstyle)? I tried .pgstyle t:inputText and .pgstyle
    #t:inputText but neither worked. As you can see, I
    have no idea what I am doing when it comes to
    subclassing style classes so I would appreciate any
    help I can get.CSS is interpreted on the client side. The inputText components are interpreted on the server side; they generate HTML which is what the browser sees.
    You need to have a solid understanding of what is executed where in order to develop web applications.

  • Include custom javascript and css in uix page

    Hello
    I got a UIX page based on the pageLayout template and i wanted to include some custom things (css, js) inside the resulting html header like this:
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title="mypage"/>
    <html:link rel="stylesheet" type="text/css" href="http://someotherserver.com/generateStyle?pCSSType=loc"/>
    <html:link rel="stylesheet" type="text/css" href="http://someotherserver.com/generateStyle?pCSSType=sys"/>
    <script source="customScript.js"><contents><!-- --></contents></script>
    </metaContainer>
    <contents>
    <body>
    Unfortunatly only ONE thing from within "metaContainer" gets included in the final html file. Is there a way to include everything from within "metacontainer"?
    Thanks for your help,
    Philipp Stecher

    I think metacontainer is a named child, and like all named children it can only have one node.
    Does this work?
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title="mypage">
    <contents>
    <html:link rel="stylesheet" type="text/css" href="http://someotherserver.com/generateStyle?pCSSType=loc"/>
    <html:link rel="stylesheet" type="text/css" href="http://someotherserver.com/generateStyle?pCSSType=sys"/>
    <script source="customScript.js"><contents><!-- --></contents></script>
    </contents>
    </head>
    </metaContainer>

  • Linking Javascript and CSS?

    Hello,
    I have a small little script that picks an image based upond
    what month it is. When I was first constructing the site I used CSS
    to put a backgound image on the body tag. It's this image that I
    want to be based on what month it is. I'm wondering if its possible
    to link my CSS background image's placement with the image results
    that the Javascript gets.
    CSS:
    body {
    background-image: default.jpg;
    background-color: #FFFFFF;
    background-repeat: repeat-y;
    background-position: center top
    Javascript:
    <script>
    onload=function(){
    document.images["imageOfTheMonth"].src=
    ["01.jpg",
    "02.jpg",
    "03.jpg",
    "04.jpg",
    "05.jpg",
    "06.jpg",
    "07.jpg",
    "08.jpg",
    "09.jpg",
    "10.jpg",
    "11.jpg",
    "12.jpg"][new Date().getMonth()];
    </script>
    <img src="imageOfTheMonth" src="default.jpg">
    </style>
    Site Location:
    http://www3.telus.net/public/surekiss/index2.html
    If there is away to do this, I would be greatful for a lead
    to follow so that I can figure this out.
    Thanks!

    c-fqgy,
    One way to solve this problem is to predefine 12 classes: one
    for each
    month:
    .month01 { background-image: january.jpg; }
    .month02 { background-image: february.jpg; }
    /* etc. */
    Then in your JS, dynamically apply the class of the current
    month to
    your element. That way your CSS does not need to be
    manipulated with JS.
    HTH,
    Randy
    > I have a small little script that picks an image based
    upond what month it is.
    > When I was first constructing the site I used CSS to put
    a backgound image on
    > the body tag. It's this image that I want to be based on
    what month it is. I'm
    > wondering if its possible to link my CSS background
    image's placement with the
    > image results that the Javascript gets.
    >
    > CSS:
    > body {
    > background-image: default.jpg;
    > background-color: #FFFFFF;
    > background-repeat: repeat-y;
    > background-position: center top
    > }
    >
    > Javascript:
    > <script>
    > onload=function(){
    > document.images["imageOfTheMonth"].src=
    > ["01.jpg",
    > "02.jpg",
    > "03.jpg",
    > "04.jpg",
    > "05.jpg",
    > "06.jpg",
    > "07.jpg",
    > "08.jpg",
    > "09.jpg",
    > "10.jpg",
    > "11.jpg",
    > "12.jpg"][new Date().getMonth()];
    > }
    > </script>
    > <img src="imageOfTheMonth" src="default.jpg">
    > </style>
    >
    >
    > Site Location:
    >
    http://www3.telus.net/public/surekiss/index2.html
    >
    >
    > If there is away to do this, I would be greatful for a
    lead to follow so that
    > I can figure this out.
    > Thanks!
    >

  • Post XML to Servlet through JavaScript and reveive info back

    There's a post in this forum before, but anyone know how to do this:
    =========================================
    MSIE5 + will let you post an XML string to a servlet. It must be done from javascript. The same javascript can also receive an xml string back from the servlet, parse it, and update dom objects in the browser, independenty of a an http post.
    You can use this technique to populate ddlb based on events in the browser, or do real-time validations from the database. It works just fine, is quite fast, but is MSIE specific. If another brower is used, you must handle it some other way.
    =========================================
    I will use IE only.
    Any help will be highly appreciated!
    Charles

    Thanks for your response, ddossot!
    I also got something from our Microsoft team, post here to share with others who have interest in this topic. It's interesting to see IE talk with Servlet in XML, especially within a LAN.
    ==============================================================================
    I did find a couple of things. Not sure if it is exactly what you are looking for. Let me know if it works.
    function submitAsXML() {
         var theXML = document.myform.txtInXML.value;
    var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
         var url = document.myform.txtURL.value;
    try {
    xmlhttp.open("POST", url, false);
    } catch(e) {
    xmlhttp.open("POST", url, false);
    xmlhttp.Send(theXML);
         var xmlResp = xmlhttp.ResponseText;
         document.myform.txtOutXML.value = xmlResp;
    Link to XML DOM Properties -
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk30/htm/xmproresponsexmlserverxmlhttp.asp
    Regards,
    Ashwin

  • CHIP Administration - UI Frameworks based on HTML5, JavaScript and CSS - SAP Library

    To add a comment, please log in or register on the top of this page and choose Reply. Please write your comment in English.
    You can also go back to the SAP help page.

    A good solution. Liked it very much. Can you please make it a technet blog for others.
    [email protected]

  • Please point me to examples of fixed layout ebooks with javascript and animations

    Hi! I am a danish children's author and want to create an ebook in "Fixed layout" for the ibookstore. I want the ebook to have simple interactive and animated features triggered by javascript. I would like more knowledge about what is and isn't possible with the javascript and CSS in apples fixed layout format. I have already viewed the "Yellow Submarine" ebook and Apples sample ebook "Sonnet 18". Are there more examples available?
    Please do not point me to apps. There are great interactive book-apps for children - but for this project I am only interested in the Fixed layout format for the ibookstore.
    All replies will be greatly appreciated, thanks!

    if I can help, let me know...
    check out the new series to help create publications. just search in the iTunes Store for An iBuild Opportunity

Maybe you are looking for

  • Issue in Inter Company postings

    Hi All,            Currently I face an issue with inter-company posting transaction. Let me explain the issue. Using ‘FB01’ we can create inter-company postings by giving G/l and New Company code fields in the first screen. Let us say there are two c

  • MBA (2010) & Dual Monitors

    I have a 2010 model MBA with the 2.13 GHz Intel Core Duo and the NVIDIA GeForce 320M 256 MB graphics, a 30" HP LP3065 display and a 24" Apple cinema display, and corresponding Apple mini DisplayPort to DVI adapters (dual and single link respectively)

  • HFS drive not supported

    I have just downloaded CS2 illustrator for Mac to replace my windows version but message says that it can't be installed onto HFS drive as not supported what does this mean and how do I rectify this?

  • Safari browser history

    I recently upgraded from OS X Snow Leopard to OS X Lion. There has been an issue with Safari browser. Whenever i close the browser and turn in on again, all the history is gone. Even the bookmarks are gone. I went to preferences and changed the "Remo

  • Error in Search after restore from backup

    We recently had to restore our Sharepoint 2010 Enterprise farm from backup due to a failed attempt to move the SharePoint DB's to a new SQL server and now our search service is no longer working.  It had been working fine before the restore mind you.