Value of the hidden element escaped
APEX 4.2Part of the hidden, page unprotected. Point of security settings: none listed, no session state protection, not encrypted, all characters allowed.
On the design page load sets the value to a date (jj/mm/aaaa)
What is the value of the element is used in a JavaScript apex.confirm message using and ARTICLE. the notation, the slashes in the value are escaped to & #x2F;
Why is this? How can I get APEX to leave the only value?
Thank you
Did I mention that all these security settings few are starting to really annoy me? :-(
Hi Vikas,
they are intended to help you to create better applications, but I know what you mean. In this particular case, probably set you the application security attribute 'HTML escaping Mode' 'Extended '. This allows to escape more stringent than plain old htf.escape_sc. It is also the default value for new applications.
Please do not use substitution in Javascript variables. They are more than exhaust HTML and cross-site scripting could be possible. Instead of
alert('Value is &P1_ITEM.');
You can also write
alert('Value is '+$v('P1_ITEM'));
Who are a little more character, but they are worth of typing.
Kind regards
Christian
Published by: Christian Neumueller on November 28, 2012 09:15 (additional sentence on exhaust HTML Mode)
Tags: Database
Similar Questions
-
Display the values of the Page element in HTML table
Hi all
could you please help me with the below? I want to have a table in the HTML area and to display in the table of elements of the Page of the page.
I got the code like this:
{
< table >
< tr > < td > & P1_ECEMEA_ASSISTANCE < table > < /tr >
< tr > < td > & P1_ECEMEA_WIP < table > < /tr >
< /table >
}
It shows the element of the Page names in the form of text, not the values.
However, this code without the tags table:
{
ECEMEA request for Assistance of the CQT: & P1_ECEMEA_ASSISTANCE.
ECEMEA CQT Work in Progress: & P1_ECEMEA_WIP.
}
Works and Page element values are displayed.
Is it possible to display the values of the Page element in the HTML table at all or should I use a different method to show the values in a table? The above is only an excerpt of the code. I need to display about 30 items in Page, put in shape in a table with headers.
Please let me know what kind of region is the best to use, or if I have to use only a few symbols of escape in the table code...
Thank you and best regards,
VladimirVladimir,
Looks like you're missing the period after the substitution variables.
{
&P1_ECEMEA_ASSISTANCE. &P1_ECEMEA_WIP. -D.
-
Set the value of the page elements using apex.submit
Hey,.
Does anyone have an idea how to set the value of several page elements using apex.submit?
Here is my request, she works for this element of the page, but I want to first the value of the other elements of the page (i.e. P30_SHOW_REF) as well.
select s.nr as NRR, '<input type="button" value="clickme2" onclick="document.getElementById(''BUTTONS'').style.display = ''block'';apex.submit({request:''SET'',set:{''P30_KLT_NR'':'||s.nr||'});"/>' Button from klant s
Thanks in advance!
Hi Julijan,
Here is the example:
apex.submit({ request:"DELETE", set:{"P1_DEPTNO":10, "P1_EMPNO":5433});
Concerning
J
-
I have a simple test form that contains a cftree and some fields of seizure/hidden. Whenever a tree node is selected, I want to change the values of the fields of entry/hidden to some node is selected. Pretty simple, but I can not understand how to change the values of the hidden fields.
Load the form, select "ItemA" and click on submit. Do not change the values of the hidden form fields. They are always "not defined". What is the correct syntax to change the value of the hidden field?
The correct syntax is
myForm.theID = 'theID = "+ valueString;
Ken
-
JavaScript allows you to change the value of the page element?
How to use JavaScript to change the value of the page element?
I can read the value of the page element.
I can change it by JavaScript?
Thank you.
DavidDepends on what is the type of page element - for text/no Select something like:
function setValue(){ $x('P1_FIELD').value = 'Oracle'; }
For a select element, something like this:
function setSelectValue(){ html_setSelectValue('P1_SELECT', 'Oracle'); }
-
What trigger use to change the value of the front element validate trigger
Hello
I would like to have an element of the DATE where it is possible to enter values as 1 + 12,-1, which should respond to the evolution of the value of the element to SYSDATE-/ + X. How should I do?
Now, when I get out of the question, I get a validation error because the value of the element is not a valid date. How can I change the value of the date before it is validated?
ConcerningCreate a non-base of data-element with the char data type.
Fill the element in the POST-QUERY-trigger with the value of the date element of the basis of something like:BLOCK.THECAHRITEM:=TO_CHAR(:BLOCK.THEDATEITEM, 'DD.MM.YYYY');
Then in the WHEN-VALIDATE-ITEM, check if the user entered a valid date, then simply write to the database column, otherwise check a valid value you want to treat, make the appropriate conversion and rewrite the date you got in the article database and the database element.
-
How to extract the values inside the jquery element dialogue modal rigion
Hi all
My requeriment is
Click report link open jquey editable modal dialog and display all values with respective ID values.
1.I used page header HTML code below
< link rel = "stylesheet" href = " " http://AJAX.googleapis.com/AJAX/libs/jQueryUI/1.7.2/themes/
"Redmond/jquery - ui.css" type = "text/css" / >
" < script src =" http://AJAX.googleapis.com/AJAX/libs/jQuery/1.4.2/jQuery.js "> < / script > .
" < script src =" http://AJAX.googleapis.com/AJAX/libs/jQueryUI/1.7.2/jQuery-UI.js "> < / script > .
< script type = "text/javascript" >
$(function() {})
() $('#ModalForm').dialog
{
modal: true,
autoOpen: false,
Width: 600
buttons: {}
Back: function() {}
closeForm();
} ,
Approve: function() {}
addPerson();
},
Return_For_Correction: function() {}
addPerson();
},
Reject: function() {}
addPerson();
}
}
});
});
function openForm (TrxId)
{
Alert (TrxId);
$s ('P3_x_trx_id', TrxId);
$('#ModalForm').dialog ('open');
}
function closeForm()
{
$('#ModalForm_input[type="text"]').val (»);
$('#ModalForm').dialog ('close');
}
function addPerson()
{
var ajaxRequest = new htmldb_Get (null, & APP_ID., 'APPLICATION_PROCESS is updateStatus', 0);
ajaxRequest.add ('P3_status', $v ('P3_status'));
var gReturn = ajaxRequest.get ();
If (gReturn)
{alert (gReturn)}
on the other
{ajaxRequest = null;
closeForm();
doSubmit ('SEARCH'); }
}
< /script >
2. static html Id - ModalForm region
3. region html Header-
< div id = "ModalForm" title = "View details" style = "display: none" >
4.footer-
< / div >
5. in the same page created 'extraction of line auotomatic' process by using the value of key PK P3_trx_id
6 Jquery modal region is created but not showing values.
Hi Dan,.
You must create a separate page for your modal dialog box,
Call this dialog in the parent page and pass the value modal page in some hidden item and use the value of the element to retrieve details on the modal dialog box.
1. change your report Page-> under the header HTML
2. change the link from which column you want to call the modal dialog box.
Target: URL
URL: javascript:f_modalDetails(#ID#);
instead ID, pass the value that you want to pass to the modal dialog box that shows you the data associated with the selected line.
3. go to the page of the form (modal dialog)
Change your close button that closes the modal dialog box.
Action: Redirect URL
Target URL: javascript:window.parent.closeModalDialog();
Close the Model dialog box using the "submit" button press
4. create a branch on the processing section of the Page of the page of the modal dialog box
Branch point: After Processing (After computation, validation and Processing)
Target type: Page of this Application
Page: Redirect to the same page
Request: CLOSE_MODAL
When you press the button: select the Send button
NOTE: Branch must be before all the unconditional branch on this page
5. create a dynamic Action on the Page modal dialog box
Event: Page load
Action: Run the JavaScript Code
Code: javascript:window.parent.closeModalDialog();
Kind regards
Jitendra
-
Apex 4.1
Oracle 11g
I have a page which consists of a main and several sub-regions area. I have a pl/sql process in after the header SET_DISPLAY(:P400_DISPLAY:='MAIN';))
Three subregions have a contional show where P400_DISPLAY = STORE. It works in the hiding of the sub regions.
Now, I want to change the value P400_DISPLAY to the STORE to show the subregions when I hit a button.
I tried to create a dynamic action for the click on the Add button, but get the following error:
The selected button uses a model of 'button' that does not contain the #BUTTON_ID substitution string #. I went to the models and found:
Substitution strings are used in sub models to reference the value of the components. This report details use of string substitution for this model.Substitution string Referenced De Description #LINK #. Yes Model To be used in an attribute "href". #JAVASCRIPT #. NO. To be used in an "onclick" attribute #LABEL #. Yes Model Button label #BUTTON_ATTRIBUTES #. NO. The attributes button #BUTTON_ID #. NO. ID generated button will be ID either the static button if defined, or if not will be a generated ID internally in the format 'B ' | [Internal ID of the button. I then tried to create a page process, pl/sql,: P400_DISPLAY: = 'STORE '; If the button is pressed. The action of the button is submit page. However, it does not change the value of P400_DISPLAY and the subregions are hidden.
Suggestions please on how to fix the template or change the value of P400_DISPLAY?
The question of the root, it's that, even if you change the value of the element of your page, it is not visible to other areas of the page until it is in the session. Thus, any other action based on the value of the element of your page. the visibility of a control, a report based on the value of the item, etc. will be affected by changing the value of the item page until it has been changed in the session. Even after that, items are stored in the session, then you must do something to influence the revalued value. To see the effect of this, observe that your page will load and assesses the value of the element of your page, it sees which is the "MAIN" and mask areas. However, he didn't reassess after that.
Then; your choices for this value set at the session are send the page, or use JavaScript to set the value in the session. If you use the latter, you will have to do extra work to make visibility tests be re - run, so, let's stick with the submit method.
What you did above sounds correct to do this but, there are a lot of decisions, that you might have done that may have caused things to do not occur in the correct order.
First of all, we will confirm that what I describe above is your problem. From the development environment, load the page, click on the button to change the value and submit. Now, click on the link marked the Session. He is always at HAND? If the answer is "Yes"; That's your problem.
Let's start with your calculation after the header. You set it to * only * run if the current value of the element of your page is null? If this isn't the case, it's your problem.
Load the Page-> Item set to 'Hand' by calculation-> click on the button--> Item set to STORE-> Submit-> Page Load-> point by calculating the value 'hand '.
See the problem?
Assuming that's not the question, you have created a branch to the same page, right? What is your process for the branch point? Is it * after * Validation, computation etc.? Because if not, you are not changing the value before that didn't get to submit.
I bet that's the first question, but take a look at these.
See you soon,.
-Joe
-
Value of the page element in the APA process not maintained after the send this page
Hello - I have a sequence of events that goes like this:
(1) region 0 REG_1 Page is rendered before footer
-REG_1 region uses javascript / AJAX to call App process PROC_1
-PROC_1 defines Page1 item PAGE1_MESSAGE for X
-After that PROC_1 runs correctly, REG_1 don't doSubmit()
(2) region 0 REG_2 Page is rendered before footer; in this case
After the page sent by REG_1. (Requirements to ensure that)
REG_1 has not yet reached)
-REG_2 region shows an alert PAGE1_MESSAGE (= X).
-REG_2 region uses javascript / AJAX to call App process PROC_2
-PROC_2 sets page 1 point PAGE1_MESSAGE to Y
-PROC_2 sets point Application DEBUG to PAGE1_MESSAGE (this is for debugging)
-PROC_2 defines the point of Application APP_MESSAGE to Y (this is also for debugging)
-After that PROC_2 runs correctly, REG_2 don't doSubmit()
(3) after that REG_2 sent the page, here's what I have:
-Point application APP_MESSAGE = y. good. That's what it has been for PROC_2.
-Point Page 1 PAGE1_MESSAGE is bad. X. That's what he has been put to in PROC_1.
-Point application DEBUG = y. good. This shows at least that PAGE1_MESSAGE was
the value Y in PROC_2... but for some reason this value is not be kept
After the application process is running.
-There's that several other elements of the application located in PROC_2, and they are all correct.
Any ideas as to why this is happening? It seems like it should be
quite simple: set the value, send page, the value must be that
I put it.
Thank you
CarolHello
Exhibition (doesnot save session state), I am not changing who is P1_MESSAGE_1.
Why does that matter? Why does the hidden item behave differently?
Yes, Hidden Items by usually default state saves. But this isn't the problem in this case because I had changed the item to display only (state saved) and that did not help. Finally back in doesnot save state.
Try to replace alert (ajaxResponse); with the lines below
$s('P1_MESSAGE_1',ajaxResponse); alert($v('P1_MESSAGE_1'));
Maybe the session state is defined (server), but the value in the DOM HTML (browser) to P1_MESSAGE_1 is not defined. If adding the line above works then the hypothesis is correct.
And I see that you made the source "static" assignment ...
Yes, I made this change, because it was a reference in itself I think it was redundant. And I had to correct what I thought is not just before debugging. Which cannot be linked to the problem though.
Kind regards
-
Change the value of the array element without using the keyboard
I have a control array on my front, say 1 d, 10 items.
In addition, the front panel should be used with a touch screen, so I have a Subvi keyboard that should be called when I choose one of the elements of the array. Therefore, no keyboard entry is allowed.
My question is, how can I determine which element that the user hit/clicked?... .and how to change this value?
-Mike
Gents nevermind, found a way to emphasise that if this is the best way, but I got it.
In my structure of the event, I have an event looking for the mouse event down in regards to the control array. This event triggers my screen touch keyboard Subvi to fire, and the closure of the Subvi I pass its value to the ArrElem.Value property to assign the table a hit/clicked item. Works.
-Mike
-
How to assign values to the current element where the cursor is?
Hi all
I have a block of "tabular" data, B_Emp (from the Employee table) and the other non-database & non tabular block consisting of a text_items B_Test.
'Emp_id' is one of the column in the Employee table and I want to attribute all the values of the Emp_id in all text_items of the B_Test in order, when you press a particular key.
Here's what I wrote in the trigger
Declare
i the number;
number of l_last_record;
next varchar2 (40); -to hold the values of cursor system of the next item in the block of B_Test
next_r varchar2 (40); -to hold the values of cursor system of the next record in the block of B_Emp
Begin
go_block ('B_Emp');
Set_Block_Property ('B_EMPLOYEES_ALL', DEFAULT_WHERE, "Emp_id is not null");
execute_query (no_validate);
last_record;
l_last_record: =: system.cursor_record;
premier_enregistrement;
next_r: =: SYSTEM. CURSOR_ITEM;
go_block ('B_Test');
Next: =: SYSTEM. CURSOR_ITEM;
because me in 1.l_last_record
Loop
go_item (Next);
: next: =: B_Emp.Emp_id;-here is the problem
next_item;
Next: =: SYSTEM. CURSOR_ITEM;
go_item (next_r);
next_record;
next_r: =: SYSTEM. CURSOR_ITEM;
WHEN THE OUTPUT: SYSTEM. LAST_RECORD = "TRUE";
End loop;
End;
Now, this gives me the expected bad Bind Variable error as there is no block of data with the name "next".
However, I checked the value of 'next' and 'next_r' (message (' value = ' | next)) and I'm getting the expected values.
So if somewhere, I am able to put my value in the current item the cursor (because at the beginning of the loop, my cursor system is exactly to the text element where I need to insert the value) so I did not have to use this " : next: =: B_Emp.Emp_id;"
OR
If somewhere, I am able to return the items in my B_test block dynamically so I can simply use
Loop
": B_test." dynamic reference for the element ": = : B_Emp.Emp_id;
next_record;
WHEN THE OUTPUT: SYSTEM. LAST_RECORD = "TRUE";
Please help me out of this!
Guy! I found a solution for the same thing.
We can use integrated a 'copy' to set the values of the element where currently is cursor system.
The syntax will be
Copy ((new_value): System.Cursor_Item); -where new_value is the variable that contains the data to be assigned.
In addition, we can assign the values from the system cursor to any variable.
The syntax will be '
new_value: =: System.Cursor_Value;
Thanks a lot guys for your help and concern
See you soon!
-
Change the value of the static element
Hi all
I hope someone can help me with the following problem...
I want the user to confirm an action (which defines a value of an element) and then I have a conditional sequence of dynamic actions if the value of an element Y. To make things as simple as possible, suggests following situation:
I have a blank page with a single element (static text) on it named P1_YES_NO_FLAG, default value is N, the source field is empty and a region borders with 2 attached Dynamic actions:
1)
Sequence - 10
Action - set
Set the type - static assignment
Y - value
Article (s) - P1_YES_NO_FLAG
2)
Sequence - 20
Action - alert
Value of P1_YES_NO_FLAG is & P1_YES_NO_FLAG.
The problem is that even if I see in the value text box is text alert is "value of N is P1_YES_NO_FLAG" and if I use the value of an item anywhere else (in the PL/SQL code: P1_YES_NO_FLAG), it always contains the value 'n'.
Evolution of value through sql code
BEGIN
P1_YES_NO_FLAG: = 'Y ';
END;
or
with the APEX_UTIL API
BEGIN
APEX_UTIL. SET_SESSION_STATE ('P1_YES_NO_FLAG', 'Y');
END;
did not help either.
So, please, can someone explain what is happening behind the hood and what I need to do to ensure that the changed value "visible"? Thank you very much in advance.
Kind regards
Pavel
Hello
When you use the dynamic action that run PL/SQL, there is option to submit the Page elements.
Enter to that point fields value of witch name (s) you want the session state value before executing PL/SQL code.
Kind regards
Jari -
How to use the value of the page element in other pages too?
Hi all
How to pass the value of the item P26_NO from 26 to all other pages (such as 1, 2, 3... 25) using the & P26_NO. ???
I set the default for this item.but I can't able to find value in the session state itself?
Please post your suggestion here!
Thank you and best regards,
Robette.Robette wrote:
Hi Amelia,.Through application process only we can able to save the page element value in session state? is there another way?
Since my requirement is like I need to display footer text in all the pages, I have the version number included in this text, so I created a table and my intention to create an item and passing the point value for all other pages and see that point value & P26_NO. in the text. Version number is dynamic, it will change at each deployment.
Is another way simple, other than my approach?Thank you best regards &,.
Robette.You should use point demand for it and an application process to fill
IF :APP_ITEM_NAME IS NULL THEN APEX_UTIL.SET_SESSION_STATE('APP_ITEM_NAME','myvalue'); END IF;
Published by: VC on June 25, 2012 13:48
-
How to get the value of the global element using javascript or ajax!
Hello!
How can I read at global(point application created in the shared components) using ajax or javascript?
You can imagine that I need to get the value of this element by function as:
-----
Function getText() {var itemVal = $x ('MY_GLOBAL_ITEM') .value;} Return itemVal; }
-----
.. .but I can't do it because it is not made to couse of the page it is global element! so, anyone know no work around to do?
I know that I can make point page and read the value of that, but not what I really need!
If I have 100 pages and all pages need to use my function, it would take 100 Articles :) - that's why its no good average!
Please, share your ideas!
THXRafix,
You must use a little AJAX to retrieve a request element value. Three steps in this solution. Implementation of a callable JavaScript function, creating an application process on the request and call the JavaScript function with dynamic action.
1 set up a JavaScript function that can be called by:
This function calls the process of application level which has a visibility of the element of your application and then returns the value of points.
Edit your page and JavaScript code according to the code in the 'function and Variable global statement' of your page. You can also add to the model page, that you use, but you also have to encapsulate this code in the script tags.
getAppItem = function(pItemName){ var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=GET_APP_ITEM',$v('pStepId')); get.addParam('x01',pItemName); gReturn = get.get(); get = null; return gReturn; }
2. creating an application on request process:
The application of level process has visibility to your application-level element. It is to retrieve the value of points and it prints the htp buffer. Essentially, this acts as a way to return the values of AJAX calls (the javascript function we set previously);
go to the shared components > procedures > Create.
Point process: "We Demand: run this application...". »
Name: GET_APP_ITEM
Type: Anonymous PL/SQL blockdeclare -- get the item name passed into the JavaScript function. app_item_name varchar2(30) := apex_application.g_x01; begin -- print its value to the buffer htp.p(v(app_item_name)); end;
3. call the JavaScript function with dynamic action:
The function call allows to specify an application-level element name and have its returned value. The trigger event is specific to what you need, but the action must be of type to run JavaScript code. In my case immediately the value of P1_NUMBER to my value of demand points. This code doesn't have to be in a dynamic action, but it helps to stay organized. you could call it from any script tag.
$s('P1_NUMBER',getAppItem('MY_APP_ITEM'));
See you soon,.
Janet Tyson -
Assigning values to the TEXT ELEMENTS
can help in assigning values to page elements by writing code in the processREquest
in my component, there are altogether 4 pages
Page1, page2, page3, page4
My requirement is
I'm passing 2 element values on page 4 (which opens in a new window) of page 2 using the method "putSessionValueDirect()".
I'm getting values on page4 but I was unable to set these values to text element of page 4 title intial values for the elements in page 4.
to do above task what methods I need to use in processRequest (when the page opens values appear in the corresponding elements)...
example: page 4
employee: XXXXXX
EMP Id: 10000
give me some examples of code that would be useful to supplement my component.Pramod salvation,
Giving the example of code can be difficult. But I can give you some ideas that you can explore. You can read the session values and set them as view these webBeans-associated attribute values. This would ensure you store the values directly in the VO and the same would translate on screen.
Concerning
Sumit
Maybe you are looking for
-
Trial version of MapPoint 2013 still has demographic data from the 2007 Census
I just installed the evaluation version Mappoint 2013 and was surprised to find that when I made my cards of demographics by census tract, he always uses 2007 data that seems old projected data. When will it be available in MapPoint or the latest ac
-
need windows xp bootable cd I have the product key
need windows xp bootable cd I have the product key
-
laptop no longer plays DVD, g6 pavilion laptop pc
went to for dvd playback, windows came with a message saying that he does not play the DVD. has proposed to amend the resolution, it did not help. I tried restarting, computer laptop only a few months old.
-
Attack of SSLv3 Cisco (POODLE)
Y at - it a patch for this vulnerability? SSLv3 deactivation is not an option for me I have an ASA 5550, run worm 12 9.1 (5) AnyConnect victory k9 ver 3.1
-
BlackBerry Smartphones trackpad lights out
My phone is bb torch 9860, the lights around my trackpad died suddenly, I felt a lil bit confused bcause I don't do any mistake, in fact, anyone can solve my little problem here?