Prompt dialog in JSP

Hello,
I am trying to figure out how to call a javaScript function from a JSP page that prompts the user to do one of two things. Depending on the selection, I would like to return to the JSP and continue on with the code. What is the best way to do this?
Thanks in advance,
Jenny

You can't do that. The JSP is running on the server, Javascript runs on the client. You can't pass any values back to the server in the middle of the JSP page processing. Once you make a request, you can't send anything else back mid-response. You can load a page and prompt the user and based on the response, use Javascript to redirect the page to another JSP page or pass other parameters to the JSP page.

Similar Messages

  • Hide the prompt dialog

    Hi,
    I am using relational universe (Oracle) as data source for my design studio 1.3 application. I want to pass the universe prompt value from Design Studio drop down component. Here is my code in Application on startup event:
    APPLICATION.setVariableValue("psEnter Market Basket ID", "3"); //prompt from universe
    DS_1.loadDataSource();//loading data source
    But still I am getting prompt dialog box to enter/select the prompt values. I need to hide the prompt dialog and pass the value in my code. Can anyone please help on this.

    I have not done this with universes, but with BEx Queries I think you need to put the "APPLICATION.setVariableValue("psEnter Market Basket ID", "3"); //prompt from universe" statement in the "On Variable initialization" event (not in the "On Startup" event)...

  • Custom Prompts Dialog

    We are running BOXI 3.1 SP3 Java, and we have an application that includes the Analytical Reporting and OpenDoc war files to display webi reports in our own portal. We would like to customize the prompts dialog to do advanced date handling and more powerfull cascading prompts.
    Is there a way to replace the existing prompt dialog with our own page using Extension Points? We don't need to change any other part of the webi report viewer, so I really don't want to have to create a full SDK solution for viewing reports. Plus it would be nice to not have to hack the Analytical Reporting code so when new service packs come out we can upgrade without having to worry about our changes. Has anyone done this?
    Thanks
    Tim

    Yeah, I know that using Extension Points is not supported unless you are a SAP Partner. However, it makes more sense to use extension points then to try to hack the webi code. Completely re-writing our own version of the interactive viewer seems to be extreme overkill just so we can have custom prompt handling. I really got my hopes up when I started reading about Extension Points as they seem the perfect way to handle this type of task. Simply write a new module for just the functionality you need and plug it in. Too bad it doesn't seem to be anything but a hobby side project for SAP.
    Does anyone know if Extension Points will be upgraded with the new version of BO due out next quarter?
    Tim

  • How to popup a prompt dialog when closing IE?

    Hello,every one
    How to popup a prompt dialog when closing IE by clicking the "Cross"(close) of the left-up corner?
    can you give me any suggestions?
    Thnak you!
    zhongboqing

    hi,everyone,
    I am wrong. It should be:
    How to popup a prompt dialog when closing IE by clicking the "Cross"(close) of the right-up corner?
    thank you!

  • Customization of Prompt Dialog

    Hi there!
    I'm working with Design Studio with some reports and dashboards linked to Bex queries.
    I would like to change the appearance or at least the dimensions of the starting Prompt Dialog.
    Is it possible?
    Can i also change the aspect of the function-called Prompt Dialog?
    P.s: I'm using DS 1.3.
    Thanks!

    Hi all
    So we are advised not to use prompts. And this is what I've been recommending to my customers for months. And if they have a lot of existing queries with some, to set them with dummy values on variable initialization event.
    But I'm suprised that there is no CSS class or something (if there is any other place where this prompt dialog design could be set). It has to be stored somewhere, no?
    Thanks in advance
    Best Regards.

  • Parameter Prompting Dialog

    <p>Is it possible to instantiate and display the Parameter PromptingDialog from .Net code. If yes then how to do it.</p><p>Regards Sreeni</p>

    Weird, but I just responded to this but it didn't save my response!
    Anyways, the quick response was that the parameter prompt dialogs are intended to be used internally by the viewer.  If you want to prompt the user for params without having to use the viewer, you can create your own prompt page and use the SDK to set the values for the parameters.
    -MJ

  • Prompt() dialog box

    I am developing a script to add a custum guides set to a Photoshop document. I use prompt() function to get input from the user.  The script works but it is not effificent when collacting the input form the user.
    Is ther a an advanced prompt() dialog box that allows two or more data input fields?
    or pehaps a different way to let the user enter the distance for each guide in one single dialog box?

    Here is a script I wrote to generate a random noise pattern. It is customizable and the settings can be saved and reused. It's nothing fancy, but it has some elements in it that I think will be helpful to you. From what I gather, you can modify scripts well enough so you should have no problem getting this to work with yours.
    #target photoshop
    // Save the current preferences
    var startRulerUnits = app.preferences.rulerUnits;
    var startTypeUnits = app.preferences.typeUnits;
    var startDisplayDialogs = app.displayDialogs;
    //Set preferences to use pixels
    app.preferences.rulerUnits = Units.PIXELS;
    app.preferences.typeUnits = TypeUnits.PIXELS;
    app.displayDialogs = DialogModes.NO;
    function readini() {
        var SCRIPTS_FOLDER = new Folder(app.path + '/' + localize("$$$/ScriptingSupport/InstalledScripts=Presets/Scripts"));
        ini=new File([SCRIPTS_FOLDER + "/NoiseGen.ini"]);
        if (ini.created) {
            $.evalFile(ini);
            return true;
        ini.close();
    var ng= new Window("dialog{text:'Noise Generator',bounds:[100,100,500,600],\
            start:Scrollbar{bounds:[50,50,330,60] , minvalue:5,maxvalue:50,value:5},\
            stText:EditText{bounds:[340,45,370,65] , text:'5' ,properties:{multiline:false,noecho:false,readonly:false}}\
            startText:EditText{bounds:[140,70,240,90] , text:'START SIZE' ,properties:{multiline:false,noecho:false,readonly:true}}\
            scale:Scrollbar{bounds:[50,130,330,140] , minvalue:1,maxvalue:25,value:17},\
            scText:EditText{bounds:[340,125,370,145] , text:'17' ,properties:{multiline:false,noecho:false,readonly:false}}\
            scaleText:EditText{bounds:[140,150,240,170] , text:'SCALE AMT' ,properties:{multiline:false,noecho:false,readonly:true}}\
            noise:Scrollbar{bounds:[50,210,330,220] , minvalue:1,maxvalue:100,value:15},\
            nText:EditText{bounds:[340,205,370,225] , text:'15' ,properties:{multiline:false,noecho:false,readonly:false}}\
            noiseText:EditText{bounds:[140,230,240,250] , text:'NOISE AMT' ,properties:{multiline:false,noecho:false,readonly:true}}\
            loops:Scrollbar{bounds:[50,290,330,300] , minvalue:5,maxvalue:50,value:40},\
            lText:EditText{bounds:[340,285,370,305] , text:'40' ,properties:{multiline:false,noecho:false,readonly:false}}\
            loopText:EditText{bounds:[140,300,240,320] , text:'LOOP TIMES' ,properties:{multiline:false,noecho:false,readonly:true}}\
            pixelText:EditText{bounds:[80,360,245,376] , text:'Number of pixels per side:' ,properties:{multiline:false,noecho:false,readonly:true}}\
            sizeText:EditText{bounds:[250,360,320,376] , text:'2802' ,properties:{multiline:false,noecho:false,readonly:true}}\
            checkbox0:Checkbox{bounds:[60,385,181,406] , text:'Colorize?' }\
            save:Button{bounds:[60,410,160,430] , text:'Save as default' },\
            clear:Button{bounds:[210,410,310,430] , text:'Reset defaults' },\
            buttonOK:Button{bounds:[60,450,160,470] , text:'OK' },\
            buttonC:Button{bounds:[210,450,310,470] , text:'Cancel' },\
    function getSize() {
        grBy=(ng.scale.value+100)/100;
        var i=ng.loops.value;
        var s=ng.start.value;
        while (i>1) {
            s=Math.round(s*grBy);
            i--;
        return s;
    ng.stText.onChange = function() {
        this.parent.start.value = this.parent.stText.text;
        this.parent.sizeText.text = getSize();
    ng.scText.onChange = function() {
        this.parent.scale.value = this.parent.scText.text;
        this.parent.sizeText.text = getSize();
    ng.nText.onChange = function() {
        this.parent.noise.value = this.parent.nText.text;
    ng.lText.onChange = function() {
        this.parent.loops.value = this.parent.lText.text;
        this.parent.sizeText.text = getSize();
    ng.start.onChanging = function() {
        var st =  Math.floor(this.value);
        this.parent.stText.text = st;
    ng.scale.onChanging = function() {
        var sc =  Math.floor(this.value);
        this.parent.scText.text = sc;
    ng.noise.onChanging = function() {
        var n =  Math.floor(this.value);
        this.parent.nText.text = n;
    ng.loops.onChanging = function() {
        var l =  Math.floor(this.value);
        this.parent.lText.text = l;
    ng.start.onChange = function() {
        var st =  Math.floor(this.value);
        this.parent.sizeText.text = getSize();
    ng.scale.onChange = function() {
        var sc =  Math.floor(this.value);
        this.parent.sizeText.text = getSize();
    ng.loops.onChange = function() {
        var l =  Math.floor(this.value);
        this.parent.sizeText.text = getSize();
    ng.buttonOK.onClick = function(){
        noiseOK=true;
        ng.close();
    ng.save.onClick = function(){
        ini.open('w');
        ini.writeln("startSize=" ,Math.floor(ng.start.value));
        ini.writeln("scaleSize=",Math.floor(ng.scale.value));
        ini.writeln("noiseAmt=",Math.floor(ng.noise.value));
        ini.writeln("loopNum=",Math.floor(ng.loops.value));
        ini.close();
    ng.clear.onClick = function(){
        ini.remove();
        ng.start.value=5;
        ng.stText.text=5;
        ng.scale.value=17;
        ng.scText.text=17;
        ng.noise.value=15;
        ng.nText.text=15;
        ng.loops.value=40;
        ng.lText.text=40;
        ng.sizeText.text=2802;
    if (readini()) {
        if (startSize) {
            ng.start.value=startSize;
            ng.stText.text=startSize;
        if (scaleSize) {
            ng.scale.value=scaleSize;
            ng.scText.text=scaleSize;
        if (noiseAmt) {
            ng.noise.value=noiseAmt;
            ng.nText.text=noiseAmt;
        if (loopNum) {
            ng.loops.value=loopNum;
            ng.lText.text=loopNum;
        ng.sizeText.text = getSize();
    noiseOK=false;
    ng.center();
    ng.show();
    if (noiseOK) {
        var docRef = app.documents.add(Math.floor(ng.start.value),Math.floor(ng.start.value),72,"Noise");
        var layerRef = docRef.artLayers.add();
        var colorRef = new SolidColor;
        colorRef.rgb.red = 127.5;
        colorRef.rgb.green = 127.5;
        colorRef.rgb.blue = 127.5;
        docRef.selection.selectAll();
        docRef.selection.fill(colorRef);
        layerRef.applyAddNoise (Math.floor(ng.noise.value), NoiseDistribution.UNIFORM, true);
        grBy=UnitValue ((Math.floor(ng.scale.value)+100), '%');
        var i=Math.floor(ng.loops.value);
        while (i>0) {
            if (ng.checkbox0.value) {
                colorRef.rgb.red=Math.round(Math.random()*255);
                colorRef.rgb.green=Math.round(Math.random()*255);
                colorRef.rgb.blue=Math.round(Math.random()*255);
            docRef.resizeImage (grBy, grBy);
            layerRef = docRef.artLayers.add();
            docRef.selection.selectAll();
            docRef.selection.fill(colorRef);
            layerRef.blendMode = BlendMode.SOFTLIGHT;
            layerRef.applyAddNoise (Math.floor(ng.noise.value), NoiseDistribution.UNIFORM, true);
            layerRef = layerRef.merge();
            i--;
        docRef.selection.deselect();
        docRef = null;
        layerRef = null;
    ini.close();
    //Set preferences back to before
    app.preferences.rulerUnits = startRulerUnits;
    app.preferences.typeUnits = startTypeUnits;
    app.displayDialogs = startDisplayDialogs;

  • Failed to open a swing JSP file but a dialog box prompt to download jsp

    Hi gurus,
    I have encountered one strange problem where previously I have installed JRE 1.4.2.0.6 for running my form 10g application.
    I 'm currently testing an ADF swing application in a 3 tier model using version 10.1.3 which require JRE 1.5 but when I try to load http://localhost/swing/oc4j.jsp, it will prompt up with the message:
    Some files can harm your computer. If the file information below looks suspicious or you do not fully trust the source, do not open or save this file
    would you like to open the file or save it to your computer?"
    In normal case, it will do a download of the jar file to the client machine and open the swing application using java web start but it seems the problem is related with my previous installation of 1.4 . Even though I have completely uninstalled JRE 1.4 and install JRE 1.5 , I cannot run the ADF swing in 3 tier which is seems to be in relation with the signed jar.
    Ana

    Ana,
    seems that the client doesn't recognize the Mime type for JavaWebstart. Try on a different client. JavaWebStart works for me when I test it on my machine with ADF Swing.
    Frank

  • How to open a Save Dialog in JSP?

    Hi all, i need to export a CSV file. A button is provided to the user to choose where to save the file. My problem is how to open a 'Save As' dialog box in JSP?

    Hi all, i need to export a CSV file. A button is provided to the user to choose where to save the file. My problem is how to open a 'Save As' dialog box in JSP?

  • How to use AVDocPrintPagesWithParams for printing without any prompt dialog or alert message ?

    Hi Friends,
    I have a problem to print the pages of a pdf, but with out any dialog box prompt. So I choosed the api AVDocPrintPagesWithParams(avDoc, avDocPrintParam);
    But I don't know how to set parameter for 2nd parameter of the funtion. My requirement is I want to print pdf's using default printer of the system i.e. Print As PDF using Abode PDF print.
    Page Dimension should be same as previous, with postscript value 3 (best print).
    I have used AVDocPrintPages (AVDoc doc, ASInt32 firstPage,ASInt32 lastPage, ASInt32 psLevel, ASBool binaryOK,ASBool shrinkToFit); But it gives an error message for some pdf's that PDF may not printed correctly because font information couldn't be found.
    So can anyone let me know please how to set the parameter of AVDocPrintParam, so that I can use AVDocPrintPagesWithParams and do the same job.
    Thanks and Regards,
    Saffiuddin Sheikh.

    Dear lrosenth,
    I am into an operation where I have check whether each objects falls inside my rectangular region or not. For this I am taking help of BBox and matrix information. The problem is that when I find PDF's those have form or container objects, their matrix and BBox is depenedent on matirx of the form or container containing them.
    In most cases by adding(concetinating ) the matrix value of form and the element gives the correct matrix, BBox value, but some cases I am yet to understand the behaviours. So to avoid these form and container for our immidiate project delivery, we are using this option to print the pdf and then process for checking the position of elements.
    My original requirement is :
    How to know objects position inside a form or container ?  
    This is just an alternative time being way to achieve the task. But if you have any idea of how to detect postion of objects inside form/container then please let me know. 

  • Acrobat Pro 9.4.3 filename prompt dialog window doesn't automatically display

    I'm running Acrobat Pro 9.4.3 from CS5 Design Premium on a Windows 7 Pro system. When creating a PDF from any source, the filename dialog window doesn't open. I have to click on its icon in the taskbar to display it.
    Acrobat works fine on our XP Pro systems with the filename dialog opening on top of all other windows. Thought it was an OS issue but all the other programs display their prompt windows as they should in.

    Yes, I initiated the review. When I initiated the review, I saw a different dialog for entering my username and password. That took my credentials and uploaded the PDF to SharePoint.
    I don't remember seeing RSA dialog (see the image I attached to the first post) when I created the review, only when I opened the PDF after the review was generated. At that point, I did select to save the credentials, but it didn't seem to save them (since everytime the dialog appears it is blank).
    I had another one of our tech writers test it before sending it to the rest of the team, and he was able to access the review and put in test comments. He never saw the dialog. At that point, I looked at other reviews that I had initiated in the past, and was unable to add comments to those either (at least for the ones that didn't have a deadline). So I am pretty sure it is something that has changed on my system in the last few weeks. Perhaps a Microsoft Security update?

  • Print Dialog in JSP

    Dear All,
    This my problem. From JSP on clicking a Button , a Print Dialog Box has to appear. On Clicking Print it has to print a Dynamically Generated HTML Page. My Architecture Goes LIke this. Jsp --> Servlet --> In servlet a HTML is generated.
    When Clicking the Button in JSP, The page should not refresh again. It has to straight away display the Print Dialog Button. I can do this for displaying open-dialog box. now the requirement is to display the print dialog box.
    this is the snap shot code i used in servlet to open the html. But Now Requirement is to Open a Print Dialog Box Instead of Open Dialog Box.
    Can any one help me out in this regard.
    public void doPost(HttpServletRequest request,HttpServletResponse response) throws IOException,ServletException
    PrintWriter pw = response.getWriter();
    response.setContentType("text/html");
    response.setHeader("Content-disposition","attachment;filename=report.html");
    pw.print(generateHTMLContent());
    pw.close();
    Post reply here / mail me @ [email protected]

    If you don't mind restricting yourself to the newer browsers you can use the LINK tag to designate the servlet as an alternate html page that will be printed when a JavaScript function does a document.print.
    Here is a link that may help:
    http://www.htmlhelp.com/reference/html40/head/link.html
    I have used this for intranet applications where I knew that all users would be using IE 5+ but I don't have an example readily available.

  • Implementing Save dialog in jsp

    Hi all,
    I need a small help. I have one excel file and one link called download. When we press the "download " link it should prompt us to save and the file must be saved.
    please help me how i can implement save dialog.
    Any help is appreciated.
    Thanking you in advance.
    Regards,
    Devi.

    Take a look at this post: http://forum.java.sun.com/thread.jspa?threadID=5170452&messageID=9655276
    ( Remember to update the filestreams to buffered streams if you do use the sample )

  • Browse Folder Dialog in JSP

    Hi Everybody!
    I have a user-form within an JSP, and within this I want the user to specify a folder an his system.
    I already tried <input type="file" .... > But with this tag you can only select a specific file, not a folder.
    Now I solve the problem by having a plain input field and having the user type in the path, but I do not like it.
    So how can I integrate a browser folder dialog to this form?
    Thx in Advance!
    Stef

    hai
    i have also a same problem
    i got in java
    this is the sample code
    http://forum.java.sun.com/thread.jspa?threadID=754499&messageID=4311333#4311333
    but i need in jsp
    if u got it means please tell me
    thanks

  • Custom Personalization Dialog for JSP Dynpage

    Hi,
    i have a JSP Dynpage Component with the bean. i want to allow the user to personalize the iView when they click the "Personalize" in the iView Tray. So i have implemented doEdit() in the JSP Dynpage class and setting a JSP in the doEdit(). But in the portal the iView is not bringing any custom personalization JSP when i click "Personalize" in the iVIew Tray Drop Down Menu.
    doEdit() method wont work for JSP Dynpage ? is it only for Abs Portal Component ?
    Thanks,
    Saravanan

    Hi Saravanan,
    Hi Saravanan,
    JSPDynPage is more elaborate version of the DynPag. It creates a JSP file and, optionally, a Bean class.
    This means that the doProcessBeforeOutput methods are slightly different and there is an additional JSP file and an optional Bean class file. There are obviously other differences (such as the differences in the portalapp.xml file).
    Just check with a sample Portalapp.xml file:
    Ensure all the entries are made.
    <application>
      <application-config>
        <property name="releasable" value="true"/>
      </application-config>
      <components>
        <component name="BeginEPDevelopment">
          <component-config>
            <property name="ClassName" value="com.yourcompany.BeginEPDevelopment"/>
          </component-config>
          <component-profile>
            <property name="diplayHistory" value="10">
              <property name="plainDescription" value="BlogEntries"/>
              <property name="personalization" value="dialog"/>
            </property>
            <property name="diplayStyle" value="list">
              <property name="type" value="select[list,entries]"/>
              <property name="personalization" value="dialog"/>
            </property>
          </component-profile>
        </component>
      </components>
      <services>
        <service name="BeginEPDevelopmentService">
          <service-config>
            <property name="startup" value="true"/>
            <property name="className" value="com.yourcompany.BeginEPDevelopmentService"/>
          </service-config>
          <service-profile>
            <property name="BlogComments" value="Display"/>
          </service-profile>
        </service>
      </services>
    </application>
    Hope it helps you.
    Regards,
    Ponneswari.

Maybe you are looking for

  • Connect TV to MacBook

    I recently purchased a new television which is supposed to be able to connect to a computer. Which cord do I need to purchase? Thanks!

  • Strange behavior in Horizontal Menu

    I have created a horizontal menu where Rollover, Mouse Down, and Active are red. The behavior of all of the menu in IE 11 is correct except for CONTACT. When CONTACT is selected, the site scrolls to the correct place but the ACTIVE state shows as gra

  • Swatches duplicating/slow copying ARGH

    CS 5, Illustrator 15.1.0, OS 10.6.7 Mac (Had this problem in CS4...) This has been discussed before, and I have tried the suggested solutions (cleaning out the "bad" code: e.g. %AI5_Begin_NonPrinting), but when I have done this, it has screwed up my

  • PR for spare parts.

    Hi,all, While creating PR for spare parts,I need to enter multiple line items say around 30 line items(i.e.30 nos of different material).My problem is for selecting every line item ,I need to open the selection screen every time and pick up each mate

  • Opening multiple docs fail

    After downgrading to Snow Leopard (joke) when I select (in the finder) 4 documents and choose "open" only 2 of the docs open.