How to create a popup windown with javascript?

Hi, every one,
I made a jsp program. I know we can use win.open, win.close to create, to close a popup window with javascript. But I don't know how to create a popup window ,display some message on this window and there is a button on it for closing this window. Just like follows:
int mark;
if(mark==1){
     create popup window, display some message, there is a
button and click it to close this window.
} else {
     display error message.
Any one can help me?
Thanks in advance.
peter

Hi, bdtjdc,
Thank you for your help and kindness.
You know, I am a new one in javascript. So,
1, I only know how to use alert(message) on current page and I don't know how use alert(message) on the next page because I
need to pass some datas from current jsp page to next one.
2, when I use the code you gave me as follows, there is no popup window and button:
if(mark==1){
%>
<script language="JavaScript">
message=message+'enter your message here...<br>';
message=message+'<form name="form1"><input type="button" name="close" value="close window"
onClick="window.close()"></form>';
message='enter your message here...<br>';
var actwin=window.open("","","menubar=0,width=300,height=300");
actwin.document.write(message);
actwin.document.close();
actwin.focus();
</script>
<%
} else {
error message;
if I use the code like this, We have the window and message on it, but there is no button on the window.
if(mark==1){
%>
<script language="JavaScript">
message='enter your message here...<br>';
var actwin=window.open("","","menubar=0,width=300,height=300");
actwin.document.write(message);
actwin.document.close();
actwin.focus();
</script>
<%
} else {
     error message;
What's the problem? Please.
Thanks again.
Peter

Similar Messages

  • How to create a popup but with no image

    Hi,
    I have seen this book on the ibook store (done with iauthor) - Renewable Energy Sources - this is what they did -
    plain text and some of the words are painted in blue. Touching a painted word (not an image) brings up a pop up in the location.
    It is not a widget.
    It is not keynote.
    Pure popup - as if it's hyperlinked but without the underline.
    Please help
    Thank you

    Hi there.
    I have the same question.
    Have you thought of the possibility of using the glossary function?

  • How to create an unsolved cube with awm???

    hi all,
    I readed the "Oracle Olap developer's guide to the Oalp api" and I found there's 2 type of Cube: Solved and Unsolved Cubes. And this document says: "... if all the data for a cube is specified by the DBA, then the cube is considered to be Solved. If some or all of the aggregate data must be calculated by Oracle OLap, then the cube is unsolved ..."
    I tried with awm 10.2.0.3.0A to create an unsolvedCube but I can't. All cubes I created are solvedCube. To know if a cube is solved or unsolved, I wrotte an program in Java to read informations of package mtm.
    Some one can tell me how to create an unsolved cube with AWM ou other soft please!

    SH is not a relational OLAP data model which is quite different from the GLOBAL schema which is based on an Analytic Workspace.
    If you change the aggregation method you will need to re-compute the whole cube which can be a very big job! You might be able to force the unsolved status be de-selecting all the levels on the Rules tab in AWM. However, I think by default analytic workspace OLAP models always provide a fully solved cube to the outside world. This is the nature of the multi-dimensional model.
    Relationally, as keys are located in separate columns a cube can be unsolved in that the key column only contains values for a single level from the corresponding dimension tables. If more than keys for different levels within the same dimension appear within the fact key column then the cube is deemed as being solved.
    Therefore, I am not sure you are going to get the information you require from the API. To changes the aggregation method you will have to switch off all pre-compute options and also disable the session cache to prevent previously calculated data being returned when you change the aggregation method.
    Hope this helps
    Keith Laker
    Oracle EMEA Consulting
    BI Blog: http://oraclebi.blogspot.com/
    DM Blog: http://oracledmt.blogspot.com/
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    BI Samples: http://www.oracle.com/technology/products/bi/samples/

  • How to create an explain plan with rowsource statistics for a complex query that include multiple table joins ?

    1. How to create an explain plan with rowsource statistics for a complex query that include multiple table joins ?
    When multiple tables are involved , and the actual number of rows returned is more than what the explain plan tells. How can I find out what change is needed  in the stat plan  ?
    2. Does rowsource statistics gives some kind of  understanding of Extended stats ?

    You can get Row Source Statistics only *after* the SQL has been executed.  An Explain Plan midway cannot give you row source statistics.
    To get row source statistics either set STATISTICS_LEVEL='ALL'  in the session that executes theSQL OR use the Hint "gather_plan_statistics"  in the SQL being executed.
    Then use dbms_xplan.display_cursor
    Hemant K Chitale

  • How to create a Sales order with ref to Contract using Function Module

    How to create a Sales order with ref to Contract using Function Module BAPI_SALESDOCU_CREATEFROMDATA ?

    We have a unique situation where we like change the sold-to customer of the sales order
    once order has been created. These orders have been created using either by function module
    BAPI_SALESDOCUMENT_COPY or using BDC (VA01, Copy with reference).
    These two processes work abosolutely fine except someone might have change the sold-to
    customer of the ship-to customer of the original sales order. If this the case then the new
    sales order will be created with the old sold-to and with not the new sold-to.
    We tried using BAPI_SALESDOCUMENT_CHANGE and commit afterwards. We checked
    the returned parameteres of the BAPIs and they are all successful but sold-to remains the
    same old one.
    Any help would be much more appreciated.

  • How to create a pdf file with CS5

    Hello, I'm new to PhotoShop CS5 and haven't figured out yet (despite two hours of trying) how to create a pdf file with pictures and texts.  Can someone please help me with this ?  The "help" button in CS5 doesn't seem to cover this question.  Nor do the FAQs.
    Thank you very much.

    Save As... Photoshop PDF.

  • How to create  a test plan with specific transactions (or program)

    Hello,
    I'm a new user in Sol Man !
    How to create  a test plan with specific transactions (or program).
    In my Business Blueprint (SOLAR01) I've created in 'transaction tab' the name of my specific transactions and linked it.
    In my test plan (STWB_2) those specific doesn't appear to be selected !
    Thanks in advance.
    Georges HUYNEN

    Hi 
    In solar01 you have defined but you have to assign the test case in solar02 for this test case in the test cases tab.
    When you do so expand the business sceanario node in test plan generation of STWB_2 transaction and now that will appear.
    Also visit my weblog
    /people/community.user/blog/2006/12/07/organize-and-perform-testing-using-solution-manager
    please reward points.

  • How to create a web template with company logo

    how to create a web template with company logo . can any one help me with the steps. or any notes. thnaks in advance .
    2. i have 25000 articles and client want to have a selection feild to see top article ex:50,10,20, 100, 1000 etc . same for bottom articles . plz let me know how to do it . thanks for replay . i am new bw so plz .
    thanks to you all

    Hi
    1) Please read
    http://help.sap.com/saphelp_nw04/helpdata/en/4a/c8353c51aab32be10000000a114084/frameset.htm
    2) Create a condition in the Query Designer: Use a formula variable
    See http://help.sap.com/saphelp_nw04/helpdata/en/73/702e39074dc93de10000000a114084/frameset.htm
    Heike

  • How to create a transport request with query and only with its structure.

    HI guru,
                how to create a transport request with query and only with its structure.transport request should not  include any other query items like ( variables, conditions...etc)
    thanks in advance.
    venkata

    Hi,
    Goto RSA1 and then Transport Connection -> In SAP Transports select Object Types-> Query Elements -> Then select Query->Give Technical name of the query and then select for transfer. In the right side you can choose the components which you wanted to transport.
    Regards,
    anil

  • How to create a csv file with NCS attributes?

    Hi
    i installed Cisco Prime NCS and trying to perform bulk update of device credentials with csv file.
    How to create a csv file with all required attributes?
    This is part of NCS online help talking about this topic:
    Bulk Update Devices—To update the device credentials in a bulk, select Bulk Update Devices from the Select a command drop-down list. The Bulk Update Devices page appears.You can choose a CSV file.
    Note        The CSV file contains a list of devices to be updated, one device per line. Each line is a comma separated list of device attributes. The first line describes the attributes included. The IP address attribute is mandatory.
    Bellow is test csv file i created but does not work:
    10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    The error i am getting while importing this file:
    Missing mandatory field [ip_address] on header line:10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    Assistance appreciated.

    It looks like the IP address field is incorrectly set.,
    It should be as follows
    {Device IP},{Device Subnet Mask}, etc etc
    so a practical example of the aboove could be (i dont know if this is completely correct after the IP address / Subnet Mask)
    10.64.160.31,255.255.255.0,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    below is a link to the documentation
    http://www.cisco.com/en/US/docs/wireless/ncs/1.0/configuration/guide/ctrlcfg.html#wp1840245
    HTH
    Darren

  • How to create a procedure function with a return value of ref cursor?

    Can anybody provide a sample about how to create a procedure function with a return value of REF CURSOR?
    I heard if I can create a function to return a ref cursor, I can use VB to read its recordset.
    Thanks a lot.

    http://osi.oracle.com/~tkyte/ResultSets/index.html

  • How to create a popup window to load HTML page in AIR application without using any mx or spark?

    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 create an install cd with the final cut pro x app if the app comes from App.Store?

    How to create an install cd with the final cut pro x app if the app comes from App.Store?

    Just copy the Application FCPX to your CD. When you want to install drag the FCPX to the Application folder and you are done.

  • How to create item wise invoice with reference to sales order.

    Hi ,
    Please let me know how to create item wise invoice with reference to sales order.
    Ex : Sales order has 2 line items .
              When creating invoice system should create two invoices for each line items.
    I have tried with copy control but I am not able to do it.
    Please advise.
    Regards

    Hi,
    Please let us know your exact requirement. Whether you want it to be fixed like only one line item to be billed every time ot it to be based on selection you do every time.
    As per my understanding it should not be fixed and in that case it should like as follows,
    In VF01 you will select Del. document/S.O. number and click on selection list and will take you to next screen as mention below,
    and select desire line item to be billed and click on copy and will take you to billing screen.
    Regards,
    Ajit K Singh

  • How to create Web Service Proxy with help of WSDL.

    Hi ,
    How to create Web Service Proxy with help of WSDL .
    Please help me .
    Thanks in advacne for reply .

    check out this article. It has all the details
    http://www.oracle.com/technology/products/jdev/howtos/1013/wsadf/adfcomplexwstypes.html

Maybe you are looking for