By the way the value of the report column in Javascript
Dear magicians Apex,I am a bit stuck now to implement a modal pop-up/iframe/javascript and this forum is my last hope to solve this problem.
Anyway, I will try to explain what I'm trying to accomplish.
What I need, is: I want to have a SQL report, as first column I want to have an 'ID' of my table numbers and I want this column to have a "link in the column" located in the appropriate links "column attributes. The thing is that when I click on the link of the column (when I run my report on the Apex page) I need a JQuery modal window where the pop-up in IFrame will be another page and this page uses an 'ID' of my link URL column to display the data. So, basically, I want to pass a value of 'ID' of my page parent to my page of the child which appears in an iFrame modal window.
And here's what I have:
1. I have a SQL report:
select SUBNET_ID,
long2ip(NETWORK_ADDRESS),
long2ip(SUBNET_MASK),
long2ip(END_HOST),
long2ip(START_HOST),
MAX_HOSTS,
long2ip(BROADCAST_IP),
NETWORK_CLASS,
NETWORK_SIZE,
HOST_SIZE
from YC_CM_IP_SUBNETS
2 then, in 'The column attributes' to 'SUBNET_ID' a have put a "link in the column" URL like:javascript:ViewNetworkDetails(#SUBNET_ID#);
3. now, when I run my page and point my mouse over any item in my column "SUBNET_ID", I see that she receives a number of "SUBNET_ID" of my table and it shows it in the button of the browser as:javascript:ViewNetworkDetails(1);
, or (2) or anything that is 'SUBNET_ID '. So, that's good.4 and here I am confused, basically, I need to pass a value of
javascript:ViewNetworkDetails(#SUBNET_ID#);
, which seems to work as it gives me good numbers of my table to my 'ViewNetworkDetails' JavaScript function, then it can paste this value in "f?" p =... "IFrame URL. Here is my Jquery Modal script form and Javascript to redirect me to my popup page (the script is located in the HTML header):
<script type="text/javascript">
function ViewNetworkDetails(){
var apexSession = $v('pInstance');
var apexAppId = $v('pFlowId');
var subnetIDNumber = document.getElementById(#SUBNET_ID#);
$(function(){
vRuleBox = '<div id="ViewNetworkDetailsBox" title="View Subnet Details">
<iframe src="f?p='+apexAppId+':103:'+apexSession+'::NO:103:P103_SUBNET_ID:'+subnetIDNumber+'
"width="875" height="500" title="View Subnet Details" frameborder="no"></iframe></div>'
$(document.body).append(vRuleBox);
$("#ViewNetworkDetailsBox").dialog({
buttons:{"Cancel":function(){$(this).dialog("close");}},
stack: true,
modal: true,
width: 950,
resizable: true,
autoResize: true,
draggable: true,
close : function(){$("#ViewNetworkDetailsBox").remove();
location.reload(true); }
});
});
}
</script>
PS My hypothesis is that there is a problem with this part of my scriptvar subnetIDNumber = document.getElementById(#SUBNET_ID#);
where I can't get my "SUBNET_ID" value fromjavascript:ViewNetworkDetails(#SUBNET_ID#);
in 'subnetIDNumber' variable and that's why I can't spend my iFrame URL.P.S. P.S. the child page 103 has a "Automated row fetch", is not a problem. In addition, I did a simple test, where I had a page element 'P102_Value' with values and in my script I had instead
var subnetIDNumber = document.getElementById(#SUBNET_ID#);
Thisvar subnetIDNumber = $v('P102_Value');
and it worked perfectly fine... but cannot operate against the SQL Select statement :-(HEEEEEEEEEEEEEELLLLLPPPP.
Thank you
Change your column to link to send the value of the subnet_id column to the function call (you mentioned, but I don't know if you've actually done m)
JavaScript:ViewNetworkDetails(#SUBNET_ID#);
You pass the value of the parameter to the function, but not defined all the parameters in the function definition (this is possible in JS, no other parameter is ignored)
For example, to change the function to accept the subnet ID parameter (I'm really surprised how you missed it) and assign this parameter to a variable.
-->
Similar Questions
-
Question by passing the value of the report column via javascript
I'm going through #COL05 # to P28_CREATIVE_URL using the following javascript code. I got this Oracle documentation example, but it does not work for me. The status bar shows me that #COL05 # is recognized correctly, so it might be in the... opener.document.
PAGE
Function and Global Variable declaration:
function passback (passVal1)
{
opener.document.getElementById("P28_CREATIVE_URL").value = passVal1;
Close();
}
Column attribute
The column link
URL:
JavaScript:passback(#COL05#); Use instead of single quotes
javascript:passback('#COL05#');
-
What region in the report column HTML link?
Dear gurus of the Apex,
OK, I'll go straight to my question. I have a page to download file with region (conditional) report that comes after the file download process. According to the report that I have a column to remove the file downloaded (column has an image link, the target application, the name of the option: P2_DELETE_ID value: #DOC_ID #). Basically the report picks up just downloaded file ID and allows me to delete the file by having Hiden point Page (P2_DELETE_ID) and before the process of header: BEGIN
REMOVE FROM EBA_ASSET_ORDER_TEMP_DOCS
WHERE annual =: P2_DELETE_ID;
END;
condition: Expression 1 value is not Null, and the value of the Expression 1: P2_DELETE_ID
I and another conditional region (which is HTML) he comes after the file download process as well. The Source region is:
& lt; div id = "FinalMessage" > & lt; / div >
& lt; br / >
& lt; div > & lt; a href = "javascript:confirmFileDelete(htmldb_delete_message,'f?p=&APP_ID.:2:&SESSION.:REMOVE_ID:::P2_DELETE_ID:#DOC_ID#')"; > & lt; "img > src="/i/delete.gif "style =" position: relative; " Top: 1px; ' / > delete the downloaded file & lt; /a >
& lt; / div >
where id = "FinalMessage" - is the JS success/error message
and... href = "javascript:confirmFileDelete--is my real question. So I try to hide my region to report and show only my region HTML where I will be able to this (... href...) link delete file from my table. I am able to dele file using report link colum but my... href... link dosnt want to delete my file, doen't even want to pick up the ID of file. Is there a way where I can link my... href... link to pull the report column?
Thank you NP - now access, so I will have a look
Andy
-
JavaScript: Disabling text box in the report column cell
Hello
Andi (ATD) helped with formatting of columns in the report, their coloration depending on a value. See:
JavaScript - referring to the value of the report column
Now, I want to add a feature:
If the value is "1" then turn off the text box in the column next, otherwise no. The function is:function hilite(f1)
{
var h = document.getElementById(f1);
var t = h.parentNode;
while (t.tagName != 'TABLE')
{
t = t.parentNode;
}
var rows = t.rows;
var k;
var i;
var j;
var c;
var headers = t.getElementsByTagName("TH");
// var textarea = t.getElementsByTagName("textarea");
for (k = 0; k < headers.length; k++)
{
if (headers[k].id == f1)
{
c = k;
}
}
for (k = 1; k < rows.length; k++)
{
i = rows[k].cells[c];
j = rows[k].cells[c+1];
if (i.innerHTML == '2')
{
i.style.backgroundColor = 'yellow';
i.style.color = 'white';
i.style.fontWeight = 'bold';
i.style.fontSize = '18px';
}
if (i.innerHTML == '1')
{
i.style.backgroundColor = 'red';
i.style.color = 'white';
i.style.fontWeight = 'bold';
i.style.fontSize = '18px';
// j.style.backgroundColor = 'green'; // testing purpose; colors background green but not textarea
j.style.visibility = 'hidden'; // works fine but ugly
// j.disabled = 'true'; // nothing happens
// j.firstChild.disabled = 'true'; // does not work
// j.textarea.disabled = 'true'; // does not work
}
}
}
See the object of 'j': I can do the whole cells disappear, but it's ugly. It examines with firebug I thought I should use sth. such as firstChild or textarea, but it does not work. I find always pretty hard to manipulate tables in Apex...
Could someone help with this?
Thank you very much
Roger Hi Roger,
«"" You're sort of almost here!»»»
The next cell to the right of the one that that you are testing contains a TEXTAREA object. Your variable j accesses it using something like:
j = rows[k].cells[c+1].getElementsByTagName("TEXTAREA")[0];
The problem with the help of the method of visibility you have used will disappear while you applied to the entire purpose of TD, so all the borders will go - this application to the new j allows to hide the textarea rather object only.
Andy
-
How to extract values of classic report column in the text element
Hi all
I've created a classic report (select id, name,' < input type = "button" value = "add" id = "add" name = "add" > "as" add details "details ;) with a single column as column values want link.i in the text element when I click on the link of that particular record of the report)
(1) in the link this link column property I've specified the URL as [javascript:insert_in_table(#ID#,#NAME#)]
(2) text two article P_ID, P_NAME
(3) in the header of the page, I've specified as javascript
< script type = "text/javascript" >
function insert_in_table (id, name) {}
var regId = ' #detail #'.substr (1);
var req = new htmldb_Get (not null, $v ('pFlowId'), 'APPLICATION_PROCESS = add', $v('pFlowStepId'));
Req.Add ('P_ID', ID);
Req.Add ('P_NAME', Name);
forced. GetAsync (function () {}
If {(p.readyState is 4)
$a_report (regId);
}
});
}
< /script >
(4) created a (add) process whose point: on demand, run this process when requested by ajax
pl/sql: insert into name_detail (id, name) values (: P_ID,: P_NAME)
now the problem is I m not getting the values of column in the report in the text element, it only shows white.
Kind regards
Ketan
Hello Ketan,
Assuming that you want to insert the values into the table, this is why you want to set values for the element,
If this is the case, then no need to define values for the element to insert.
Follow the steps below, it is one of the embodiment of your condition.
Step 1: Put the code below in your classic report query
assuming that the id is of type number and the name is of type varchar, that's why I am attaching the name to apostrophe, see line 3
select id
, name
, '' as "Add to detail"
from detail
Edit 'Add details' column-> column attributes-> view-> column of Standard report
Step 2: Create a process in the processing of the Page
Name: INSERT_DATA
Address the point: on demand, run this process when requested by ajax
Process: putting the code below
Declare
P_ID number ;
P_NAME varchar2(50);
Begin
P_ID := apex_application.g_x01;
P_NAME := apex_application.g_x02;
insert into name_detail(id,name) values (P_ID,P_NAME);
End;
Step 3: Create a java script function to call your insert ajax process.
Change the Page-> the function and the global variable declaration-> put the code below
function insert_in_table(id,name) {
apex.server.process ( "INSERT_DATA", {
x01: id,x02: name
}, { success: function( pData ) { }
});
}
Hope this helps you,
Kind regards
Jitendra
-
Need help with Javascript to get the value of standard report column
Hi all
Apex 3.1 version
I have a query SQL (editable report) region where I need to do validations using a process of OnDemand and javascript. For this posting, I need to use the serial number and id of this same report line item. The function is called when the serial number is changed. I can get the serial number easily because it is a text field, however, the item id is a standard report column (which actually a text field or hidden gives me a checksum error, long story). How can I get the value of the standard report column to set the value of an element of the Application to use in my process of application as well as the serial number? Here is my code below.
<script>
function f_ValidateSerial(pThis)
{
// The row in the table
var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
//alert('Row is '+vRow);
// Display the serial number
//alert('The Serial Number is '+html_GetElement('f21_'+vRow).value);
var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=ValidateSerial',0);
get.add('F101_SERIAL_NUMBER',html_GetElement('f21_'+vRow).value);
get.add('F101_INVENTORY_ITEM_ID',+html_GetElement(?????+vRow).value); // Here's where I need to get the item id to set application item!!
gReturn = get.get();
if (gReturn)
{
alert(gReturn);
}
if(gReturn)
{
html_GetElement('f21_'+vRow).value = '';
}
}
</script>
Hello
Ok
Item ID is standard report column.
If you enter this Expression HTML column
#ITEM_ID#
I guess that the substitution of column item Id is #ITEM_ID #.
Now, you have hidden input form that is not submitted.
Then in JavaScript
get.add('F101_INVENTORY_ITEM_ID',+html_GetElement('item_id_'+Number(vRow)).value);
Kind regards
Jari
-
JavaScript - referring to the value of the report column
Hello
In my application, I have a 'Test' relationship with some columns. In the "PFT_PCODE" column values can be 1 or 2.
What I want is to display report in red table cell, if the "PFT_PCODE" value is 1, or table at orange cell, if the "PFT_PCODE" value is 2, respectively.
I tried to do something in Javascript, based on the example of a Vikas. I put in the
Header of the region:
< style type = "text/css" >
{.rot}
background-color: red;
}
.Orange {}
background-color: orange;
}
< / style >
Footer area:
< script type = "text/javascript" >
var spans = document.getElementsByTagName ('span');
for (var j = 0; j < spans.length; j ++) {}
If (spans [j] .className == 'farbe') {}
var td is html_CascadeUpTill (spans [j], 'TD');.
If (document.getElementsById('#PFT_PCODE#').value == 1) {}
td.className = "rot";
}
else {}
td.className = 'orange ';
}
}
}
< /script >
The "PFT_PCODE" column is marked as "farbe" CSS class
Unfortunately it does not work, I do not know if I have the right to report to reference the column value. Since I'm a newbie in Javascript, I'd be happy to help.
I put my request (reduced) on apex.oracle.com for the test.
Workspace: app
Login: roger.fatton@bl.ch
PW: riponi
Thanks in advance,
Roger Hello
OK - the problem is that some of your columns had tables in the cells and it was upsetting the javascript!
I have changed the script:
<script language="JavaScript" type="text/javascript">
<!--
function hilite(f1)
{
var h = document.getElementById(f1);
var t = h.parentNode;
while (t.tagName != 'TABLE')
{
t = t.parentNode;
}
var rows = t.rows;
var k;
var j;
var c;
var headers = t.getElementsByTagName("TH");
for (k = 0; k < headers.length; k++)
{
if (headers[k].id == f1)
{
c = k;
}
}
for (k = 1; k < rows.length; k++)
{
j = rows[k].cells[c];
if (j.innerHTML == '2')
{
j.style.backgroundColor = 'purple';
j.style.color = 'yellow';
}
if (j.innerHTML == '1')
{
j.style.backgroundColor = 'red';
j.style.color = 'white';
}
}
}
//-->
</script>
and it seems to be ok
Andy
-
Hello
I looked at the report "database application example" that comes with APEX 4.2.6. I wanted to know the setting that shows some of the columns in all (marked in red below) and a few columns in all but their values under the column (marked in green box below).
Below is the setting of the user interface for the region of its report. Please specify.
Thank you
-Anand
anand_gp wrote:
I looked at the report "database application example" that comes with APEX 4.2.6. I wanted to know the setting that shows some of the columns in all (marked in red below) and a few columns in all but their values under the column (marked in green box below).
This is the detail view of the interactive report. You can use it to create a view of the data returned by the report with a different structure. This is described as "detail view" as all of the columns in the report query can be referenced in the model of retail #COLUMN_VALUE # the substitution syntax, including the columns where the attribute of text to display as column has the value Hidden that do not appear elsewhere in the report.
Below is the setting of the user interface for the region of its report. Please specify.
These settings control positioning and appearance of full interactive report region, not the content of the report layout.
-
Questions from the media on the report columns
Hello
I'm experimenting with questions from the media on the APEX components such as the columns on the report.
I have an example that works, but I wonder if it's the best way to go about it.
I applied the following CSS
@media (orientation:portrait) {
.landscape_only {display:none;}
}
@media (orientation:landscape) {
.portrait_only {display:none;}
}
For components such as regions, buttons etc - I can apply "CSS Classes" attribute class to the component level.
for example: I have applied the .portrait_only in the area of 'Code' in my example
but for the columns in a report, I had to apply this jQuery on the page loading.
$('th#HIREDATE, td[headers=HIREDATE]').addClass("landscape_only");
If I applied to the class in the detail of the column that the data has been hidden when Guide to portrait - not the entire column.
Are there more effective methods of enforcement of the class to the column?
Reading articles like this lead me to think that way, but I don't know if APEX could be other solutions.
5 tips for better jQuery selectors - SitePoint
It becomes a little pain if I wanted to list a number of columns.
I look forward to jQuery gurus ;-)
Scott
Rather than specify the classes at the level of the components and using jQuery when running, why not simply specify the items directly in the stylesheet?
@media (orientation:portrait) {
#P2_BUTTON2,
th#HIREDATE, td[headers=HIREDATE] {display: none;}
}
@media (orientation:landscape) {
#P2_BUTTON1 {display: none;}
}
This seems to be a more effective approach that all orientation-based rules are easily visible and easy to manage in one place, rather than be dispersed through the definitions component and dynamic action.
-
The report columns duplicated when the region is copied.
Re: Report columns duplicated when the region is copied.
When I copy a region that I created the form master / detail report columns are duplicated. I am actually copy the entire page, but I had other cases where I just copy the desired region and the columns have been duplicated it as well. And, of course, there is no way I know to remove the columns of the shape. But I doubt it would help because, in some cases, I've tried - the columns seems to be 'related' in that a change to a copy of the column has been duplicated in the other, when changes have been applied.
In the example (below), there are three areas on the page and the problem occurs in region 2. (I think I'll probably remove the first region). He was ripping trying to get the report of region 2 and changes formish tabular region 3 on the same page. I made this in Oracle 11.2 in our APEX 4.1 and imported to 4.2. You can see here:
WS apex_examples_01
demo
demo
Appl. 991204
Page 57 is the original page created in 4.1 and imported
58 page is the page copied from 57 under 4.1 and imported
59 page is the page copied from 57 under 4.2 (same result 4.1).
If you want to try the page, select DSD01 in the DSD LOV, click on "Application process" and then click the icon change. Ignore errors in the region 1 - I'll probably delete this region. The data are region 3 is Run Date may 12, 13.
Is there a setting that allows this region can be fully copied without duplicating the columns?
Thank you
Howard
P.S. I think I know why this is happening: APEX hates me! Howard (in training) wrote:
P.S. I think I know why this is happening: APEX hates me!
I think it's a trap left by tabular, tabular forms of sabotage tabular forms... I love ;-)
This is a long-standing bug very (+ {: identifier of the thread = 269916} +) that I've seen before: + {message identifier: = 10504044} +.
The problem in the region created by Wizard of origin not having either do not report Source using specific query column names and validate queries / use column names generic (analyzing the query executing only) options selected. Click on the radio button using specific query column names and validate query before copying the region/page. Compare the before and after effects of do so on pages 570 and 571 in your sample application.
(Looking for the Forum before posting?) Previous discussions were not hard to find in this case.)
-
The report columns fell after the update of the page
I created a page of interactive report with the following sql code:
Select emt.emergency_id
emt.emergency_name
emt.emergency_effective_from_date
emt.emergency_effective_to_date
'ALTERED' AS IMPAIRED
"EVACUATION" AS EVACUATION
'LIFE_SUSTAIN' AS LIFE_SUSTAIN
emt.log_creation_date
emt.log_creator
of nicedw.err_master_tab emt
I created links to separate pages for IMPAIRED titled columns, EVACUATION and LIFE_SUSTAIN. Everything worked very well until the user was asked to change the names of column to IMPAIRED_LOG, etc. and the value as follows:
Select emt.emergency_id
emt.emergency_name
emt.emergency_effective_from_date
emt.emergency_effective_to_date
, 'OPEN LOG' AS IMPAIRED_LOG
, 'OPEN LOG' AS EVACUATION_LOG
, 'OPEN LOG' AS LIFE_SUSTAIN_LOG
emt.log_creation_date
emt.log_creator
of nicedw.err_master_tab emt
When I changed the query and saved the page all links were washed away so I had to redefine their. However, when I run the page, static link columns, IMPAIRED_LOG, etc., do not appear. all of the normal properties in the report appearance attributes tab. For example, the display of text as the property is: display text (escape special characters) and other properties which are identical to the other columns of characters. How can I display these columns? is there a dark property that has been affected? After adding new columns to an IR existin, you must select them for display as developer and Save the new report as the default main.
-
Hello
How can I create a column of link area of report (not an area of interactive report).
Link column configuration section is not available for a report from the region.
APEX version: 4.0.1.00.03
Thank you.
Dave,
Do you not see a section labeled
"Link in the column".
When you drill down on a particular report column? I see this section of the Interactive reports and classic.
-Joe
-
How controll in the report column width?
Dear all,
I created the classic report, but here the column width is too large.
I want to the column width of the control in the report.
How can I do this...
Thank you I use Apex 3.2.
It's a shame. Just try to change:
Report--> Column--> column formatting attribute--> Style CSS
for width: 100px
Also make sure that your text to column heading to enough short to fit into the column.
Rod West
-
Linking the report column to open a Web page
Hi all
Need a sincere help. I have a TAB_ARC table. In which I columns
ID
PART_NUM
LINK_TO_PART_NUM (its hyperlink)
I did report and formula on even. I'm inserting PART_NUM and LINK_TO_PART_NUM (which is a respective web link to the PART_NUM) in the of which is updated of my table TAB_ARC.
In the report I have ID and PART_NUM display. I want to link the PART_NUM with my LINK_TO_PART_NUM so that whenever I click on any of the PART_NUM it opens a new page with the link to LINK_TO_PART_NUM
We hope to get a response from you all because it is urgent.
Concerning
Published by: User_Apex on April 26, 2011 02:23 If LINK_TO_PART is a valid url so that you can change the PART_NUM column in your report. Go to the column binding attributes and set the following parameters:
Text link: #PART_NUM #.
Target: URL
URL: #LINK_TO_PART #.
Thank you
Janet Tyson
-
Including the names of items in the report column headings
I got a report where I want to use page elements in the column headers. Try to define these using (for example) & P1_ITEM. in the report definition / custom position doesn't seem to work. I can define a simple function from PL/SQL to return the position, but I have a lot of columns and this means I have to define a function for each column name that does not appear elegant v. Am I missing something obvious?
Thanks Simon Hi Simon
Column attributes
Headings Type: Column Names Column Names (InitCap) Custom PL/SQL None
Choose PL/SQL
Function that returns the entries from the colon delimited:
DECLARE
vHEADINGS VARCHAR2(1000);
BEGIN
vHEADINGS := 'NAME:SURNAME:CODE:CELL_NR:&P1_CELL_1.:&P1_CELL_2.:&P1_CELL_3.:' || :XXX || ':' || :YYY || ':' || :ZZZZ || :A || ':' || :B || ':' || :C;
RETURN vHEADINGS;
END;
Concerning
Mel
Maybe you are looking for
-
How can I get this popup of Yahoo to stop?
When browsing, a popup of Yahoo appears often invites you to add an extension of yahoo. I don't want the extension, but this option is not given. All I can do is close the popup only to reappear a few clicks later. How can I get this popup to stop? I
-
Satellite A300 - rotates but does not start
Hello I have a Satellite A300. I had several probems for the boot since 2 months ago: when I want to turn on my laptop, it turns on but the screen keeps black and it does not load the screen "Toshiba Leading Innovation". 'Satellite' (to the left of t
-
Problem after installation of Windows XP Home on Satellite L355-S7812
Hello I went down to WXP and after that, I have problem with the display driver. It does not work. I tried to use the Toshiba site and installation was successful, but without effect. Information about Device Manager, is that this driver is corrupted
-
Looking better all the objective for an EOS 20 d lenses
Hello world. I've had my EOS 20 d for over 10 years now. I've never been satisfied with the 18-55mm EFS lens it comes with. Just don't have enough zoom or wide angle. I don't do anything professional. Simply take a lot of family and outdoor / na
-
When you try to start the help and support service get: "Error 1083 the executable program that this service is configured to run does not implement this service.