Using a Target in an HTML Region
Hi, I have a page with an HTML Region, which links to an external html page. The external page has links to other, secondary external pages. I'd like for the secondary links to open and replace the original external page within the same region on my HTMLDB page.
I've considered trying to create a FRAME inside the region, then using the HREF TARGET= in the external files to point to that FRAME. But, I'd like to be able to do this without manipulating the html code inside the external pages (though that might be an option if I can't get there without doing so).
Any other ideas?
Thanks as always for your help...
Mark
Mark,
Try using an iframe rather than a frame
Similar Messages
-
Use a static file as HTML region source
Hi All,
Sorry for maybe trivial question, but is there a way to use static files as HTML region source? The files are simple enough but have to be translated so we'd rather keep them as static files, rather than paste them in multiple region sources to display conditionally.
I tried something like
<embed src="#WORKSPACE_IMAGES#&FSP_LANGUAGE_PREFERENCE.file01.txt" >
This however is showing the HTML source on screen and not rendering it as html.
The other option I tried is creating an URL region that would get the content from the same server, e.g.:
http://localhost:9080/apex/wwv_flow_file_mgr.get_file?p_security_group_id=4874627831984398&p_fname=en_file01.txt
... but I'm running against an access control list (ACL) error. The file opens when one loads the link directly in a browser but localhost apparently is not allowed in ACL and I would not have sysdba access where I deploy.
finally I saw recommendation to use an iframe in a similar discussion to display pdf file here Display PDF in Apex Region land tried
<iframe src="#WORKSPACE_IMAGES#&FSP_LANGUAGE_PREFERENCE.file01.txt&embedded=true" style="" ></iframe>
but receive "Not found
The requested URL /apex/wwv_flow_file_mgr.get_file was not found on this server" as if the file name is not received at all? Same name is parsed correctly in the embed tag.
Please help
AtanasHello Atanas,
>> the shortcuts text does not get into the translations …
Just so you know, and for future reference, the shortcuts of type Message are fully translatable (as mentioned in the documentation Jari pointed out to you).
Regards,
Arie.
♦ Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
♦ Author of Oracle Application Express 3.2 – The Essentials and More -
How to Display PHP Output as Portlet in HTML Region using utl_http.request
I wanted to be able to parse PHP functions to add more functionality to my Page. nothing fantasy, something simple like: http://phpsysinfo.sourceforge.net/phpsysinfo-dev/?template=classic
Where the realtime values are retrieved from the OS. this represent some kind of problem to me, I know how to do it from Shell Script, Perl or PHP, but not from PL/SQL.
Based on my experience using Oracle Portal, Portlets, I think we really can make use of the feature used in Portal called Web Clipping. [ This feature basically goes to some Site a retrieve part of the site to show in the current page]. Well the PL/SQL utility utl_http.request does something similar.
Make sure your request page does not retrieve some headers because that would cause a problem in your page and will not show up.
This is what I did:
<b> 1.- </b> Grant Privileges to execute [ <b> utl_http.request </b> ] to the owner of your schema.
login into the OracleXE / APEX as SYS then go to the Object Navigator, then click on packages, find the utl_http.request then click on it, later click on grant and select your schema owner for your applicaion.
<b> 2.- </b> Logout as SYS then login as your application schema user. just to test the functionality go to the sql command then enter the following command and then click run:
<b> select substr(utl_http.request('http://www.oracle.com/'),1, 255) from dual; </b>
If your output is:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Oracle 10g, Siebel, PeopleSoft | Oracle, The World's Largest Enterprise Software Company</title> <meta name="title" content="Enterprise Applications | Database | Fusio
<font color='blue'> Wow It worked </font>, this really could be useful !!, If not go back to step 1 and check your permissions to execute, or perhaps your Internet connectivity.
3.- Once we know the package works and we can retrieve content from the Internet. lets go to some of our pages add some HTML Region.
4.- Create an item and put into the new region. the source will be SQL, For the purposes of my test the query to the Oracle Page failed, so I decided to give a shot with a simple PHP script with no headers.
The internal server is: http://mytest.com/hello_world.php
Where the content of the hello_world.php is:
<?
echo '"<b> Hello World </b> ";
?>
This PHP works fine and display the basic Hello World. can be the same server or not, also noticed this can be another port perhaps using something like Ruby,Mason or Java.
<b> 5.- </b> Finally in my Item the source type is SQL and looks like this:
<b> select substr(utl_http.request('http://mytest.com/hello_world.php'),1, 255) from dual; </b>
Apply the changes and run the page !!!
Excelent It worked as expected. now you know how use utl_http.request to create webclipping in your OracleXE / APEX from remote pages, or how to use it to parse the output from CGI, Perl, PHP, Ruby or Java pages.
Note: [ Just make sure to strip the headers or parse into a PL/SQL Procedure to clean then show ]
Best Regards <b> Dino </b>.
Brains R Like Books only work when they R Open.
http://www.htmldbhosting.com/Sorry, from your post in the LabVIEW board I did not understand that it was the Output message that you were looking for.
I thought you wanted the results from your test steps displayed on the user interface.
It is the “Output Panel” in the sequence editor that displays your output message, but I do not know if there is default Output panel activeX indicator for user interface that the TestStand engine would update automatically like it does the execution view.
Maybe someone else knows
As also pointed out, the UI messages is your other option.
The Output Message event number is 40
http://zone.ni.com/devzone/cda/epd/p/id/3879
UIMsg_OutputMessages–(Value: 40) TestStand sends this message at periodic intervals when it holds references to output messages that calls to the OutputMessage.Post method queue. TestStand transfers the queued messages to an OutputMessages collection attached to the UIMessage.ActiveXData property for this event. An application that processes output messages should copy the output message references from the collection in UIMessage.ActiveXData to its own private OutputMessages collection by passing its private collection to the OutputMessages.CopyMessagesToCollection method. An application calls the Engine.NewOutputMessages method to create a private OutputMessage collection. TestStand generates this event only if the Engine.OutputMessagesEnabled property is True. Because there can be more than one handler for this event, the application should not modify the OutputMessages collection the UIMessage.ActiveXData property holds.
Omar
Message Edited by OmarGator on 10-09-2008 10:12 AM -
Use SESSION variable in URL from HTML region
Hello,
I have what looks like a simple question but i've been struggling with it for three days now, and i need your help!
I have a page, with an HTML region. I want to display some links to other pages within the application, so i thought i'd use this:
a href="http://server.xxxx.com:7777/pls/htmldb/f?p=114:13:&SESSION"
But the session ID is not interpreted, and the link doesn;t work. Any idea what's wrong here? or how i should create links with the session id in it?
Thanks!!!! Matt
Message was edited by:
matt_amsterdamMatt,
You've missed off the period (.) off the end, use &SESSION. instead -
(Solved) Calling a different page using HTML Region as a part of other page
Hi All,
I want to open a page as a part of other page as it is done using frames in HTML.
For example :
<html>
<head>
</head>
<frameset cols="30%,*">
<frame src="menu.html">
<frame src="content.html">
</frameset>
</html>
Now I want to use the HTML Region and try calling different page developed in the same application. How can I acheive this task.
Hoping for a quick and easy solution for this.
Thanks in advance.
Regards
ArifOnce Agian Thanks Andrews
http://www.dynamicdrive.com/dynamicindex17/iframessi2.
htmThis web page i suppose is presently not available, atleast i'm not able to open it.
Hope there are some more sites.
I'm trying to search on Google but as I do not have much information about Java Script so cant identify the exact solution.
Hoping to get some predeveloped JavScript that works with Internet Explorer and Mozilla Firefox atleast.
Thanks once again.
Regards
Arif -
Hello,
How to make apex_util.get_blob_file_src servers as a src attribute of HTML Tag in an HTML region source ??
my code :
<div style="">
<embed height="100%" width="100%" name="embed_content" src="apex_util.get_blob_file_src('P126_FILE',FILE_id)" type="application/pdf" />
</div>So, I have PDF file in Blob. But The source here does not get rendered... What SRC do I have to use ??
Regards,
FatehHi Fateh,
How to make apex_util.get_blob_file_src servers as a src attribute of HTML Tag in an HTML region source ??my code :
<div style="">
<embed height="100%" width="100%" name="embed_content" src="apex_util.get_blob_file_src('P126_FILE',FILE_id)" type="application/pdf" />
</div>So, I have PDF file in Blob. But The source here does not get rendered... What SRC do I have to use ??>
Please see the example here http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_util.htm#CHDICGDA.
THEN '<img src="'||apex_util.get_blob_file_src('P4_DOCUMENT',id)||'" />' The API gets called in a PL/SQL block, not embedded into a HTML tag.
Cheers, -
Using dynamic info in html region?
Is it possible to use the output of a query in the source area of an html region?
I'd like to display some data in the source I have in the html region of a page, but I can't find any documentation on how to do that.Hi,
You have to create a dynamic pl/sql region and use PL/SQL and the Oracle Web toolkit (i.e. htp/htf packages). Also you can reference session state using variables bind (:MY_ITEM) syntax.
Example:
declare
my_date varchar2(20);
begin
select to_char(sysdate, 'dd-Mon-yyyy')
into my_date
from dual;
htp.p('Actual date:'|| my_date);
end;Hope that helps,
Paulo Vale
http://apex-notes.blogspot.com -
Using bind variables in HTML Region source
<nl>
http://apex.oracle.com/pls/apex/f?p=49417:1 workspace: SVK demo/demo
I am having problems incorporating an item variable into a string of embedded html that should popup a modal video when the button is pressed.
Item 1 works fine and that is what I want to accomplish with item 2, but when I pass :p1_url, it does not work even though the contents of the two items text areas equivalent.svk1965 wrote:
If you look at my app, you'll see what I am attempting. Click on the button "Pass Hardcoded URLs in Variable to HTML Region" and a modal video will pop up. The goal is to display video in a modal window. The first example in my app works just fine. It is the second one that is causing me problems. BTW - Sequence 18 in the second DA does the same thing as Sequence 10 in the first - and it does work there so I am not sure that removing it is the right thing to do. I am not trying to set a region value per se, but populate the region source and sequence 10 does just that. So I don't think it is "useless" as you say.I can't see anything in the documentation or any previous posts here that indicates that DAs are supposed to work that way. If you can point me to some I'd like to see it. Which is not to say I like the idea. Plays too fast and loose with terms and concepts.
Rather than trying to use a "Set Value" DA, my understanding would be to manipulate the region content via an "Execute JavaScript Code" DA, which works exactly as intended.
I'll have to investigate this DA behaviour with a simpler example that doesn't involve hidden regions and Dynamic Acrion plugins. -
Problem pulling HTML region using AJAX
Hi,
I am using Ajax with Oracle apex, it pulls the report region ok, but when i try to pull the html region, it doesn't. I tried several different ways and in firefox, it does pull the html region but not also pulls the header and footer. On IE, it gives a javascript error.
Is there any way to pull the HTML region from a page using AJAX on IE. I am using the htmldb_get.js's functions for ajax.see
http://apex.oracle.com/pls/otn/f?p=11933:48
working perfectly with latest version of apex on ie, ffox and opera. -
Hi There
I have a simple report - with a link to view an underlying document. The document will be displayed on a seperate page with one HTML region. Say the file to display is statement.pdf and it is has already been uploaded to apex images. There is a hidden field P3_FILENAME on the display page. This gets set from the report. On the HTML region:
<div style="">
<embed height="600" width="1200" name="Statement" src="#WORKSPACE_IMAGES#&P3_FILENAME." type="application/pdf" />
</div>but it does not work. However, if I simply do this and 'run' the page - it displays fine.
<div style="">
<embed height="600" width="1200" name="Statement" src="#WORKSPACE_IMAGES#statement.pdf" type="application/pdf" />
</div>Looking at the source of the resultant failing page I can see that the values were correctly set.
Any ideas?
thanks
PI think the HTML is looking for the explicit &P3_FILENAME. and can't find it because it is being referenced through the HTML rendering engine rather than the PL/SQL engine which would handle the variable substitution.
Try creating a PL/SQL region where you write out the div tags as strings using DBMS_OUTPUT.PUT_LINE. I use this to create some rather complicated reports and it works great for letting me do variable substitution amongst my HTML. Here's a simple example (mine's a procedure I call to feed in page variables):
create or replace PROCEDURE PROC_DASH_SAFETY(x_org NUMBER, x_dt DATE)
AS
v_dt_disp VARCHAR2(15);
v_dt DATE := x_dt;
v_org_id NUMBER := x_org;
v_fact_id NUMBER;
v_org_nm VARCHAR2(47);
v_org_tz VARCHAR2(4);
ontime VARCHAR2(47);
v_saf_ct PLS_INTEGER := 0;
v_eff_ct PLS_INTEGER := 0;
saf_aud_t NUMBER;
saf_aud_a NUMBER;
eqp_aud_t NUMBER;
eqp_aud_a NUMBER;
saf_chk_t NUMBER;
saf_chk_a NUMBER;
saf_loss NUMBER;
eff_mpg_t NUMBER;
eff_mpg_a NUMBER;
eff_idl_t NUMBER;
eff_idl_a NUMBER;
eff_brk_t NUMBER;
eff_brk_a NUMBER;
pm_tgt_pct NUMBER;
pm_ct INTEGER;
pm_act_pct NUMBER;
pm_done NUMBER;
pm_ovrdue NUMBER;
begin -- 100
select ORG_NM, TZ into v_org_nm, v_org_tz from ORG_ENTITIES
where ORG_ID = v_org_id;
v_dt_disp := to_char(v_dt,'MM/DD/YYYY');
select CASE WHEN v_org_tz = 'MST' and sysdate - v_dt < 33/24
THEN '<span class="grn">Yes</span>'
WHEN v_org_tz = 'MDT' and sysdate - v_dt < 33/24
THEN '<span class="grn">Yes</span>'
WHEN v_org_tz = 'MST' and sysdate - v_dt >= 33/24
THEN '<span class="red">No</span>'
WHEN v_org_tz = 'MDT' and sysdate - v_dt >= 33/24
THEN '<span class="red">No</span>'
WHEN v_org_tz = 'CST' and sysdate - v_dt < 32/24
THEN '<span class="grn">Yes</span>'
WHEN v_org_tz = 'CDT' and sysdate - v_dt < 32/24
THEN '<span class="grn">Yes</span>'
WHEN v_org_tz = 'CST' and sysdate - v_dt >= 32/24
THEN '<span class="red">No</span>'
WHEN v_org_tz = 'CDT' and sysdate - v_dt >= 32/24
THEN '<span class="red">No</span>'
WHEN v_org_tz = 'EST' and sysdate - v_dt < 31/24
THEN '<span class="grn">Yes</span>'
WHEN v_org_tz = 'EDT' and sysdate - v_dt < 31/24
THEN '<span class="grn">Yes</span>'
WHEN v_org_tz = 'EST' and sysdate - v_dt >= 31/24
THEN '<span class="red">No</span>'
WHEN v_org_tz = 'EDT' and sysdate - v_dt >= 31/24
THEN '<span class="red">No</span>'
WHEN v_org_tz = 'PST' and sysdate - v_dt < 34/24
THEN '<span class="grn">Yes</span>'
WHEN v_org_tz = 'PDT' and sysdate - v_dt < 34/24
THEN '<span class="grn">Yes</span>'
WHEN v_org_tz = 'PST' and sysdate - v_dt >= 34/24
THEN '<span class="red">No</span>'
WHEN v_org_tz = 'PDT' and sysdate - v_dt >= 34/24
THEN '<span class="red">No</span>'
ELSE '<span class="red">No</span>'
END as PRINT_TIME
into ontime
from dual;
htp.p('<p class="lgl">Dashboard information is confidential. Refer to your employee handbook for confidentiality guidelines.</p>');
--htp.p('<p>'|| v_org_nm ||' on '|| v_dt_disp ||'</p>');
htp.p('<table border="0" cellpadding="0" cellspacing="0" summary="Run Information" width="800">');
htp.p('<tr><td>Dashboard for '|| v_org_nm ||' on '|| v_dt_disp ||'</td><td> </td>');
htp.p('<td>Dashboard run on time? '|| ontime ||'</td></tr>');
htp.p('</table>');
htp.p('<table border="3" cellpadding="0" cellspacing="0" summary="Daily Dashboard">');
--Safety
htp.p('<tr><td><table border="0" cellpadding="0" cellspacing="0" summary="Safety Information" width="400">');
select COUNT(ID) into v_saf_ct from DASHBOARD_AUDITS
where DATE_INDEX = v_dt and ORG_ID = v_org_id;
htp.p('<tr><th><div title="Safety">Safety</div></th><td class="c">Target</td>');
htp.p('<td class="c">Actual</td><td class="c">%</td>');
htp.p('<td style="text-decoration: underline;">Loss Free Day?</td></tr>');
IF v_saf_ct = 1 THEN
select LOSS into saf_loss from DASHBOARD_AUDITS
where DATE_INDEX = v_dt and ORG_ID = v_org_id;
select AUDIT_TARGET, AUDIT_ACTUAL, CHKRD_TARGET, CHKRD_ACTUAL, MECH_TARGET, MECH_ACTUAL
into saf_aud_t, saf_aud_a, saf_chk_t, saf_chk_a, eqp_aud_t, eqp_aud_a
from DASHBOARD_AUDITS
where DATE_INDEX = v_dt and ORG_ID = v_org_id;
----Safety Audits
IF saf_aud_t > 0 THEN
htp.p('<tr><td> Safety Audits</td><td class="c">'|| saf_aud_t ||'</td>');
htp.p('<td class="c">'||saf_aud_a||'</td>');
IF ROUND(saf_aud_a*100/saf_aud_t,2) >= 100 THEN
htp.p('<td class="cgr">'||ROUND(saf_aud_a*100/saf_aud_t,2)||'%</td>');
ELSIF ROUND(saf_aud_a*100/saf_aud_t,2) < 100 THEN
htp.p('<td class="crd">'||ROUND(saf_aud_a*100/saf_aud_t,2)||'%</td>');
ELSE
htp.p('<td class="crd">-</td>');
END IF;
ELSE
htp.p('<tr><td> Safety Audits</td><td class="c">No Audit Target set</td>');
htp.p('<td class="c">'||saf_aud_a||'</td><td class="c">-</td>');
END IF;
IF saf_loss = 1 THEN
htp.p('<td class="cgr">Yes</td></tr>');
ELSE
htp.p('<td class="crd">No</td></tr>');
END IF;
----Equipment Audits
--eqp_aud_t := 0;
--eqp_aud_a := 0;
IF eqp_aud_t > 0 THEN
htp.p('<tr><td> Equipment Audits</td><td class="c">'||eqp_aud_t||'</td>');
htp.p('<td class="c">'||eqp_aud_a||'</td>');
IF ROUND(eqp_aud_a*100/eqp_aud_t,2) >= 100 THEN
htp.p('<td class="cgr">'||ROUND(eqp_aud_a*100/eqp_aud_t,2)||'%</td></tr>');
ELSIF ROUND(eqp_aud_a*100/eqp_aud_t,2) < 100 THEN
htp.p('<td class="crd">'||ROUND(eqp_aud_a*100/eqp_aud_t,2)||'%</td></tr>');
ELSE
htp.p('<td class="crd">-</td></tr>');
END IF;
ELSE
htp.p('<tr><td> Equipment Audits</td><td class="c">No Equipment Audits Target Set</td>');
htp.p('<td class="c">'||eqp_aud_a||'</td><td class="c">-</td>');
END IF;
----Checkrides
IF saf_chk_t > 0 THEN
htp.p('<tr><td> Check Rides</td><td class="c">'||saf_chk_t||'</td>');
htp.p('<td class="c">'||saf_chk_a||'</td>');
IF ROUND(saf_chk_a*100/saf_chk_t,2) >= 100 THEN
htp.p('<td class="cgr">'||ROUND(saf_chk_a*100/saf_chk_t,2)||'%</td></tr>');
ELSIF ROUND(saf_chk_a*100/saf_chk_t,2) < 100 THEN
htp.p('<td class="crd">'||ROUND(saf_chk_a*100/saf_chk_t,2)||'%</td></tr>');
ELSE
htp.p('<td class="crd">-</td></tr>');
END IF;
ELSE
htp.p('<tr><td> Check Rides</td><td class="c">No Checkride Target Set</td>');
htp.p('<td class="c">'||saf_chk_a||'</td><td class="c">-</td>');
END IF;
ELSE
htp.p('<tr><td colspan="4">This information has not been recorded.</td></tr>');
END IF;
htp.p('</table></td>');
select COUNT(ID) into v_eff_ct from VF_TARGET_PERF
where ORG_ID = v_org_id and v_dt between BEGIN_DATE and NVL(END_DATE,sysdate);
IF v_eff_ct = 1 THEN
select MPG, IDLE_TIME, HARD_BRAKES into eff_mpg_t, eff_idl_t, eff_brk_t
from VF_TARGET_PERF
where ORG_ID = v_org_id and v_dt between BEGIN_DATE and NVL(END_DATE,sysdate);
ELSE
eff_mpg_t := 0;
eff_idl_t := 0;
eff_brk_t := 0;
END IF;
select SUM(TRIP_DISTANCE)/SUM(TRIP_FUEL), SUM(HARD_BRAKE_COUNT),
SUM(IDLE_TIME)/SUM(TRIP_TIME)*100
into eff_mpg_a, eff_brk_a, eff_idl_a
from PEOPLENETIF.TRIP_DATA
where TRUNC(TRIPSTART_TIMESTAMP) = v_dt-1
and VEHICLE_LABEL IN
(select EQUIP_TAG from EQUIPMENT
WHERE ORG_ID = v_org_id and EQUIP_TYPE_ID = 1)
and TRIP_FUEL > 0 AND DRIVING_MPG <= 10;
htp.p('<td><table border="0" cellpadding="0" cellspacing="0" summary="Performance" width="400">');
htp.p('<tr><th>Efficiency</th><td class="c">Target</td>');
htp.p('<td class="c">Actual</td><td class="c">%</td>');
htp.p('<td class="c"> </td><td class="c"> </td></tr>');
------MPG
htp.p('<tr><td> MPG</td><td class="c">'||eff_mpg_t||'</td>');
htp.p('<td class="c">'||ROUND(eff_mpg_a,2)||'</td>');
IF eff_mpg_t > 0 THEN
IF ROUND(eff_mpg_a/eff_mpg_t*100,1) >= 100 THEN
htp.p('<td class="cgr">'||ROUND(eff_mpg_a/eff_mpg_t*100,1)||'%</td>');
ELSE
htp.p('<td class="crd">'||ROUND(eff_mpg_a/eff_mpg_t*100,1)||'%</td>');
END IF;
ELSE
htp.p('<td class="c">-</td>');
END IF;
htp.p('<td class="c"> </td><td class="c"> </td></tr>');
------Idle Time
htp.p('<tr><td> Idle Time</td><td class="c">'||eff_idl_t||'</td>');
htp.p('<td class="c">'||ROUND(eff_idl_a,2)||'</td>');
IF eff_idl_t > 0 THEN
IF ROUND(eff_idl_a/eff_idl_t*100,1) > 100 THEN
htp.p('<td class="crd">'||ROUND(eff_idl_a/eff_idl_t*100,1)||'%</td>');
ELSE
htp.p('<td class="cgr">'||ROUND(eff_idl_a/eff_idl_t*100,1)||'%</td>');
END IF;
ELSE
htp.p('<td class="cgr">-</td>');
END IF;
htp.p('<td class="c" colspan="2">PM''s</td></tr>');
------Hard Brakes
htp.p('<tr><td> Hard Brakes</td><td class="c">'||eff_brk_t||'</td>');
htp.p('<td class="c">'||ROUND(eff_brk_a,0)||'</td>');
--htp.p('<td>'||ROUND(eff_brk_a/eff_brk_t,1)||'%</td>');
htp.p('<td class="c">-</td>');
htp.p('<td class="cu">Complete</td><td class="cu">Overdue</td></tr>');
------Preventative Maintenance
select COUNT(ID) into pm_ct from DASHBOARD_PM
where ORG_ID = v_org_id and DATE_INDEX = v_dt;
IF pm_ct = 1 THEN
select PM_TARGET into pm_tgt_pct from PM_TARGETS
where ORG_ID = v_org_id and v_dt >= START_DATE and v_dt <= NVL(END_DATE,sysdate);
select PM_COMPLETE, PM_DUE into pm_done, pm_ovrdue
from DASHBOARD_PM where ORG_ID = v_org_id and DATE_INDEX = v_dt;
IF pm_ovrdue = 0 THEN
pm_act_pct := 100;
ELSIF pm_done > 0 THEN
pm_act_pct := ROUND((pm_done-pm_ovrdue)/pm_done*100,1);
ELSE
pm_act_pct := 0;
END IF;
htp.p('<tr><td> PM Currency</td><td class="c">'||ROUND(pm_tgt_pct,1)||'%</td>');
htp.p('<td class="c">'||ROUND(pm_act_pct,1)||'%</td>');
IF pm_tgt_pct > 0 THEN
IF ROUND(pm_act_pct-pm_tgt_pct,1) < 0 THEN
htp.p('<td class="crd">'||ROUND(pm_act_pct-pm_tgt_pct,1)||'%</td>');
ELSE
htp.p('<td class="cgr">'||ROUND(pm_act_pct-pm_tgt_pct,1)||'%</td>');
END IF;
ELSE
htp.p('<td class="crd">Set Target!</td>');
END IF;
htp.p('<td class="c">'||pm_done||'</td><td class="c">'||pm_ovrdue||'</td></tr>');
ELSE
htp.p('<tr><td> PM Currency</td><td class="c">- %</td>');
htp.p('<td class="c">- %</td>');
htp.p('<td class="cgr">Enter PMs!</td>');
htp.p('<td class="crd">- %</td>');
htp.p('<td class="c">--</td><td class="c">--</td></tr>');
END IF;
htp.p('</table></td></tr>');
EXCEPTION
when VALUE_ERROR then
dbms_output.put_line('VALUE_ERROR exception raised');
end;
/ -
How to - link from HTML Region to Report Column?
Dear Apex gurus,
Ok, I'll go straight to my question. I have a file upload page with Report Region (conditional) which comes up after file uploading process. Under Report I have a column to delete uploaded file (column has an image in link, target in application, item name: P2_DELETE_ID and value: #DOC_ID#). Basically the Report picks up just uploaded file ID and allows me to delete the file by having Hiden Page Item (P2_DELETE_ID) and Before Header Process:
BEGIN
DELETE FROM EBA_ASSET_ORDER_TEMP_DOCS
WHERE doc_id = :P2_DELETE_ID;
END;with condition: Value in Expression 1 is Not Null, and Expression 1 set to:
P2_DELETE_IDI have and another conditional Region (which is HTML) and it comes up after file uploading process as well. The region Source is:
<div id="FinalMessage"></div>
<br />
<div ><a href="javascript:confirmFileDelete(htmldb_delete_message,'f?p=&APP_ID.:2:&SESSION.:REMOVE_ID:::P2_DELETE_ID:#DOC_ID#');"><img >src="/i/delete.gif" style="position: relative; top: 1px;"/>Remove Uploaded File</a>
</div>where id="FinalMessage" - is the Sucess/Error message from JS
and .....href="javascript:confirmFileDelete....... - is my actual question. So, I am trying to hide my Report Region and show only my HTML region where I will be able using this (.....href....) link delete file from my table. I am able to dele file using report colum link but my .....href.... link dosnt want to delete my file, doen't even want to pick up file ID. Is there a way where I can link my .....href.... link to pull from Report Column????
ThanksI am getting crazy now:
It gives me an error message whan I am trying to add RETURN to my process, here is my process, seems to be fine and I can fined what is going on, may be I am blind:
DECLARE
n_size NUMBER;
v_filename VARCHAR2(500);
P2_FILE_INPUT VARCHAR2(1000) := v('P2_FILE_INPUT');
BEGIN
INSERT INTO EBA_ASSET_ORDER_TEMP_DOCS (DOC_ID, NAME, CONTENTS, mime_type, CREATED_ON, DOC_SIZE, FILENAME)
SELECT ID, P2_FILE_INPUT, BLOB_CONTENT, mime_type, CREATED_ON, DOC_SIZE, FILENAME
FROM apex_application_files
WHERE NAME = P2_FILE_INPUT
RETURNING DOC_ID INTO :P2_DELETE_ID;
DELETE apex_application_files
WHERE NAME = P2_FILE_INPUT;
END;error:
1 error has occurred
ORA-06550: line 13, column 38: PL/SQL: ORA-00933: SQL command not properly ended ORA-06550: line 10, column 4: PL/SQL: SQL Statement ignored
Edited by: Yasen® on Oct 5, 2009 3:28 PM -
HEADER AND FOOTER IN HTML REGION
I want to create a repeatable HTML Header (not an ApEx region Header) for a HTML region as described in
http://www.html4newbies.com/header_footer_tip.php
I want to include the header at different points in my HTML region
It says that you need to save the Header in an external file and then reference it using the line
<!--#include file="header.html" -->
Can you do this in ApEx? I've uploaded the file with the header code into ApEx but how do I reference it? I've tried
<!--#include file="#WORKSPACE_IMAGE#header.html" -->
but it doesn't recognize it.
Or is there a better way to do it?
regards
Paul PCan a shortcut be plugged in the middle of report output?
The problem I'm grappling with is the page setup for a report prior to printing.
If I use a template, the header will still appear only once if the report is large and pagination is turned off.
Is the only way to define a "page" in ApEx through Pagination?
If I have a report with no pagination set and the number of rows set to, say 10000 and I want to print off the report, how would I place a page header or footer every 66 lines (i.e. simulating portrait on A4)?
Am I using the wrong application for this?
regards
Paul -
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 -
How to display the value of a javascript variable in a html region ?
Hello,
I need to display my page title or name in a html region.
I added a script in the <title> section of the template header... :
(thanks Andy : Get page name from page attributes ?
<script type="text/javascript">
var pageTitle = '#TITLE#';
</script>... so I can use it in a javascript variable.
But now I don't know how to display it in a html syntax..
Thanks!
Fanny... so I can use it in a javascript variable.Don't see any reason to modify page templates to introduce an unnecessary global JS variable when the document property is already there. Display it using an appropriate HTML element, e.g <tt>h1</tt> if it's the overall page heading.
<h1>
<script type="text/javascript">
document.write(document.title);
</script>
</h1> -
Opening a Word document in a form layout html region
Hi all,
In an Interactive Report I use
select '<img src="#WORKSPACE_IMAGES#'||package.f_get_document_type ( doc.id )||'" title="Document" width=20 height=20>'
) document
from table
to show an icon that eventually downloads (and shows) a word document.
Now I have a form layout html region and I want to have the same icon\link to show a document.The document however is not in the same table as the rest of the page is based on.
How can I show the document on this page?
Kind Regards,
Maurice
Environment = Apex 4.0 database 11G
Edited by: maurice.niezen on Aug 31, 2010 2:10 AMOne way, create a hidden item, and return the value into it from your package (by having a computation that calls the function package.f_get_document_type(:P1_DOC_ID) . Let's say it's called :P1_DOC_TYPE
There's a new item type in Apex 4, which is Display Image.
When you get to settings in the item creation wizard, specify what the image is based on. From there, you can set it to be 'Image URL stored in Page item Value. Then on the source page, you can just specify the URL, #WORKSPACE_IMAGES#&P1_DOC_TYPE.
Maybe you are looking for
-
How to fix a major conflict of Firefox with LG monitor running Dual Smart screen control.
PC: Dell Dimension E510 with MS windows XP professiona, Version 2002, Service Pack 3 Intel(R), Pentium (R) D CPU 2.8 GHz, 1.0 GB Ram. I have a new 23" LG monitor (23EN43T). LG's software for managing screen displays is called Dual Smart Solution, whi
-
OSS Notes for BI 7 Configuration.
Hi, Bases configured BI 7 system ( First Time Client is SAP BI).I have checked the main T-Codes that we use in BI and everything is worki ng fine. My point ,is there any OSS Notes that we need to implement while configuration BI 7?Be cause in mystem
-
Do we need to have Multiple Vendor Roots in PPOCV_BBP for Multiple back end
hi Gurus, Do we need to have multiple vendor root orgs in PPOCV_BBP, when we have mutliple backends to be linked to the same SRM server ? Please do provide your valuable inputs. Best Regards Prashanth
-
How to capture HD/SD in Premiere Pro 2.0 using Sony HVR-M15U?
I have mini dv tapes.Some are HDs and SDs. How to capture these tapes in Premiere Pro 2.0 using Sony HVR-M15U deck? Please help Mark
-
Change column header dynamically at report run time
how to use LOV In report column definition under column attributes for display.. If it suceeded will it dynamicaly change header name at time of running report my requirement is actually to change column header dynamically at time of run report is it