Dynamic html header

How can I generate dynamic html header entries in a page?
Thanks,
Art

See [this thread|http://forums.oracle.com/forums/thread.jspa?messageID=2808228]: a PL/SQL Function Body Shortcut would be the way to go in page HTML Headers.
For even more flexibility and lower maintenance, consider the other technique mentioned there of placing one of the #REGION_POSITION_nn# placeholders inside the HTML <head> in the page template. A template-less PL/SQL Dynamic Content region can now be set at this display point to generate any header content by calling package code that uses htp. Put this region on page zero for a very generic solution...

Similar Messages

  • Help! How to send Dynamic HTML table as an email?!

    hi
    i want to send a dynamic html table as an email
    i am using php/mysql and have a mysql database
    i have a dynaimc table contins some data from the database
    i have a form with textbox to write the email in and a submit button
    i want to send the the table (or the information in the table) when i submit the form
    is that possible???
    plz help!

    Ok, now I have you.  You create a queary to select the data you want, then use this code
    $data = mysqli_query($dbc, $query) or die(mysqli_error($dbc));
    while ($row = mysqli_fetch_array($data))    {
    //Sending Email to form owner
    $header = "From: [email protected]\n"
      . "Reply-To: $email\n";
    $subject = "Data From DB into email";
    $email_to = "[email protected]";
    $message =
    $row['first_name'].
       $row['last_name']
    mail($email_to, $subject ,$message ,$header ) ;
    So for each column, you will enter this
    $row['first_name'].
    So if the column is state, you would put
    $row['state'].
    Hopefully this is the answer you were looking for.
    Gary

  • HTML Header - Size Limit

    Forum
    Is there a limit to the size of the text that can be entered on a page's HTML Header Section ?
    We are seeing an application page fail when we add more lines to the section .... ( yes - they are valid syntax :-)). When we remove these lines - the page works again.
    Also if we add two lines , and then remove the 2 comment lines higher in the section , the page seems to work.
    Strange ...
    P.

    &lt;body onLoad="javascript:f_comm()";&gt;1. In the XHTML normally used in APEX 4.0 mark-up, all XHTML, including attribute/event handler names, must be in lower case: <tt>onclick</tt>, <tt>onfocus</tt>, <tt>onload</tt>...
    2. The "javascript:" pseudo-protocol is evil. There are a few places in APEX where we may have to resort to using it as a URL is all we're offered to work with, but it's always better to use an event handler of some kind, either inline or (better) registered dynamically at runtime following the principles of unobtrusive JavaScript. It absolutely should not be used in inline event handlers.
    3. Semicolons (";") are part of the JavaScript language, not XHTML, and so go within the quotes as part of the JS code.
    So:
    &lt;body onload="f_comm();"&gt;

  • Spry in dynamic HTML

    Hi,
    i want to use the Spry Framework with dynamic loaded HTML.
    To do so i load HTML in an div-Element and afterwards i call
    'Spry.Data.initRegions(obj);', where obj is the object of the div
    with the dynamic content.
    I have set: 'Spry.Data.Region.debug = true;' and this shows
    me, that the dynamic HTML is parsed in the right way, but i is not
    written in the div-Element. I don't know why.
    My test setup is based on the 'Hijax Demo - Notes 1' from
    articles/data_set_overview/index.html.
    At first the XML:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <notes>
    <note id='a1'><![CDATA[<p>This is some
    <b>dynamic content</b> for note
    1.</p>]]></note>
    <note id='b2'><![CDATA[<p>This is some
    <b>dynamic content</b> for note
    2.</p>]]></note>
    <note id='c3'><![CDATA[<p>This is some
    <b>dynamic content</b> for note
    3.</p>]]></note>
    </notes>
    Here i have added the id-attribute.
    Now the HTML / Spry:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xmlns:spry="
    http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Hijax Demo - Notes 1</title>
    <script language="JavaScript" type="text/javascript"
    src="../includes/xpath.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="../includes/SpryData.js"></script>
    <script language="JavaScript" type="text/javascript">
    var dsNotes = new Spry.Data.XMLDataSet('notes.xml',
    "/notes/note");
    var dsNotes1 = new Spry.Data.XMLDataSet('notes.xml',
    "/notes/note");
    Spry.Data.Region.debug = true;
    function writeSpry(){
    var obj=$('dynamicSpry');
    obj.innerHTML='<div id="innerSpry"
    spry:region="dsNotes1"><p spry:repeat="dsNotes1">This is
    some <b>dynamic content with
    Spry</b>{dsNotes1::@id}</p></div>';
    Spry.Data.initRegions(obj);
    alert(obj.innerHTML);
    </script>
    </head>
    <body>
    <a href="#" onclick="dsNotes.setCurrentRowNumber(0);
    return false;">Note 1</a>
    <a href="#" onclick="dsNotes.setCurrentRowNumber(1);
    return false;">Note 2</a>
    <a href="#"
    onclick="dsNotes.setCurrentRowNumber(2);Spry.Data.initRegions();
    return false;">Note 3</a>
    <a href="#" onclick="writeSpry(); return
    false;">Dynamic HTML</a>
    <div id='dynamicSpry' spry:detailregion="dsNotes"
    spry:content="{note}">
    <p>This is some <b>static content</b> for
    note 1.</p>
    </div>
    </body>
    </html>
    The trace Box shows:
    Generated region markup for 'innerSpry':
    <p>This is some <b>dynamic content with
    Spry</b>a1</p><p>This is some <b>dynamic
    content with Spry</b>b2</p><p>This is some
    <b>dynamic content with Spry</b>c3</p>
    Everthings semms to be ok.
    But the display won't change and the alert box says, the
    content has not changed.
    I don't know how to say, that Spry should display the right
    content.
    Sincerly
    Harald

    The reason it doesn't work is a bit complicated, but it goes
    something like this:
    Spry maintains a list of the regions on the page after the
    onload event fires. When you go and call initRegions from your
    "Dynamic HTML" link, it finds your region that you injected
    programatically and adds that to the end of the regions list ...
    but, one of the things that initRegions does after it finds and
    creates regions, is it tells all of the regions in the regions list
    to update themselves ... since you basically have set up a region
    in a region (nested) ... the outer region recalculates its internal
    content ... blowing away your nested region container ... since
    spry is holding a pointer to your inner-nested region container
    node, it does insert your new content, it's just that your node
    isn't in the document anymore.
    That all said, if all you are trying to do is replace the
    template code used in the region, you can do it this way:
    function writeSpry(){
    var obj=$('dynamicSpry');
    // Break any ties between the data set and the current region
    object:
    dsNotes.removeObserver(Spry.Data.getRegion('dynamicSpry'));
    obj.innerHTML='<p spry:repeat="dsNotes1">This is some
    <b>dynamic content with
    Spry</b>{dsNotes1::@id}</p>';
    // Add a region attribute so the initRegions call can find
    it.
    obj.setAttribute("spry:detailregion", "dsNotes1");
    Spry.Data.initRegions(obj);
    alert(obj.innerHTML);
    I'm not going to guarantee that this will work between
    versions of Spry ... but allowing folks to change the template
    inside the region is definitely something on our list of things to
    do. There's also some refactoring work I need to do so that you can
    call some method that will allow you to turn a dom sub-tree into a
    region without triggering all of the regions on the page to update
    themselves.

  • HTML DB  Select Statement in HTML HEADER

    Can I put a select statement that return a value in the HTML HEADER?
    If I can How? Would point the way.
    Second Question
    Can I call store function from HTML HEADER? Help!

    I have a report screen that has Delete button. Each record on the screen has a checkbox
    What I would like to do is:
    when the user puts a check in the checkbox and click the Delete button. a message will pop up and ask "Are you usre?" If the user click Yes then the system will check for child record. If there no No child record go head delete the record. If there is a child record then another message pop up and ask "This Schedule is currently active. Do you really want to delete this." If the user answers Yes then it will delete both parent and child records. If the user answer no then no record will be deleted.
    I have been struggle with this in HTML DB for a bit, but I did not find the solution yet. Please Help!!!!

  • Pass a value from a PL/SQL function to a javascript (html header) ? ?

    Hey Guys,
    Have a question regarding how to pass a value from a PL/SQL function to a javascript in the HTML Header.
    I have created a PL/SQL function in my database, which does looping.
    The reason for this is:  On my apex page when the user selects a code, it should display(or highlight buttons) the different project id's present for that particular code.
    example= code 1
    has project id's = 5, 6, 7
    code 2
    has project id's = 7,8
    Thank you for your Help or Suggestions
    Jesh
    The PL/SQL function :
    CREATE OR REPLACE FUNCTION contact_details(ACT_CODE1 IN NUMBER) RETURN VARCHAR2 IS
    Project_codes varchar2(10);
    CURSOR contact_cur IS
    SELECT ACT_CODE,PROJECT_ID
    FROM ACTASQ.ASQ_CONTACT where ACT_CODE = ACT_CODE1;
    currec contact_cur%rowtype;
    NAME: contact_details
    PURPOSE:
    REVISIONS:
    Ver Date Author Description
    1.0 6/25/2009 1. Created this function.
    BEGIN
    FOR currec in contact_cur LOOP
         dbms_output.put_line(currec.PROJECT_ID || '|');
         Project_codes := currec.PROJECT_ID|| '|' ||Project_codes;
    END LOOP;
    RETURN Project_codes;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    WHEN OTHERS THEN
    -- Consider logging the error and then re-raise
    RAISE;
    END contact_details;
    /

    Jesh:
    I have made the following modifications to your app to get it to work as I thing you need it to.
    1) Changed the source for the HTML Buttons Region(note use of id vs name for the Buttons)
    <script>
    function hilitebtn(val) {
    //gray buttons
    $x('graduate').style.backgroundColor='gray'
    $x('distance').style.backgroundColor='gray'
    $x('career').style.backgroundColor='gray'
    $x('photo').style.backgroundColor='gray'
    //AJAX call to get project-ids
    var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=GETPROJECTS',0);
    get.addParam('x01',val)
    gReturn = get.get();
    var arr=gReturn.split(':');  //dump into array
    get = null;
    for (i=0;i<arr.length;i++) {
    // alert('val=' + arr);
    if ( arr[i]==5)
    $x('graduate').style.backgroundColor='red';
    if ( arr[i]==6)
    $x('distance').style.backgroundColor='red';
    if ( arr[i]==7)
    $x('career').style.backgroundColor='red';
    if ( arr[i]==8)
    $x('photo').style.backgroundColor='red';
    </script>
    <table cellpadding='0' cellspacing='0' border='0'>
    <tr><td>
    <input type='button' id='graduate' value='Graduate'>
    </td>
    <td>
    <input type='button' id='distance' value='Distance'>
    </td>
    <td>
    <input type='button' id='career' value='Career/Tech'>
    </td>
    <td>
    <input type='button' id='photo' value='Photos'>
    </td>
    </tr></table>
    2) Defined the application process  GETPROJECTS as DECLARE
    IDS varchar2(1000);
    l_act_code varchar2(100) :=4;
    begin
    IDS:='';
    l_act_code := wwv_flow.g_x01;
    for x in(
    SELECT ACT_CODE,PROJECT_ID
    FROM ASQ_CONTACT
    where ACT_CODE = l_act_code)
    LOOP
    IDS := IDS || X.PROJECT_ID|| ':' ;
    END LOOP;
    HTP.PRN(IDS);
    END;
    3) Changed the 'onchange' event-handler on p1_act_code to be 'onchange=hilitebtn(this.value)'
    4) Added the JS to the HTML Page Footer <script>
    hilitebtn($v('P1_ACT_CODE'));
    </SCRIPT>

  • Page failure when attempting to save java script in html header

    Currently there is java script code for a function that is seeded in the html header of a forms page by apex when the form is generated. This code is for the chicken test for the DELETE button.
    The function works as designed, but if I try to "APPLY CHANGES" to the the page definition I get the The page cannot be displayed "Cannot find server or DNS Error". "the url is http://nldg-3.appl.devjones.com:7777/pls/apex/wwv_flow.accept" If I remove the script coding from the HTML header the page will save just fine, but of course no more java script.
    I need to add a java script function to the page and I am unable to do so at this time because of this issue. I can reproduce this error on any of the sample apps that I have loaded into apex.
    the Apache error log contains:
    [Fri Feb 13 06:11:06 2009] [error] [client 172.16.85.122] [ecid: 1234527066:192.168.211.127:31922:0:17188,0] mod_plsql: /pls/apex/wwv_flow.accept HTTP-500 Error Reading Data from Client!!
    The Apache access gets:
    172.16.85.122 - APEX_PUBLIC_USER [13/Feb/2009:06:23:47 -0600] "POST /pls/apex/wwv_flow.accept HTTP/1.1" 500 653
    Apex is version 3.1.2.00.02 and uses on iAS on a Linux server. The Database is 10g. The browser is IE 6.0.2900.2180.
    I have been developing for about 3 months in Apex and this is the first issue of this kind that I have run into. Any help will be greatly appreciated as I have no clue at this time.

    Luis,
    All the forms are created by Apex with a default function in the html header for a delete chicken test as follows:
    <scrpt language="JavaScript" type="text/javascript">
    <!--
    htmldb_delete_message='"DELETE_CONFIRM_MSG"';
    //-->
    Even though the function is already a part of the page, if I try to save it, it will fail. I will look into the "black list" a little deeper. I have asked around abit as I also had suspected that, but so far all the answers were that it should not be a problem. If I take out the "SCRIPT" word I can get the page to save, but of course the code is worthless at that point.
    Keith

  • Is there a limit to amount of code that can be added to the HTML Header?

    I've got several javascript functions in the HTML Header section of the page attributes. I recently added another function and now receive an HTTP 404 Not Found error at runtime when navigating to the page. When I remove the function the error is gone. I don't think there is anything wrong with the function because even when I copy and rename an existing working function, this error occurs...as if I've exceeded some size limit. Any ideas?

    I now have a better understanding after reading this thread: Javascript as static file or on filesystem?
    As the post indicates, there are essentially two ways of including a .js file:
    1) upload as static file to the workspace or application and refer to it using the #APP_IMAGES# or #WORKSPACE_IMAGES# tag.
    2) put it on the webserver as a file on the filesystem under the images directory and refer to it using the #IMAGE_PREFIX# tag.
    For now (since I don't have permissions to the file server directory) I have created a .js file and uploaded it as a static file in Shared Components. I referenced the file as below, but when I go the page at runtime, none of my functions are being utilized. Is it because the web server is not using this static file yet because of caching? Does it need to be restarted in order to start using the uploaded js file?
    <script type="text/javascript" src="#WORKSPACE_IMAGES#apex_selection_criteria_page.js">
    </script>

  • How can I submit the page from javascript in html header?

    I followed
    http://www.oracle.com/technology/products/database/htmldb/howtos/htmldb_javascript_howto2.html#client
    It says "doSubmit('Delete');" to submit the delete action.
    If I do the same in the java script that is embededed in html header, it does not work.
    I am assuming 'Delete' is the name of the button here.
    I also tried:
    document.forms[5].submit(); --> does not work
    document.formname.submit(); --> does not work
    I want to know:
         how I get the form name. I am assuming that this is the name in Name field in "Page definition" or is this page number?
         how to sumit a form from the javascript in html header

    sudheshna,
    function deleteConfirm(msg)
    should be
    function Confirmdelete(msg)
    cheers
    KIM

  • Display Dynamic HTML beside Flash Chart in Chart Region

    Hello,
    I have a vertical 3D flash chart with some categories I,II,IV... on x-axix. I have to show a legend beside the chart dynamically depending on the categories displayed like (I - PC, II - TV, IV-Laptop....) First I tried to do this with static data. I modified, Region Source of Chart region to include the legend. I am successful to create a table & put some static html code. Now I want this to be dynamic.
    I found that with shotcuts I can put dynamic HTML code. I created shortcut with PL/SQL & successfully displayed them in a 'HTML REGION WITH SHORTCUTS', but I want that in Chart Region, not as a separate region. Shortcut is not working in Chart region.
    How can I achieve this? Is there a way to call a process or substitution string or some thing from Chart Region to display my legend dynamically beside the chart.
    Experts any hint is appreciated.
    Sowji.

    Experts,
    Can you please give any hint how this can be achieved? If I keep the dynamic legend as HTML with Shortcut region, the width & height are not matching with the chart region as it is dynamic. Also, I am unable to combine both 'chart' & 'html with shortcut' region to look like one region. So I am looking for options to insert the dynamic html in to chart region.
    Sowji.

  • How to get the dynamic Crosstab header name ?

    Hi ,
    The crosstab resaults shows as below ,How to get the dynamic Crosstab header name ?
    | Countryname |
    | Province1 | Province2 |
    | here to get CountryName | here to get CountryName |
    how to get the Countryname in data ceil?
    thanks

    Could you please elaborate on your requirement?
    You want header to be dynamic?

  • Dynamic Configuration Header is Missing

    Hi,
    Am getting this following when I tried a simple UDF in mapping, please let me know your thoughts
    "Exception caught by adapter framework: Dynamic Configuration Header is Missing."
    UDF
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/JMS","DCJMSMessageProperty0");
    conf.put(key1,a);
    DynamicConfigurationKey key2 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/JMS","DCJMSMessageProperty1");
    conf.put(key2,"123");
    return a;
    Thanks in Advance for the help
    Ashok

    Hi ASHOK,
        1.You will be able to see DynaicConfiguration Header automatically in Moni only if your PI is usin service Pack >= 14.in this case  you jus need to check ASMA atributes in Communication channel to capture them in the UDF  that you have written and need not configure the Dynamic configuration bean.To see the Service pack that you are currently using follow the navigation path.
         open the PI through Log on Pad(ABAP engine) -> on the tool bar click utilities>status--> Mote details by clicking magnifying lens symbol then you will be able to see all the services packs and basis components too.
    2.In case if the service pack is not SP ! >= 14 then you will have to follow the procedure of using Dyna,ic configuration Bean as experts mentioned above.
    Thanks,
    Ram.

  • Outbound Plain HTML Adapter how to change the html-header field "host"?

    Hello,
    I'm using XI 3.0 SP11 and want to transmit a message to a business partner using the Plain HTML Adapter.
    My problem is now that I need to change the default Html-Header field "host" because it seems that the adapter engine is converting it to lower case and is attaching the port-number which is causing trouble with the loadbalancer/applicationserver of our business partner.
    I tried to set the appropriate http-header value in the communication channel configuration, but the adapter engine is ignoring this value.
    Thanks in advance for any ideas.
    Sascha Fuchs
    Message was edited by: Sascha Fuchs

    Hi Sascha,
    unfortunately the Plain HTTP adapter is not running in the J2EE, therefore you cannot extend the functionality with an adapter module.
    I am not sure to understand the problem right. Why do you need to change the HTTP header? What is in it in your case and what should be?
    Regards
    Stefan

  • Limit to HTML Header text in APEX Page

    I have an APEX page that has a fairly large amount of javascript in the HTML header. After I added some more, the page blows up. Is there a limit to how much you can add. It doesn't look like Page 0 has the limitation. Is there one one on either?
    What is the best way around this? Adding the individual page javascript to Page 0 or creating a .js that gets included on that page only.
    Thanks!

    Large page sizes will DESTROY your perceived performance. High performance apps go way out of their way to improve page load times by:
    - Minifying or compressing javasript
    - Making sure it is cache-able
    - Loading the minimum amount of javascript you need for the page to function, then "lazy loading" (background loading) the rest
    - Lazy loading all of the JavaScript files you need for the app on the login page or first page to cache them
    - Using gzip compression in the app server
    - Using a Content Delivery Network (CDN)
    - Reducing HTML size using CSS and other techniques
    - Reducing the number of network requests for images using CSS sprites. (more info here: http://www.smashingmagazine.com/2009/04/27/the-mystery-of-css-sprites-techniques-tools-and-tutorials/ )
    Storing JavaScript in the head of the page flies in the face of almost everyone of those concepts. Have a look at this if you have time:
    http://developer.yahoo.com/performance/
    Tyler Muth
    http://tylermuth.wordpress.com
    "Applied Oracle Security: Developing Secure Database and Middleware Environments": http://sn.im/aos.book

  • How can i render a dynamic html file in jsp page

    Hi everybody,
    i am trying to render a dynamic html file in jsp page with the result of querying a database.
    The response of the query is a xml document. And i have a stylesheet to transfer it to html.
    How can i render the html in a jsp file?

    I am using below code for HTML files
    private var appFile:String="index.html";
    if (StageWebView.isSupported)
                        currentState = "normal";
                        webView.stage = stage;
                        webView.viewPort = new Rectangle( 10, 130, (stage.stageWidth)-20, 750 );
                        var fPath:String = new File(new File("app:/assets/html/aboutus/"+ appFile).nativePath).url; 
                        webView.loadURL(fPath);
                        addEventListener(ViewNavigatorEvent.REMOVING,onRemove);
                    else {
                        currentState = "unsupported";
                        lblSupport.text = "StageWebView feature not supported";
    above code is working fine for me.

Maybe you are looking for

  • Won't reset, not recognized by iTunes or computer

    Hello, Last week, my iPod was not recognized by my computer or iTunes, so I successfully followed the instructions to Reset, change to Disk Mode, and then restored the iPod (with the latest Updates and newest iTunes version). Now, my songs cut off be

  • How to stop Finder from opening new windows to view contents of folders.

    I have 2 folders on my desktop, called "Home" and "Work." Both are aliases to files stored in user/documents on my HD. Both contain many folders within folders within folders and, ultimately, documents. When I double click on the "Home" desktop alias

  • Where do desktop pictures reside?

    I have gone to Users Pictures in the main Library as well as Picture folders that reside elsewhere but have yet to be able to locate the "Apple" folder that shows up in System Prefs./Desktop and ScreenSaver/Desktop that holds a multitude of pictures

  • MBAM 2.5 - Encryption on battery power

    Hello, I have recently deployed MBAM 2.5 and have configured the client to silently encrypt. This works perfectly when on AC power (big thumbs up), but this process fails when the laptop is on battery power. Is there any way to override this rstricti

  • CIFS on OES2SP3 not registering as server on WINS server - Unable to obtain server list from CIFS server.

    Running OES2P3 cifs on SLES10SP4. This server is on it's own subnet connected via a router to the other subnets, with the rest of the servers. Name resolution and CIFS file access does work, but browsing does not work. I found that the server registe