Creating a pop up window on button click?

Hi
How would I create a pop up modal window when a user clicks on a print button within an interactive report. This window would then display a message with a confirm or cancel button. If they click on confirm the page prints out and if they click cancel it takes the user back to the report
Is this possible? if so how is this achieved?
Many Thanks

The confirm dialog is a native dialog in the browser. It will display a message and it has an ok and cancel button. Running it in javascript will prompt the user with the dialog, and the return value will be true or false depending on the button clicked.
You don't need any extra page whatsoever.
var r=confirm("Press a button");
if (r==true)
x="You pressed OK!";
else
x="You pressed Cancel!";
}This would prompt you with a small dialog, asking "Press a button.". Clicking Ok or Cancel will return true or false to variable r, which in this code is then tested.
You could shorten it up to
if(confirm("Do you want to print?")){
   //execute print code
};Alternatively, if you are on version 4.0 or higher you can use a dynamic action for this. Set the action to fire on the click of a button, and as a true action you can choose the confirm action, which then lets you display a text.

Similar Messages

  • I would like to create a pop-up window appear from Labview Interface. In this window, I will have a slide control and an image taken from a camera. The main VI have to run while pop-up window is open. How can I do ?

    When I pushed a button, this pop-up window has to appear. There will be a slide control and a picture from a camera in this window. Is it possible to make appear this windows while main VI Interface continue to run ? How can I do this ? Thank you for your answers.
    Cyril.

    Here you go. This is simple example. Maybe not the best way, I am just
    beginner in LV and still not comfortable with data flow that much. I prefer
    events, so I would change this to use Event Structures.
    When you click on OK button on SliderMain, it opens Slider.vi. Now both
    windows are open and you can interact with both. Now if you click on OK
    again with Slider.vi open, you run into problems. Only thing I did was
    change VI properties of slider.vi, mainly window appearance.
    vishi
    "Cy" wrote in message
    news:[email protected]..
    > I would like to create a pop-up window appear from Labview Interface.
    > In this window, I will have a slide control and an image taken from a
    > camera. The main VI hav
    e to run while pop-up window is open. How can I
    > do ?
    >
    > When I pushed a button, this pop-up window has to appear. There will
    > be a slide control and a picture from a camera in this window. Is it
    > possible to make appear this windows while main VI Interface continue
    > to run ? How can I do this ? Thank you for your answers.
    > Cyril.
    [Attachment SliderMain.vi, see below]
    [Attachment Slider.vi, see below]
    Attachments:
    SliderMain.vi ‏16 KB
    Slider.vi ‏11 KB

  • BSP code to open new page in new window after button click

    Hi expert,
    I have a requirement to write a BSP code to open new page in new window after button click. I have done the same for opening in same window but not for opening in new window.
    Can you please help me out with the code in which the page opens in new window and the menubar & Addressbar is displayed in hide mode.

    Hi,
    To add more with Anubhav...
                              onClientClick = "javascript:window.open( 'pop.htm' ) "
    You can create a pop.htm page, and call the same in another page using the above code.
    Refer standard BSP examples, SBSPEXT_HTMLB, SBSPEXT_PHTMLB, SBSPEXT_XHTMLB. You can run the default.htm pages and see what way you want to design your BSP.
    Thanks,
    Sreekanth

  • Creating a "Pop Up" Window/Box in Sharepoint 2010

    Hi, 
    I have a CEWP with several image buttons in it. When a user clicks on the images, a "pop up" window should appear which will have several different links for the user to choose from. So when the user selects the the link he/she wants to go to,
    the user will then be directed towards that page/list/form. 
    How can i create a "pop up" window/box for the 1st requirement? 
    Any assistance would be appreciated.
    Thanks, Aarti

    Hi ,
    Pls check if it can helps you
    http://social.technet.microsoft.com/Forums/office/en-US/a2fec044-669f-45a2-b979-7ec324831a8b/how-to-create-a-popup-message-box-in-sharepoint-2013-?forum=sharepointdevelopment
    http://social.technet.microsoft.com/Forums/office/en-US/9b5a0fa5-0c09-4753-b276-8e8e42c21542/create-pop-up-window-from-a-listview-in-sharepoint-2013?forum=sharepointdevelopment
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • How to create a pop up window with text information?

    Hi experts,
    I am a newbie in LC and I have created a form to be sent to the vendors by our buyers.  Everything seems fine except the Accounting Manager would like to include our Financial Details in the form.  I would like to simply create a pop up window with the information which will be activated by pressing a button.  I have tried to create an invisible button and a visible button to achieve this but didn't succeed. 
    p.s. I have no javascript background but slowly learning.  I would appreciate if anyone can assist me to complete the task.
    Thanks a million.

    Hi Mdjco,
    Thanks for replying.  What I need to accomplish is to have another page of information with all the financial details on the pop up window and the vendor has a choice to print it out or not.  After the form is filled out, it is to be sent back to our buyers.  So instead of me inserting a 2nd page with the information, I would like to hide it unless someone presses a button to show it.
    I have found something like making 2 buttons, one is invisible with all the information on it and the other one "visible" to activate the invisble button.  Didn't work at all.
    Also another question is after the vendor insert the digital signature, it automatically asked to save (which I found out why from help) and then it opens up the email and sends the form as XML.  I will need it to send as PDF, possible??
    Much appreciated.

  • Creating a pop up window.

    Hi Friends,
    If Sy-subrc <> o,
    some error message.
    But the error message should be as a pop Up window.
    So to create the pop window whats the procedure.
    Thanks,
    Shejal.

    Hello,
    I also try to create a pop-up window en use the following coding:
    if vbak-kunnr = '0000000484'.
      Call function 'POPUP_TO_INFORM'
      EXPORTING
      titel = 'pop-up'
      txt2 = 'pas op'
      txt1 = 'pas nog een keer op'.
      exit.
    endif.
    This pop-up only has to appear for customer 484 and this also happens. However the pop-up stays on the screen and I cannot continue with the order. What part in my coding is wrong or wat is missing?
    Thanks in advance,
    Ivo

  • How to create a pop up window while creation of the delivery note.

    Hello Experts
    How to create a pop up window while creation of the delivery note.
    As soon as we go in to delivery note creation screen in VL01N, immediately a pop up screen should be displayed on the screen containing the following details,
    For e.g.
    Str. Loc     Qty      UOM
    DE01        100        KG
    DE99          50        KG

    Dear all,
    i m having two document numbers for invoic of same types such as output type print program and smartform.
    biut the issue is im getting print preview for one invoic and for another invoic i m not getting any print preview.
    Directly the cursor comes to initial stage of vf03.
    suggest what to do
    Thanks and regarnds
    ravi

  • Open or Save to harddiskoption pop up window needed when clicked on pdf lin

    Subject : Open or Save to harddisk option pop up window needed when clicked on pdf link
    I have a web application. There will be some pdf links in the application. When clicked on these links I read the content from database and output as bytestream. But when end user clicks these files the pdf will open in the browser or in Adobe based on his Adobe setting
    Note : Experimentation done on Adobe Acrobat reader 5
    Setting 1> Edit - Preferences - Options - Check on the 'Display PDF in browser' option
    pdf opens up in the browser itself without asking any option
    Setting 1> Edit - Preferences - Options - Check off the 'Display PDF in browser' option
    on click it opens a windows pop up window asking me either to 'Open' or 'Save' . If I say Open it opens in Adobe.
    Can this setting be controlled by my application itself [from Java servlets]? I want the opp up to be asked for every end user who clicks on the pdfs irrespective of what settings he has in Adobe Acrobat

    I am not sure whether this will work. But it's possible to download the pdf file. Try the following
    response.setContentType("application/download");
    String filename = <<filename>>
    response.setHeader("Content-Disposition","attachment;filename=\"" + filename + "\"");
    Read the file into a bufferedOutputStream and then
    int bytesA = bis.available();
    response.setContentLength(bytesA);
    write the content to ServletOutputStream..
    Sagar

  • Firefox hangs and will not allow me to access other programs running when I resize a pop up window, move a pop up window, accidentally right click flash content.

    Firefox hangs and will not allow me to access other programs running when I resize a pop up window, move a pop up window, accidentally right click flash content.
    == This happened ==
    A few times a week
    == Not sure when it statrted

    Hi.
    When this happens, please press CTRL+SHIFT+ESC and see how much RAM and CPU Firefox is using. If they're sky high, then... Well, that kind of issues are, unfortunately, more common and the we'd like. Thankfully, 99% of the cases are very easy to solve. However, you do need to diagnose what your exact problem is. Do this:
    #run Firefox in safe-mode to disable all extensions and plugins. If this fixes your issues, be them with RAM or CPU usage, then you know it's a problem with plugins or extensions. Proceed to number 2. If safe-mode doesn't fix the issues, then read bellow, after this list;
    #update all extensions and plugins in your Firefox. If this doesn't solve the issues, proceed to the following number;
    #disable all extensions and plugins in your Firefox (not running safe-mode). Being certain that, as in safe-mode, the problems you're having have gone away, enable one plugin at a time. You should be certain that you WANT that plugin to be enabled, so keep your overall number of plugins as low as possible. When you encounter the problems, you know you've found a problematic plugin, so disable it for good. Keep enabling all plugins (except problematic ones) until you've gone through them all.
    #enable one extension at a time. Again, be certain that you WANT that extension to be enabled, so keep your overall number of extensions as low as possible. When you encounter the problems, you know you've found a problematic extension, so disable it for good. Keep enabling all your extensions (except problematic ones) until you've gone through them all;
    #you're done! You've fixed your problems with problematic add-ons.
    Ok, if disabling all extensions and plugins through safe-mode didn't work to bring Firefox's CPU and RAM usage to good levels, then you have different issue. The most likely scenario is that you have a third party software running on your computer that is messing with Firefox. Do as follows:
    #do a virus/malware check on your computer. If this doesn't fix it, proceed;
    #disable all software running in the background that you don't want to have running in the background (in windows, this is done by pressing WINDOWS+R in your keyboard, typing "msconfig" (without the commas) and pressing enter. Now, under the "Startup" tab, you can uncheck the software you don't want, and reboot your system for changes to take effect. If you're unsure of what software you want running, ask someone with more experience). If this doesn't fix you issues with Firefox, proceed;
    #check your firewall/antivirus/security suite for enabled functions/features that you don't want and/or may be conflicting with Firefox. You'll find that these features are most likely tied to Internet Security features, such as link scanners or URL checkers and the like. If you're not sure they are conflicting with Firefox, simply try to disable to see whether or not that's true. As long as you don't browse the web with your antivirus completely off and your firewall completely turned off, there should be no problems. If this doesn't solve the issues, proceed to the following number;
    #check your operating system security options, mainly advanced options that are not configured by default. While it's very unlikely that this may be the cause of the problem (after all, it's the last item on the list), it's remotely possible. If this doesn't do it, I'm out of ideas. Except make sure you've followed my instructions correctly.

  • Trying to create a pop-up window creates 2 identical windows

    Hello,
    I am trying to accomplish the following:
    Clicking text in my webpage and causing a small pop-up window to open.  I have tried this 2 ways: the first way, I get a new tab in my browser, but it is full-sized; the second way, I get a new tab in my browser AND a small pop-up window.
    Here's the first way:
    1. highlighting the text that should be an "object."
    2. entering a URL in "Link."
    3. defining the "Target" as _blank
    This opens my link in a new browser tab.  This is good, but I'd like this to be a smaller pop-up window so that my full-sized webpage remains in the background.  Please note that if I select any other option for the "Target" or leave that box empty, my webpage is replaced by the url entered in the "link",
    Here's the second way:
    1. highlighting the text that should be an "object."
    2.  entering a URL in "Link."
    3. leaving the "Target" box empty
    4. selecting "open browser window" in "behaviors" and defining that window as a smaller size
    This opens my link in a new browser tab AND opens a smaller  pop-up of that same link.  My webpage remains in another browser tab, but is not showing in the background (I have to close both the pop-up and new browsesr tab in order to get back to my webpage).
    Dreamweaver doesn't allow me to leave the "Link" field blank and select "open browser window" in "behaviors," which I believe is causing thi redundancy.  Since my "object" is not an imported image, but rather, text (such as "click here" that I hope to turn into an object), I wonder if I have to import some kind of file (e.g. jpg, etc. ) as an object in order to achieve my goal.  Can anyone tell mw what I'm doing wrong?
    Thanks in advance for any help!
    Heather

    John,
    Thank you for your reply--since you need to use javascript for this, I take it this is either not possible or very difficult to do in Dreamweaver?
    I'm going to try your script.  May I ask a few questions first?
    1.  Can I do this for multiple links on one page, and if  so, which parts would I repeat and where/ how?
    2.  Which of the values in quotations below do I replace with my own data?  I think it's "my-file.htm," "A PopUp Window of Helpful Search + Information Links" and "open_links()"?
    3.  For the part that goes "anywhere you want in the body," do you mean by "body" the general section with that type of data in it?  Or does that mean anywhere on the page?
    4.  Finally, If I prefer not to create a button, but rather, to leave it as text with a highlighted color for a link, is that possible?  I think it would require an input type other than "='button'", but what are my other options?
    Thanks again,
    Heather

  • How To: create legaleze pop up window in pdf form?

    Hello all. I would like to incorporate a pop up window with my company's legaleze for authorization to use our images in our customers marketing materials. The purpose of the legaleze is to inform the customers our policy on using our images in their marketing materials. The pop up would obviously contain two radio buttons (1. I Agree AND 2. I Disagree) Where if they agree they can continue to fill out the form and request images. But if they disagree they will not be allowed to fill out the form and submit it.
    The form will be distributed via email, and be downloaded from our website.
    The most important aspect of this is that the pop up window with the legaleze function properly. The secondary aspect of the form not being able to be filled out if they disagree is not as  important. Obviously if I see that they disagree, I will not release the images.
    Thanks for your help!

    Adding layers to a PDF is a new feature in version 9 (you can work with layers in version 8, but have to add them in InDesign).
    In 9, add the layers Navigation Panel (View>Navigation Panels>...), then click the gear symbol and choose Import as Layer, and select your PDF with the legal agreement.
    You can control the layer visibility with a button action (one action is "set layer visibility"), and JavaScript can be used to show or hide buttons. So your accept button would have two actions, one layer visibility action and one execute JavaScript action that controls field visibility. A field called Name is controlled by changing that button's display property (hidden/visible):
    var a = this.getField("Name");
    a.display = a.hidden;
    etc.
    For more JavaScript info, check here.

  • How to open multiple report windows on button click without losing session?

    Hi,
    JDev : 11.1.1.2.0
    I am trying to open multiple discoverer plus report windows using my ADF application.
    My requirement is that user has to select multiple reports from the screen and by clicking on submit button all the reports should be opened in different windows.
    1) Below link provided me the the first solution but I can't go with it because my page is jsff and in jsff it doesn't support form tag.
    http://andrejusb.blogspot.com/2007/07/opening-report-window-in-adf-faces.html
    2) RichGoButton also provide targetFrame property but there is not action property in it so I can't call backing bean method with RichGoButton
    3) I have tried to open report windows using javascript window.open with ExtendedRenderKitService but on discoverer side it giving error message that Discoverer Plus cannot attach same session to multiple request.
    4) I have created one jsp page in the same folder where my jsff is kept in my ADF application and on submit button click I have launch this jsp page using afConetxt.launchDialog and in jsp scriplet I have written response.sendRedirect to report url but here all report are getting open properly to seperate windwos but my ADF application session is getting timeout so after clicking on submit button it will automatically goes to login page it cann't stay with the current page.
    Hoe you have understnad my problem and please provide me if you know any other solution aprart from above mentioned 4 solutions
    Regards,
    DevD

    sURL is query parameter value that I want to pass on jsp page. It is used to set some value on jsp page.
    If this is not a right approach then let me know how to pass the parameter in jsp page.

  • How can I create a pop up window for a Windows Media video file in Dreamweaver CS6?

    I have a Windows Media video file on my homepage that plays automatically when you go to the website. I'd like to change my homepage. I now would like to place text that says "click here to play the video" and I'd like a pop up window to open and play the video. I'm using Dreamweaver CS6. Your help will be appreciated. Thanks.

    BlueSapphire777 wrote:
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    Is the code you told me about (above), is it necessary for older browsers such as ie8? I thought you were saying it was for the HTML5 tags and I wasn't sure I'd bother with it. If it helps people with ie8, I probably should add it.
    I include it (or a link to a localized copy of the file) by default now.
    To truly support the ancient browsers out there, you'd likely need something like...
    <video width="500" height="500">
        <source src="video.mp4" type="video/mp4" />
        <source src="video.ogv" type="video/ogg" />
        <source src="video.webm" type="video/webm" />
        <object width="500" height="500">
        <param name="movie" value="video.swf" />
        <embed src="video.swf" width="500" height="500"></embed>
        </object>
    </video>
    I don't bother with a Flash fall back for old browsers though. I just put in text letting the viewer know they're behind the times pretty severely, like...
    <video width="500" height="500">
        <source src="video.mp4" type="video/mp4" />
        <source src="video.ogv" type="video/ogg" />
        <source src="video.webm" type="video/webm" />
        <p>Your browser is horribly, helplessly and hilariously outdated. Visit <a href="firefox.com" target="_blank">www.firefox.com</a> to download something better, more secure, modern, worthwhile, etc, etc...</p>
    </video>
    For junky old browsers that can't see any HTML5 (which the <video> and <audio> tags are), they get a text message to get something better and a link to go there.

  • Opening new window on button click from pdf without loosing session

    Hi,
    In my Java web applicaion on click of a link, we are opening a new window in which we are displaying a pdf. There are 5 buttons on this pdf.
    On clicking of this button again we are opening a application link in new window. But in this window we are not gettting our session, which is there in first two window.
    For opening new window from pdf button click we are using
    var dynamicUrl3 = myappurl;
    app.launchURL(dynamicUrl, true); 
    How can i open new window with the same sesion from the pdf button.
    Please help for the same.
    Thanks,
    Abhijit Mohite.

    Yes, with target="_blank" in a link or a form.Thanks for ur valuable suggestion. I changed the button to link.
    Its working fine now without JavaScript.
    Now i got another requirement. When user select some items and press a button in the new popup window, the window must close on button click and the parent window must refresh. This must also be done without using JavaScript.
    Is this possible? Please give me an idea to do this.
    Thanks.

  • Pop up window : conatin buttons

    Hi friends,
    I need to generate a pop up window based on a condition.
    I can use FM POPUP_TO_CONFIRM, but I need follwing values to be displayed on the pop up window.
    1)Three variable values
    2)PUSH buttons (5 BUTTONS)
    please help in this regard as soon as possible.

    popup three button possiable sap standard function module.
    used this way
    CALL SCREEN dynnr
                [STARTING AT col1 lin1
                [ENDING   AT col2 lin2]].

Maybe you are looking for