How to display a popup window (DialogMessage) via code behind c#?
hi all,
How to display a popup window (DialogMessage) via code behind c#?
I use sp 2013, in else case I want show the DialogMessage:
if(condition)
else
HttpContext.Current.Response.Redirect(SPContext.Current.Web.Url+"/_layouts/TestError/ErrorDueDate.aspx");
the above Redirect work good but I want show the error in a DialogMessage its better because of Usability and not redirect the user to new page...
if not via code behind is there a better way to do it?
thanks in advance
Ahmad
SP 2013 & SPD 2013 & VS 2013 & MSSQL 2012
thanks for you answer,
And yes I includ them via CDN, like below:
<script
type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script
src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/jquery-ui.js"
type="text/javascript"></script>
<link
href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/themes/start/jquery-ui.css"
rel="stylesheet" type="text/css"
/>
But I get still the above error in my previes post.
SP 2013 & SPD 2013 & VS 2013 & MSSQL 2012
Similar Messages
-
How to display a popup window with tables values to input
hi experts,
I need to display a popup displaying values of table in UI.
Is there any function module to dispaly a popup.Hi Ashwini,
There is no function module to call the pop up in CRM UI.
You need to follow following steps:
1. Create an event handler for your click event on which you want to call this pop up.
2. Create a Z component with a table view and in the table view, define the context nodes and attributes you want to use in the pop up view.
3. In the .htm coding of this view, define the layout and buttons you want on this pop up view.
4. Go to Runtime Repositry, create a ViewSet, ViewArea and in this View Area add the table view you created just now.
5. Create a MainWindow in the Runtime repositry and add the same table view you created.
6. Now come back to the main Component and add Component Usage (e.g CUXYZ) .......
7. While Creating the Component Usage, mention Component Name as your Z Component name and in the Interface View, choose MainWindow from the F4 help.
8. Go to event handler method of your main Component/View and create separate methods for creating your pop up and handling the close event of the pop up as well.
For seeing the coding, you cna refer to any standard pop up handling and do the coding in similar format.
I hope this will helps you.
Thanks
Vishal -
How can I allow popup window within secured site?
How can I allow popup window wlthin NWA People.com(secured site)?
Ineed to see Access.You can allow pop-ups in Safari via Settings > Safari > Block Pop-Ups set 'off'
-
How to create a popup window to load HTML page in AIR application without using any mx or spark components?
I need to load the HTML page in popup in AIR application without using any of the <mx> or <spark> components. I need to open in the application itself not in the browser.(If we use navigateToURL() it will open in th browser)Can we achieve this? can somebody help me on this scenario..
-
How to close a popup window for system events?
Hi,
I have a screen 110 which shows several input field in popup mode.
The Cancel button can close the screen.
But my question is how to close the popup window for the following system events?
1, Customer clicks the cross button in top-right corner
2, Customer clicks the system icon in top-left corner and then select either: "Close" or "Stop Session"
The PAI subroutine of the screen has not been triggered for the above system events.
Thanks for the coming help.
Best Regards,
DavidHi Siddharth,
I did check with another very experienced ABAP developer.
The solution was the same as what Arunima Rudra provided.
And I got a sample program which did work properly.
The headache is that the system events in my program still cannot be triggered even after I have all the same changes.
Anyway, I suggest you to try the solution as provided by Arunima Rudra.
It should work for 2 system events:
1, Customer clicks the cross button in top-right corner
2, Customer clicks the system icon in top-left corner and then select either: "Close"
For "Stop Session", it should not be handled by popup.
You can observe the same behavior in ALV sorting configuration popup.
Good luck!
Regards,
David -
How to create a popup window that shows detail information when press submi
hi,all
how to create a popup window that shows detail information when press the submit button ?I mean,when I press the button "Sumit"there will appear a popup window that shows the detail information you typed before.it means are u sure to submit,it is like some confirmation window.
how to do achieve this ?help plz .
best regards
hlee
Edited by: hlee on 2011-4-15 上午1:26hey,vee
thanks for your response,but i had already read this thread before i put up a new question.any way,thanks.
best regards
hlee -
How to display an Image which is on Panel behind JScrollPane - Please Help
Hiii All,
How to display an Image which is on Panel behind JScrollPane. I have set the setOpaque() method of JScrollPane to false still when i run the program the JScrollPane is set as Opaque.. Can some one please help me in this...
Thanks,
Piushyou need to set both
scrollPane.setOpaque(false);
scrollPane.getViewport().setOpaque(false); -
How to display the data of CJ2C(T-CODE) using web dynpro abap
Hi all:
How to display the data of CJ2C(T-CODE) using web dynpro abap.
CJ2C used to display a Gantt Chart.
Thanks.Hi,
Create a Value attribute (resource) of type Resource, bind it with the property of File Upload UI element.
On action place the code and Deploy the application
byte[] bytes = new byte[ 1024];
FileOutputStream out = new FileOutputStream( new File( <path in server>));
InputStream in = resource.read( true);
int len;
while( ( len = in.read( bytes)) > 0)
out.write( bytes, 0, len);
in.close();
out.close();
Regards
Vinod V -
I have two monitors. I have an application that I run all day, displayed on my secondary monitor. Whenever a popup windows is launched form that application, it always opens on the primary monitor. Very annoying. Any way to get the popup to launch in on the same monitor as the parent application?
Did you solve this problem ?
-
How to show a popup window to display an error message
Hi,
I want a popup window to popup when an error occurs on pressing an "OK" button in my GUI. What should I use for that? Is it a JWindow?A JOptionPane is probably easiest:
http://java.sun.com/docs/books/tutorial/uiswing/components/dialog.html -
Hi
I have seen in Simon Collins application http://apex.oracle.com/pls/apex/f?p=20411:1:888811517916461 a popup windows.
Can anyone help me, buil a popup windows like that or is there any tutorial where i can see how its done.
TanksHi,
You should have three processes: addPerson, getPerson and updatePerson. All three are "On Demand" processes. This is the PL/SQL code for each:
addPerson
BEGIN
INSERT INTO EMP (ENAME, JOB, MGR, HIREDATE, SAL, COMM)
VALUES (:P1_ENAME, :P1_JOB, :P1_MGR, TO_DATE(:P1_HIREDATE, 'DD/MM/YYYY'), :P1_SAL, :P1_COMM);
END;getPerson
DECLARE
vRESULT VARCHAR2(1000);
BEGIN
SELECT ENAME || ',' || JOB || ',' || MGR || ',' || TO_CHAR(HIREDATE, 'DD/MM/YYYY') || ',' || SAL || ',' || COMM
INTO vRESULT
FROM EMP
WHERE EMPNO = :P1_EMPNO;
HTP.P(vRESULT);
END;updatePerson
BEGIN
UPDATE EMP
SET ENAME = :P1_ENAME,
JOB = :P1_JOB,
MGR = :P1_MGR,
HIREDATE = TO_DATE(:P1_HIREDATE, 'DD/MM/YYYY'),
SAL = :P1_SAL,
COMM = :P1_COMM
WHERE EMPNO = :P1_EMPNO;
END;On the page, in the page's HTML Header setting, I have:
<script type="text/javascript">
$(function() {
$('#ModalForm').dialog(
modal : true,
autoOpen : false,
buttons : {
Cancel : function() {
closeForm();
Add : function() {
$('#ModalForm input[type="text"]').removeClass('ui-state-error');
var valid = true;
$('#ModalForm input[type="text"]').each(function() {
if($(this).val().length == 0)
$(this).addClass('ui-state-error');
message = 'Error: ' + $(this).attr('id').substr(3).replace('_', ' ') + ' is blank';
$('.msg').text(message);
valid = false;
return false;
if(valid)
addPerson();
function openForm(pID)
$('#ModalForm').dialog('open');
$('#ModalForm input[type="text"]').removeClass('ui-state-error');
var btns = {};
btns['Cancel'] = function() { closeForm() };
$s('P1_ENAME','');
$s('P1_JOB','');
$s('P1_MGR','');
$s('P1_HIREDATE','');
$s('P1_SAL','');
$s('P1_COMM','');
if(pID)
initilizeForm(pID);
$('#ModalForm').dialog({ title : 'Update'});
btns['Save Changes'] = function(){updatePerson(pID);};
else
$('#ModalForm').dialog({ title : 'Add'});
btns['Add'] = function(){addPerson();};
$('#ModalForm').dialog('option', 'buttons', btns);
function closeForm()
$('#ModalForm input[type="text"]').val('');
$('#ModalForm input[type="text"]').removeClass('ui-state-error');
$('#ModalForm').dialog('close');
function initilizeForm(pID)
var ajaxRequest = new htmldb_Get(null, &APP_ID., 'APPLICATION_PROCESS=getPerson', 0);
ajaxRequest.add('P1_EMPNO', pID);
var ajaxResult = ajaxRequest.get().split(',');
$s('P1_ENAME', ajaxResult[0]);
$s('P1_JOB', ajaxResult[1]);
$s('P1_MGR', ajaxResult[2]);
$s('P1_HIREDATE', ajaxResult[3]);
$s('P1_SAL', ajaxResult[4]);
$s('P1_COMM', ajaxResult[5]);
function addPerson(pID)
if (pID)
updatePerson(pID);
else
var ajaxRequest = new htmldb_Get(null, &APP_ID., 'APPLICATION_PROCESS=addPerson', 0);
ajaxRequest.add('P1_ENAME', $v('P1_ENAME'));
ajaxRequest.add('P1_JOB', $v('P1_JOB'));
ajaxRequest.add('P1_MGR', $v('P1_MGR'));
ajaxRequest.add('P1_HIREDATE', $v('P1_HIREDATE'));
ajaxRequest.add('P1_SAL', $v('P1_SAL'));
ajaxRequest.add('P1_COMM', $v('P1_COMM'));
ajaxRequest.get();
ajaxRequest = null;
closeForm();
gReport.search('SEARCH');
function updatePerson(pID)
if(!valid())
return;
var ajaxRequest = new htmldb_Get(null, &APP_ID., 'APPLICATION_PROCESS=updatePerson', 0);
ajaxRequest.add('P1_EMPNO', $v('P1_EMPNO'));
ajaxRequest.add('P1_ENAME', $v('P1_ENAME'));
ajaxRequest.add('P1_JOB', $v('P1_JOB'));
ajaxRequest.add('P1_MGR', $v('P1_MGR'));
ajaxRequest.add('P1_HIREDATE', $v('P1_HIREDATE'));
ajaxRequest.add('P1_SAL', $v('P1_SAL'));
ajaxRequest.add('P1_COMM', $v('P1_COMM'));
ajaxRequest.get();
ajaxRequest = null;
closeForm();
gReport.search('SEARCH');
function valid()
$('#ModalForm input[type="text"]').removeClass('ui-state-error');
var valid = true;
$('#ModalForm input[type="text"]').each( function() {
if( $(this).val().length == 0)
$(this).addClass('ui-state-error');
message = 'Error: ' + $(this).attr('id').substr(3).replace('_', ' ') + ' is blank';
$('.msg').text( message );
valid = false;
return false;
return valid;
</script>And I have an HTML region on the page with the following settings:
Region Header:
<div id="ModalForm" style="display:none; width:500px;">Region Footer:
</div>This region contains all of the page items - P1_EMPNO (hidden), P1_ENAME (text), P1_JOB (text), P1_MGR (select list), P1_HIREDATE (datepicker), P1_SAL (text) and P1_COMM (text)
Apart from a bit of styling here and there, that's it
Andy -
How to generate a popup window?
i want to click on a link...in response of this a popup window opens and show the details...help me regarding this...
can u please explain me in bit detail.I can try...
About Popup
A Popup is displaying a Component somewhere on (or outside) the screen. When you create a new Popup object you specify the coordinates of the Popup relative to another Component (this other Component could be null)
How to use it
You should create your own subclass of javax.swing.Popup to use a Popup, because the constructors are Protected. I have an example for you. Also have a look at the API or some of the links other people have listed.
Example
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.awt.event.*;
public class PopupEx extends JFrame{
private javax.swing.Popup pop;
private JLabel lab = new JLabel("text");
public static void main(String args[]){
PopupEx f = new PopupEx();
public PopupEx(){
//setting the JLabel and placing it in the JFrame
lab.setBackground(Color.red);
lab.setOpaque(true);
lab.setFont(new Font("Curier",Font.PLAIN,200));
add(lab);
pack(); //setting the size of the JFrame
//popup
pop = new Poppy(this, new JPanel(), 10, this.getWidth()/2) ;
pop.show(); //makes the Poppy show at the position (10, this.getWidth()/2) - relative to this
setDefaultCloseOperation(EXIT_ON_CLOSE);
setVisible(true);
public class Poppy extends Popup implements ActionListener{
private JPanel pan;
private JLabel mess = new JLabel("I love Java!");
private JButton b = new JButton("ok");
//Constructor
//Overrides the Popup(Component owner,Component contents,int x,int y)
public Poppy(Component owner, JPanel contents, int x, int y){
super(owner,contents,x,y);
pan = contents;
pan.setBackground(Color.yellow);
mess.setFont(new Font("Curier",Font.PLAIN,20));
pan.add(mess);
pan.add(b);
b.addActionListener(this);
public void actionPerformed(ActionEvent e){
this.hide();
}//end of Poppy
}If you have questions, just ask! -
Custom pushbutton in ME21N should display a popup window with item details
Hello,,
The requirement is to
1. Add a custom pushbutton in ME21N screen at header level.
2. The user will select some PO line items and will click on this push button.
This inturn should trigger a popup window with item details only for those selected PO line items along with schedule line qty.
I have created the custom push button in a custom tab using the BADI ME_GUI_PO_CUST.
Now I am not able to retrieve item details and schedule line details inside the PAI of the custom tab..
i.e., when i click on the custom push button, I am not able to retrive the item data and schedule line data.
Please help me to retrive PO line item data and schedule line data.
Regards,
SharahJSF is not so relevant in this question. It's all about how the generated client side code look like. Which is usually a bunch of HTML/CSS/JS (open page in browser, rightclick and view source). If you know HTML, you should know that using target="_blank" in a <form> or <a> element would open a new window. If you know JS, you should know that using window.open() would open a new window.
Apply this so in the JSF source code so that the generated HTML/JS output is exactly what you want. -
How to get current PopUp Window
Dear All,
I am using NetWeaver 7.1 sp1 and facing a problem. Actually I want to show a view in popup window. The popup window works fine but i want to get currently popup window. How can i get it in View and controller ??
I found a solution : wdContext.currentPopupElement().getWindowInstacnce();
but in wdContext there is no method like .currentPopupElement(). plz help.Hi
wdContext.currentPopupElement().getWindowInstacnce();
Here PopupElement is a attribute of IWDWindow type where u have to put the window instances (say For close or life control of that popup)
For further plz go through these doc
1. [Dialog|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/903fed0d-7be4-2a10-cd96-9136707374e1&overridelayout=true]
2. [Popup Window|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/a04870c5-749b-2b10-06ba-d25515ef39e3&overridelayout=true]
Best Regards
Satish Kumar -
Missing Shortcut under Conditionnal Item Display in popup window
Just under each Condition Type in APEX, we have nice Shortcut Like [PL/SQL] [item=value] [item not null]...
Do you know why you dont put these shortcuts in the popup windows in Conditional Item Display region when you active the Edit Links on the yellow bar ?
I'm think is missing.
Sylvain Michaud
Homepage : http://www.insum.ca
InSum Solutions' blog : http://insum-apex.blogspot.comSylvain,
Thanks for pointing this out. We'll fix it. Note that if you edit a "button item" you see these quick links.
Scott
Maybe you are looking for
-
Macbook Pro CPU Core's temperature measurments
I have a late 2011 15-inch Macbook Pro OS X 10.8.4 with BootCamp installed. In OS X environment, the CPU core temperatures are around 40 - 44C, while in idle or with a minimum Safari browsing the net. When in Bootcamp with Windows 7 Professional, in
-
Do I need a base station to use AirTunes?
Hi. I'm new to the wireless world, so forgive me. I have an AirPort Extreme Card pre-installed on my computer, but no base station. I connect to my DSL internet via ethernet cable. Not through a wireless connection. I purchased the AirPort Express un
-
Help required: Hide buttons in popup
Dear All, My requirement is to hide the choose and cancel buttons on the popup that appears on using the FM POPUP_WITH_TABLE_DISPLAY. Any clues? Thanks.
-
Windows XP onto iMac 11,1 (i3)
Hey all, Just starting Boot Camp up I notice I'm told to use a Windows 7 DVD - I want to run XP (I have a license spare, I don't for 7) does this matter?
-
I have firefox for AOL. How do I remove the password from the AOL sign on screen?
I have Firefox for AOL. When I sign on to AOL email my password is saved. How do I remove a saved password? Thanks!