Displaying a servlet string in a confirm pop-up
Hello,
Can someone please let me know if and how I can take a servlet string variable and place it into a confirm pop-up window?
Thanks,
- Grant
<%
String str = (String)request.getAttribute("string.to.display");
%><html>
<head>
function doConfirm() {
confirm("<%=str%>");
</head>
<body onLoad="doConfirm()">
This was a test. This was only a test.
</body>
</html>
I hope that helps!
Similar Messages
-
We are calling a procedure in Java servlet through oracle apps..We need a confirmation pop up in that procedure present in java servlet..Is this possible ???
for an Understanding:
Apps ==> Java Servlet ==> Oracle Procedure.
in Oracle procedure is it possible to put confirmation box?
Will appreciate your help.
Thanks in advance...Thank you!
Actually I Tried to display an alert box through Htp.p('<script>alert("hi");</script>');
but it's thoruh-up error. As i am calling Servlet from oracle Apps. I tried through this way. Now I understand this is not possible. I will go some other way to do this. -
How can I display on a string the symbol omega (ohms)
how can I display on a string the symbol omega (ohms)
Hi,
See there : http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=50650000000800000032410000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0
Hope this helps !
Julien -
How to create confirmation pop in process classes
Hello experts,
I have a requirement to create a Confirmation pop up in a Zprocess -> Z process class-> method. This method is triggering when user selects contract line item and press on change contract button than selects any one process from drop down list and press on the start process in the contract management screen.
Thanks in advance.
Thanks,
NagarajHi,
here an example where we create a confirm popup before a contactperson could be deleted:
* prepare popup and instantiate it
DATA: lv_title type STRING,
lv_text type STRING.
if CONFIRM_POPUP is not bound.
lv_title = 'Popup'(001).
lv_text = 'Ansprechpartner löschen?'(002).
call method comp_controller->window_manager->create_popup_2_confirm
EXPORTING
iv_title = lv_title
iv_text = lv_text
iv_btncombination = if_bsp_wd_window_manager=>co_btncomb_yesno
RECEIVING
rv_result = CONFIRM_POPUP.
CONFIRM_POPUP->SET_ON_CLOSE_EVENT( iv_event_name = 'CONFIRM_POPUP_CLOSED' iv_view = me ).
endif.
CONFIRM_POPUP->OPEN( ).
Kind regards
Manfred -
How to display LONG TEXT STRING in Module Pool Screen ?
Hi Experts,
I want to display long text string, on screen designed through module pool(SE51). I tried to display through input/output field , but it displays it in SINGLE LINE and i have to scroll all through to view all string.
I want to display it in rectangular format . It doesnt allow me to set HEIGHT of component.
Please provide solution.
Thanks in advance.
Regards
DeepakThis is the program where u can get the WA_THEAD from other program like report and trying to display and modifying that text. U can do instead of WA_THEAD u can generate here itself and use also
*& Module pool ZMP_LTEXT *
PROGRAM ZMP_LTEXT .
TABLES: STXL.
*& Module STATUS_9000 OUTPUT
MODULE STATUS_9000 OUTPUT.
CONSTANTS:line_length type i value 132.
DATA:g_editor type ref to cl_gui_textedit,
g_editor_container type ref to cl_gui_custom_container,
CONT1 type scrfname value 'CONT1',
g_repid like sy-repid,
g_ok_code like sy-ucomm,
g_mytable(132) type c occurs 0,
g_mycontainer(30) type c ,
v_result(256) type c,
g_head like thead,
it_line type table of tline with header line,
wa_stxl type stxl.
DATA : BEGIN OF IT_THEAD1,
ICON TYPE ICON-ID.
INCLUDE STRUCTURE STXL.
DATA : END OF IT_THEAD1.
DATA : IT_THEAD LIKE TABLE OF IT_THEAD1,
WA_THEAD LIKE LINE OF IT_THEAD.
IMPORT WA_THEAD FROM MEMORY ID 'ABCD'.
select SINGLE * from STXL into wa_stxl
where tdname = '00006000156500000002'.
SELECT SINGLE * from STXL into wa_stxl
where tdname = WA_THEAD-TDNAME
AND TDID = WA_THEAD-TDID
AND TDOBJECT = WA_THEAD-TDOBJECT
AND TDSPRAS = WA_THEAD-TDSPRAS.
IF SY-SUBRC NE 0.
MESSAGE 'NO RECORD EXIST' TYPE 'E'.
ENDIF.
MOVE-CORRESPONDING WA_STXL TO G_HEAD.
SET PF-STATUS 'STATUS'.
SET TITLEBAR '001'.
if g_editor is initial.
CREATE OBJECT G_EDITOR_CONTAINER
EXPORTING
PARENT =
CONTAINER_NAME = CONT1
STYLE =
LIFETIME = lifetime_default
REPID =
DYNNR =
NO_AUTODEF_PROGID_DYNNR =
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5
others = 6.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT G_EDITOR
EXPORTING
MAX_NUMBER_CHARS =
STYLE = 0
WORDWRAP_MODE = cl_gui_textedit=>wordwrap_at_fixed_position
for to fix number of characters in row to 132 characers
WORDWRAP_POSITION = line_length
WORDWRAP_TO_LINEBREAK_MODE = cl_gui_textedit=>true
for the word to break to next line if it dont fit in line
FILEDROP_MODE = DROPFILE_EVENT_OFF
PARENT = G_EDITOR_CONTAINER
LIFETIME =
NAME =
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
GUI_TYPE_NOT_SUPPORTED = 5
others = 6 .
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH g_mytable.
MOVE: WA_THEAD-TDNAME TO STXL-TDNAME,
WA_THEAD-TDID TO STXL-TDID,
WA_THEAD-TDOBJECT TO STXL-TDOBJECT,
WA_THEAD-TDSPRAS TO STXL-TDSPRAS.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = wa_stxl-tdid
LANGUAGE = wa_stxl-tdspras
NAME = wa_stxl-tdname
OBJECT = wa_stxl-tdobject
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
LINES = it_line
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT IT_LINE INTO V_RESULT.
APPEND V_RESULT TO G_MYTABLE.
ENDLOOP.
CALL METHOD G_EDITOR->SET_TEXT_AS_R3TABLE
EXPORTING
TABLE = G_MYTABLE
EXCEPTIONS
ERROR_DP = 1
ERROR_DP_CREATE = 2
others = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endif.
ENDMODULE. " STATUS_9000 OUTPUT
*& Module USER_COMMAND_9000 INPUT
MODULE USER_COMMAND_9000 INPUT.
CASE SY-UCOMM.
REFRESH G_MYTABLE[].
REFRESH IT_LINE[].
CLEAR V_RESULT.
WHEN 'SAVE'.
CALL METHOD G_EDITOR->GET_TEXT_AS_R3TABLE
EXPORTING
ONLY_WHEN_MODIFIED = FALSE
IMPORTING
TABLE = G_MYTABLE
IS_MODIFIED =
EXCEPTIONS
ERROR_DP = 1
ERROR_CNTL_CALL_METHOD = 2
ERROR_DP_CREATE = 3
POTENTIAL_DATA_LOSS = 4
others = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT G_MYTABLE INTO V_RESULT.
APPEND V_RESULT TO IT_LINE.
ENDLOOP.
CLEAR V_RESULT.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = G_HEAD
INSERT = ' '
SAVEMODE_DIRECT = 'X'
OWNER_SPECIFIED = ' '
LOCAL_CAT = ' '
IMPORTING
FUNCTION =
NEWHEADER =
TABLES
LINES = IT_LINE
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH G_MYTABLE[].
REFRESH IT_LINE[].
CLEAR V_RESULT.
WHEN 'BACK' OR 'CANCEL' OR 'EXIT'.
LEAVE TO SCREEN '0'.
*CALL SCREEN '0'.
WHEN OTHERS.
ENDCASE.
*G_OK_CODE = SY-UCOMM.
*CLEAR SY-UCOMM.
ENDMODULE. " USER_COMMAND_9000 INPUT -
JTable -showing column headers and displaying multi-line strings
Hi,
This is two questions really.
#1 - Does anyone know why my column headers aren't showing in my jtable using the model below?
#2 - Does anyone know how I can display, mulitple line strings in a jtable? Currently my newline character ('\n') is just being displayed as a character.
any help very much appreciated,
Tom
private class TaskHistoryTableModel extends AbstractTableModel {
private List taskHistory = new ArrayList();
public Object getValueAt(int row, int col) {
if (col == 0) {
return ((TaskHistoryItem) taskHistory.get(row)).getText();
} else {
return ((TaskHistoryItem) taskHistory.get(row)).getDate().getTime();
public int getRowCount() {
return taskHistory == null ? 0 : taskHistory.size();
public int getColumnCount() {
return 2;
/** Getter for property taskHistory.
* @return Value of property taskHistory.
public List getTaskHistory() {
return taskHistory;
/** Setter for property taskHistory.
* @param taskHistory New value of property taskHistory.
public void setTaskHistory(List taskHistory) {
this.taskHistory = taskHistory;
public String getColumnName (int col) {
return col == 0 ? "Text" : "Entered At";
public boolean isCellEditable(int row, int col) {
return false;
}fixed my own problem - make your mulit-line string into html format e.g.
this string will appear on two lines in a jtable
"<html><p>A much more interesting entry</p> <p>on multiple lines</p></html>" -
Display results as String: dosen't work based on the example
Hello,
To understand how to display results as string, I tried to reproduce this:
[http://apex.oracle.com/pls/otn/f?p=31517:84|http://apex.oracle.com/pls/otn/f?p=31517:84]
I have my table emp
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7839 KING PRESIDENT - 81-11-17 5000 - 10
7698 BLAKE MANAGER 7839 81-05-01 2850 - 30
7782 CLARK MANAGER 7839 81-06-09 2450 - 10
7566 JONES MANAGER 7839 81-04-02 2975 - 20
7788 SCOTT ANALYST 7566 82-12-09 3000 - 20
7902 FORD ANALYST 7566 81-12-03 3000 - 20
7369 SMITH CLERK 7902 80-12-17 800 - 20
7499 ALLEN SALESMAN 7698 81-02-20 1600 300 30
7521 WARD SALESMAN 7698 81-02-22 1250 500 30
7654 MARTIN SALESMAN 7698 81-09-28 1250 1400 30
7844 TURNER SALESMAN 7698 81-09-08 1500 0 30
7876 ADAMS CLERK 7788 83-01-12 1100 - 20
7900 JAMES CLERK 7698 81-12-03 950 - 30
7934 MILLER CLERK 7782 82-01-23 1300 - 10 I created with the wizard, on my page, a new REPORT REGION
- selected SQL RESULT -
- Name: Test
- Region Source Type: SQL Query
- Region Template: Report Region
IN Enter SQL Query or PL/SQL function returning a SQL Query, I COPY-PASTE the following code from [http://apex.oracle.com/pls/otn/f?p=31517:84|http://apex.oracle.com/pls/otn/f?p=31517:84]
DECLARE
p_vc_arr2 htmldb_application_global.vc_arr2;
p_string VARCHAR2 (2000);
BEGIN
SELECT ename
BULK COLLECT INTO p_vc_arr2
FROM emp
WHERE deptno = :p84_select_deptno;
p_string :=
HTMLDB_UTIL.table_to_string (p_vc_arr2, ':');
HTP.p (p_string);
END;AND I have this error:
+1 error has occurred+
Invalid query, no select statement found
Is not a PL/SQP functiion??
What do I do wrong?
thanks,
Roseline Paquin
Montreal, Canada1 error has occurred
Invalid query, no select statement foundWhat if you try
DECLARE
p_vc_arr2 htmldb_application_global.vc_arr2;
p_string VARCHAR2 (2000);
BEGIN
SELECT ename
BULK COLLECT INTO p_vc_arr2
FROM emp
WHERE deptno = :p84_select_deptno;
return 'select ''' || HTMLDB_UTIL.table_to_string (p_vc_arr2, ':') || ''' str from dual';
END;?? -
GP - How to display a long string value
I'm trying to display a really long string value and then allow the user a couple of result state choices (to either go back and do another search or finish).
None of the forms (WD, display, etc.) will display a really long string.
I tried using a loop type decision dialog, but there doesn't appear to be a way of having it pick up a parameter value as the message (or part of the message) to display.
I can get it to display in the complex type decision dialog, but I don't need the group/options and I can't seem to get rid of the second set of buttons that show up (the long string parameter value was put into the 'Info Texts' area and does display ok).
Is there any easy way of displaying the complete contents of a long string value and have buttons for results states? I'd even be happy if I could just display the whole string and use a separate callable object for the choices.
Thanks,
CindyI think you should try calling a JAVA or ABAP Webdynpro as the callable object. As you know, we can display long texts in the webdynpro fields. Other alternative is an Adobe form as well.
Cheers,
Mandrake -
Confirmation pop-ups - only via javascript?
I want to have a confirmation box pop-up when I have changed a field in a form and pressed the submit button.
Looking through this forum, all I've found is confirming deletions with javascript via a URL target:
javascript:confirmDelete('Are you sure you want to change the password?');
This gives me a deletion error:
ORA-20001: Invalid action DELETE on this object. (U)
Error Unable to process row of table USERS.
OK
presumably because I'm not deleting anything - I just want to confirm my change.
Do we always need to use javascript for confirmation pop-ups?
If not, how else can we achieve this?
How do we make the pop-up dependent upon at least one field value being changed?
How do I get the pop-up to ask for a Yes/No response instead of Cancel/Yes options?
Any help on this would be greatly appreciated."Looking through this forum, all I've found is confirming deletions with javascript via a URL target:
javascript:confirmDelete('Are you sure you want to change the password?');
This gives me a deletion error... presumably because I'm not deleting anything - I just want to confirm my change."
The definition of the javascript function is: function confirmDelete(msg,req). It takes an optional second parameter called req. This specifies the REQUEST value that should be set when the user clicks OK on the confirm pop-up. If you omit this second parameter in your call to the javascript function a request value of 'Delete' is set. This is why you are receiving your error. You should set the second parameter to be some custom REQUEST value.
"Do we always need to use javascript for confirmation pop-ups?"
For popups of this sort the answer, in short, is "yes". There are no other client-side languages that work cross-browser like javascript. You could avoid javascript (and popups) altogether if you wanted by just having an intermediary Apex page with buttons representing whatever actions you want the user to be able to perform, e.g. "Yes", "No" and "Cancel".
"How do I get the pop-up to ask for a Yes/No response instead of Cancel/Yes options?"
See this thread for a discussion on this topic: Re: Javascript Yes & No buttons
Andy -
How to display a HTML String in a ActiveX WebBrowser ?
How to direct display a HTML String in a ActiveX WebBrowser without use a URL ?
I am sure that it would depend on the browser, but with Internet Explorer from Microsoft, I don't think you can. (I may be wrong on this.) What you could do would be to save your string to file and read the file as a url in the browser. I know that this is a step you are trying to avoid, but it will work.
Hope that this helps,
Bob Young
Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
DISTek Integration, Inc. - NI Alliance Member
mailto:[email protected] -
Hi,
I have a Confirm javascript in my html.
In the form I have a salary text whene enetred and hit tab the confirm pop comes with £0.00 values rather the salary entered values.
This works find in IEA good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.<br />
The helpers at that forum are more knowledgeable about web development issues.<br />
You need to register at the mozillaZine forum site in order to post at that forum.<br />
<br />
See http://forums.mozillazine.org/viewforum.php?f=25
You need to post a link to the website or post relevant parts of the code. -
I am calling a JavaScript function from a dropdownlistbox onClientSelect attribute. The javascript function dispalys a confirmation pop up with OK and CANCEL buttons. When the user hits OK, the JS function issues htmlbevent.cancelSubmit = false and I continue with serverside processing. However, when the user hits CANCEL, I still need to continue with serverside processing and change the dropdownlist box value back to previous value. Is there a way that I can capture users response from the confirmation pop up in javascript and return it for serverside processing. Thanks.
on both user action OK or CANCLE you want server action but you want to differentiate whether the user clicked ok or cancle (to carry out different server action)
to achive this have a hidden form field. and set the value to OK or cancel based on waht user selected in confirm dialog .
the js code would look somethig like below.
var Check = false; Check = confirm('k1?');if(Check == false){ document.myform.hiddenformfield.value="false";htmlbevent.cancelSubmit = true; }
now you can read the hidden form field in oninputprocessing and based on the value you can do further processing.
Regards
Raja -
Confirmation Pop up while creating External shopping cart
Hi guys,
Please help me...
Am working on the requirement where i need to bring the confirmation pop up window when external shopping cart is upload and before the shopping is being created.
Thanks,
VigneshHi jason,
The requirement describes,
When we upload file to Create external shopping cart,SRM creates the Shopping cart without asking for any confirmation from the user and my requirement is to create the confirmation screen before the shopping cart is created .
Thanks,
Vignesh. -
when I go to another page, a confirm pop up appears and asks if I want to change locations yes or cancel. Every time...it gets annoying and would like to delete it or disable it.
I am having the same problem and when I am on Face book, it gets really annoying because you switch pages so many times, especially when playing games.
-
How to display discount price amt in order confirmation page
hi,
I created a discount for site,who places any order will get a discount for that particular order ,How to display discount price amt in order confirmation page.suggest some points guys.Try displaying it as following , just put the jsp code for the if() statement i have put below.
This block loops through order level adjustments and displays the discounts for the one's associated with order promotions.
<dsp:droplet name="ForEach">
<dsp:param name="array" bean="ShoppingCart.current.priceInfo.adjustments" />
<dsp:param name="elementName" value="pricingAdjustment" />
<dsp:oparam name="output">
//displaying if discount was provided, associated with some order level promotion
if (pricingAdjustment.getPricingModel() != null && pricingAdjustment.getAdjustment() < 0) {
<dsp:valueof param="pricingAdjustment.totalAdjustment" />
</dsp:oparam>
</dsp:droplet>
Maybe you are looking for
-
How to open and navigate between human task forms in a same page?
Hi I use Oracle BPM 11.1.1.5 I have a question about taskflows in BPM Application. In ADF web application, I create a sipmle task flow and insert view id and bind these to jspx pages, my pages are opend in same page when return an outcome. For exapml
-
HT1349 why is the serial number not found on the records?
my ipod nano's serial number is not found on the records, why?
-
My billing address is correct, but the i keep getting that my security code is incorrect and can't download apps. I have re-entered all of my information in my account, but still get error message. How to over-ride?
-
Updating Adobe XI Pro causes Error 16
Every time I try and upgrade my XI pro beyond 11.0 I get the error 16 and I have to reload. I'm running Win7 64 Ultimate. I have tried some of the permission fixes but nothing worked. I turn the updates off and I still get nag notices. Any help would
-
Unable to sign into iCloud on AppleTV after update
After the last OS update on my AppleTV, I am unable to sign into my iCloud in order to setup my photostream as the screensaver. I go to iCloud sign in, put in my password, at which point it takes me to the Terms and Conditions page, I click on Agree