How to output stored PL/SQL into HTML Template?

I have a PL/SQL procedure that uses htp.p to write a <script> element. The procedure writes out my Google Analytics tracking code so I don't have to update it manually in my many templates.
How do I get this procedure to write the <script> in an HTML Template?
I currently use the following at the bottom of my HTML Templates:
<!-- Google Analytics code begins -->
<script type="text/javascript" language="javascript" src="http://domain/portal/pls/portal/schema.procedure"></script>
<!-- Google Analytics code ends -->
But this produces an error in IE (still seems to track ok, but some users get error dialogs of an error at line 2 char 7).

Wow! Option 2 fixed it.
So I was calling the proc via a js call as follows:
<!-- Google Analytics code begins -->
<script type="text/javascript" language="javascript" src="http://domain.com/portal/pls/portal/schemaL.proc"></script>
<!-- Google Analytics code ends -->
and the proc output the following:
<script type="text/javascript">
var gaq = gaq || [];
gaq.push(['setAccount', 'UA-999999-9']);
gaq.push(['setCustomVar', 1,'var1','value1',1]);
gaq.push(['setCustomVar', 1,'var2','value2_COM',1]);
gaq.push(['trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
</script>
Apparently the "<script>" tags in the proc output were the problem. If only I could see the generated HTML output of a page...

Similar Messages

  • How to output a query results into a text file

    How to output a query results into a text file instead of outputing it to the screen..
    is there a way for us to write a SQL query which specifies to output the query results to a text file.
    Pls let me know how to do it
    Thanking u in advance
    regards
    Muraly

    Muraly,
    If you are using SQL*Plus 8.1.6 or later, you can also spool output to a file in HTML format, eg
    SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON
    SPOOL c:\temp\report.html
    SELECT DEPARTMENT_NAME, CITY
    FROM EMP_DETAILS_VIEW
    WHERE SALARY>12000;
    SPOOL OFF
    SET MARKUP HTML ENTMAP OFF
    In iSQL*Plus 9.0.1 (the browser-based interface to SQL*Plus) onwards, you can also send the HTML output to a new web browser window, or an html file -- much easier than the command line method.
    Alison

  • When I copy and paste a chapter from MS Word into Pages my tables and equations are trashed.  But importing them results in no control over my template How do I get my chapter into my template without copying

    When I copy and paste a chapter from MS Word into Pages my tables and equations are trashed.  But importing them results in no control over my template How do I get my chapter into my template without copying?

    Try just Opening the Word .doc from within Pages and see if that gets closer to what you want, then copy the chapter you want from the Pages version.
    Peter

  • Converting .fmb into HTML template

    I am considering moving from oracle form and report builder to the APEX. Is there any ways that we could convert the existing .fmb file to html template, other than making a new one?

    Hello,
    Oracle is working on something like that, but till now it's not yet possible to do that in an automated way.
    Regards,
    Dimitri
    -- http://dgielis.blogspot.com/
    -- http://www.apex-evangelists.com/
    -- http://www.apexblogs.info/

  • How to bind Context elements to a HTML template

    Hi,
    I want to display all the context elements in my webDynpro application in a html page, I have html template my requirement is to bind all the context elements to fields in the html template.please provide me the solution.
    thanks,
    kishore.

    Hi Kishor,
    I do not think there is some straight forward solution for this scenario.
    You need to create two applications 1 webdynpro application and one portal application.
    What you can do is Pass the context values from webdynpro application to a flat file and store then in that(every time create a new flat file). Now after successfully creation of flat file call the portal application which reads the flat file and get the context values and set them.
    If you require more info, i can help you.
    Regards
    Narendra

  • How to output BufferedImage as PNG in HTML page

    I have a servlet that creates a chart as a BufferedImage.
    I can output it as a file using ImageIO.write(bimg,"PNG","fn.ext")
    I would rather put it in a web page but I don't know how.
    It seems I can either put out an html page or an image file
    but not both. Does anyone know how ?

    This question came up in the JFreeChart forum. You can take a look at:
    http://www.object-refinery.com/phorum-3.3.2a/read.php?f=2&i=1598&t=1383
    Hope this helps,
    Dave Gilbert
    www.object-refinery.com

  • How to use many format data into a template?

    How to design a template but it can interface from many format data? 

    This is the one from 2010 but should still work.
    http://www.bfcnetworks.com/blogs/alexpearce/pull-sharepoint-2010-document-properties-into-word-quick-parts/
     You basically create a new document in the library (must have the columns you want into the word document), then you use the Quick
    Parts to insert the data where needed. Then you save this document as your template. Then anytime someone creates a document in the library when you open the document it will read from the columns of the item.
    I used a workflow and had the users actually update a SharePoint list, then that in turn creates a new document in the document library and populate the columns from the list form. Then You can send that document link to folks to download / print or whatever.
    Is that what you are talking about?

  • How do I move a Page into a template?

    I have a MONDO form, with lots (and lots) of pages.
    I want to move a page (or more) onto (into ?) a template so I can hide/unhide it as needed using Javascript.
    I can't find anything in Acrobat Pro-XI that talks about templates, or how to define a page/section/etc as part of a template.
    I understand that I will need the latest and greatest reader version to use this function/feature.
    Is there any other way to make an entire page appear/dissaper?
    I don't want to use "external" documents, as then all of the things that total pages will return error if the pages aren't there.
    If they are "there" but hidden, everything works fine.  If I need the pages, I can "unhide" them and everything else stays the same...

    Then I don't quite understand how template pages function.
    Does that mean that fields on a template page are not visible to the rest of the form while they are "hidden"?
    My fields are consecutively numbered so I can add them up with a simple loop....
    something like : for (var lineNo=0; lineNo <= 17; lineNo++) { total = total +this.getField(Fieldname+lineNo).value }
    If I have Fields 1-5 on page 1
                              6-11 on page 2 (hidden template)
                            12-17 on page 3 (hidden template)
    If I try to add up fields 1-17, but 6-17 are "hidden" on a template page, will JS give me an error?
    next...when I "spawn" the page do I end up with
          I have Fields 1-5 on page 1
                              6-11 on page 2 (spawed and visible)
                              6-11 on page 2 (hidden template)
                            12-17 on page 3 (hidden template)
    do I now have TWO sets of fields 6-11??   (Will acrobat do the Field 6#1 and Field 6#2? thing?)
    What will happen when I try to run my script to add up fields 1-17?
    I am sure I can detect if the extra pages are there, and change the loop size, but that means building some 'special cases', which are error prone. And then you have to "Undo" and delete the pages if they un-select the page...it gets really messy realy fast... and my forms are messy enough as it is....
    PS...I have over 750 fields, running the "total" fuction takes about 2 seconds from "mouse_up" on the caculate button, 4 seconds on a tablet.

  • How to insert new image in ITS  HTML template Urgent

    Hi all,
    get point full point.
    i created new service and thats working fime but when i inserted image in this template , the image is not displaying in Browser.
    can any body tell me what is the default path of of the image.
    please help me out..
    Regards
    Rashmi

    Hi,
      You have to import your image to new service(Zservice) like below..
    Step: ZSERVICE>Topic99>Create>MIME>import from your desktop or any location, then give a path in your template source code below,
    Example. < img name="phone`i`" border=0 src="`mimeURL(~language="", ~name="image/phone.gif")`" alt="`#PhoneMe`" border=0 > (Ref: PZ01 Service)
    And to do the Save/Publish.
    Thnx
    Suriya

  • How to turn a Master-Page into a Template?

    Hi,
    The aim:
    A precious help would be to enhance the concept of master-pages’ concept for them to work similarly to templates – with the opportunity to set-up specific modules. Once saved in a layout-template-master-page, this basic-structure could be dragged onto pages of the siteplan in order to apply the desired basic structure to the page. So, one basic-structure could be applied to several pages, and each page could then be populated with different content – leading to a serious gain of efficiency.
    The question:
    Is there already any possibility to create such master-templates in Muse? If not, could the ADOBE-Team consider to create this kind of functionality?: Basic-Structure for Pages and/or Master-Pages.
    That was a feature-request
    Any hints would be much appreciated!
    G

    Thank you for your feedback, Brad!
    Well, if we talk about displaying a consistent item like a logo throughout the site, then, the Master-Page concept works fine.
    But if we talk about changing content, e. g. an Image-Gallery, and we put this Image-Gallery on a Master-Page, and we apply this Master-Page to several Pages in the project, then, we cannot load different images relative to the topic of the different pages. So that’s where another behavior of the Master-Pages-Concept would be quite useful.
    The idea would be to design Pre-Fab-Layouts, using all kind of modules/Composition-Elements, saved as Master-Pages. These Master-Pages would be applied to the Pages created in the Site-Plan, in order to achieve a consistent Site-development, but keeping the ability to insert flexible content to specific pages.
    I’d be glad if I missed something in the current functionality of Master-Pages. What do you think?

  • How to export spool file into HTML file

    Hi,
    I have one Oracle procedure which meets our business requirement. I am keeping the output data into a log file and I am sharing that log file to the users.
    Sample Code:
    spool path\logile.log
    declare
    begin
    dbms_output.Put_line('output will come here');
    end;
    Now I want to spool the same output data into a HTML file and need to share with the users.
    Can any one please guide me, how to export our spool data into HTML format?
    Thanks in advance.

    Hello 909127,
    welcome to the forum.
    This is the forum for the tool Oracle Reports, not a general forum for reporting. Your question might be better posted in {forum:id=75} or {forum:id=144}.
    Nevertheless you need to give us more information, how your output looks like now and what you expect in HTML.
    Regards
    Marcus

  • SRM ITS - Modify HTML templates

    Hello,
    I am currently trying to understand the flow of the ITS and the SAP about how the screens are converted into HTML templates to be displayed on the web browsers. I would like to know if it is possible to modify the HTML templates and add some of our own JavaScript Validation or even add our own text field or other objects without touching the ABAP code?
    Thanks,
    Pramod

    Hi Pramod,
    You can always change the templates, If you know the standard Program ( You can get the standard program from SE80, input the template name and it gives the details of the programs related to that template) once you know the program you can do the changes in SE51( Screen painter), Input the Program name and the screen number for which this change is required.
    Once you input click on Display/ change and at the top in the applicaton toolbar there will be a push button called Layout, click on that that takes you to screen painter where you can add new text fields.
    For validation purpose in SRM there a badi BBP_DOC_CHECK which is used for validation purpose, but you need to do some coding depend upon your requirement
    Regards
    Sameer

  • Turning my PDF file into a Template

    Hey guys, just wondering how to turn my PDF file into a template, the PDF is a fillable form, with fields and scripts, is it possible to turn this into a template so when i click on it, it opens up a copy of the original file so we can fill it out and save it somewhere else and keep the original file where it was and un-filled (template)?
    If i have to do this on LiveCycle or another program, let me know.
    Thank you.

    Thanks for replying, but i need my Technicians to be able to fill out the form, sign it, and save it, and still have the original document sitting there for next time we need to fill it out. The document needs to stay PDF.

  • HTML template on portlet form ?

    Hello,
    we have some functionality in our portal forms that will for example set my cursor in some predefined field. This is accomplished thru a javascript and a call to wwv_javascript.fetch_script in the HTML template. This does not work when running the forms as portlets as another HTML template is used there.
    How can I access and modify these HTML templates ?
    TIA

    Anyone who knows the answer to this one ?

  • How to load a large amount of HTML into HTML region?

    I am trying to display a clickable image map (HTML <map>) in a region. The HTML source for the image map is fairly large and will not fit in the Apex editor (HTTP 400 error when I Apply Changes). I would also rather not manage that much HTML in the Apex web editor. So I stored the code in a file and added it to my applications file storage.
    I have tried various methods of getting the HTML to load when the page is rendered. I tried a URL region, but that leads to all kinds of ACL/security issues that we do not want the customner to have to deal with. i also tried some PL/SQL:
    DECLARE
    l_file_id NUMBER;
    BEGIN
    SELECT id
    INTO l_file_id
    FROM APEX_APPLICATION_FILES
    WHERE filename = 'myhtml';
    APEX_UTIL.GET_FILE(
    p_file_id => l_file_id,
    p_inline => 'YES');
    END;
    But that just replaces the entire page, not just the region it's defined in (even when the HTML is without <head> etc).
    Various attampes wih #APP_IMAGES#myhtml and &APP_IMAGES.myhtml just give me the translation of the APP_IMAGES variable.
    So, how do I load a large chunk of HTML into a region dynamically at run time? I also need this to interact with APEX in the sense that JavaScript will set APEX variables and cause a SUBMIT when the use clicks on the image map.

    Hi Andy,
    ATD wrote:
    Does your HTML define the regions/points on the map using AREA tags?Yes. it is actually generated using MapSefrver from huge tables of SDO_GEOMETRY (Oracle Spatial).
    If so, you could define a report template that does this and use this for a report based on a table that has the settings for shape, coords, href etcHmm, the code (HTML map) is auto-generated so if I understand you correctly, this might be difficult. One of the HTML is approximately 180KB of text.
    I found a way to do this using dynamic PL/SQL. I created a new table that has a varchar filename and a CLOB for the file data. I then imported the HTML into the table using SQL Developer (copy&paste, nice!). I then created an HTML region and used the following:
    declare
    html clob;
    len number;
    st number;
    c number;
    begin
    select length(data)
    into len
    from FILES
    where name = 'state_query.html';
    st := 1;
    while len > 0
    loop
    if len > 32000 then
    c := 32000;
    else
    c := len;
    end if;
    select substr( data,st,c )
    into html
    from FILES
    where name = 'state_query.html';
    htp.p( html );
    st := st + c;
    len := len - c;
    end loop;
    end;
    Edited by: CoyoteTech on May 13, 2009 7:27 AM

Maybe you are looking for