Display pop ups in the jsp by using Java script

Hi
can any body say ,how to display pop ups in the jsp by using Java script ?

that's correct. You can use the below code for AJAX request.
<script type="text/javascript">
var httpObject = getHTTPObject();
//create XMLHttpRequest object
function getHTTPObject() {     
     var xmlhttp;
     if (window.XMLHttpRequest) // if Mozilla, Safari etc
          xmlhttp = new XMLHttpRequest();
     else if (window.ActiveXObject){ // if IE
          try {
               xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
          catch ( e ){
               try{
                    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
               catch ( e ){}
     return xmlhttp;
//define the function to send the request
function sendRequest(){
    var currDesc = document.getElementById("description").value;
    var URL =  "manageMaintAction.do"; //action mapping in your struts-config
    var queryString = "currDesc="+escape(currDesc); //get the currDesc value in your action class like request.getParameter("currDesc")
    httpObject.open( "Post", URL, true );
    httpObject.onreadystatechange = cbFn;
    httpObject.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded");
    httpObject.send(queryString);
//callback fn
function cbFn() {
    if (httpObject.readyState == 4)
         if (httpObject.status == 200)
          var result = httpObject.responseText;
          alert(result);
</script>

Similar Messages

  • How to get the context data using java script in interactive forms

    Hi All,
    How to get the context data using java script in interactive forms by adobe,  am using web dynpro java
    thanks.

    Hi venkat,
    Please Refer this link.
      Populating one Drop-Down list from the selection of another Drop-down list
    Thanks,
    Raju.

  • How to do Front End Validation for JSP Forms using Java Script with 9iJD...

    How to do Front End validation using 9iJD. Any wizard is there. We need to do the val. using Java Script. If its not available, please include that in the Production Release.

    Thanks a lot. When is the Production Release is scheduled. Please tell us whether itll be available for Free Download. Bec, we couldnt buy. Bec, if its working fine with all the options without any bug only, we can ask our company to buy 9iJD by stating the advantages. Just explain us.

  • Problem in the jsp, jstl and java script.

    Hi Friends,
    I am having one jsp which allows user(Could you please refer to code which is written in my jsp) to enter his username and password i want to get the password in the same jsp and want it to be passed to the custom tag without sending request to the server.Please give me an idea.Thanks in advance.
    This is the text field which allows a password.
    <INPUT type="password" name="password" size="10" maxlength="29" onblur="chkpwd()" onfocus="this.autocomplete=false" >
    and this is the anchor tag which refers as LOGIN BUTTON
    <IMG height=19 src="images/submit1.gif" width=106 border=0>
    when user clicks on LOGIN BUTTON i am calling one javascript function LOGIN(PASSWORD:) to check the validation if the validation is success then i want to get the password in the same function which is entered .
    This is ok i can get the password by "document.formName.password.value" then i need to pass this value to the jstl tag which is our own tag as shown below.
    <prefix:tagname value="PASSWORD which is having in the javascript variable".
    Please help me .
    Quick reply is thankfull.
    Edited by: bharathpolanki on Apr 20, 2008 1:55 AM
    Edited by: bharathpolanki on Apr 20, 2008 2:55 AM

    that's correct. You can use the below code for AJAX request.
    <script type="text/javascript">
    var httpObject = getHTTPObject();
    //create XMLHttpRequest object
    function getHTTPObject() {     
         var xmlhttp;
         if (window.XMLHttpRequest) // if Mozilla, Safari etc
              xmlhttp = new XMLHttpRequest();
         else if (window.ActiveXObject){ // if IE
              try {
                   xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
              catch ( e ){
                   try{
                        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                   catch ( e ){}
         return xmlhttp;
    //define the function to send the request
    function sendRequest(){
        var currDesc = document.getElementById("description").value;
        var URL =  "manageMaintAction.do"; //action mapping in your struts-config
        var queryString = "currDesc="+escape(currDesc); //get the currDesc value in your action class like request.getParameter("currDesc")
        httpObject.open( "Post", URL, true );
        httpObject.onreadystatechange = cbFn;
        httpObject.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded");
        httpObject.send(queryString);
    //callback fn
    function cbFn() {
        if (httpObject.readyState == 4)
             if (httpObject.status == 200)
              var result = httpObject.responseText;
              alert(result);
    </script>

  • Is it possible to trace the mouse event using java script in indesign cs3?-request urgent

    Hi friends,
    am writing js for indesign cs2, i want to know the things whether it is possible for tracing the curse position in indesign application using javascript? i need it to know for both cs2 and cs3
    thanks in advance
    by
    subha

    to Subha:
    I definitely do not know enough to answer your question.
    But on June 14, 2007, Dave Saunders started a topic
    (this forum) titled "Am I making progress".
    Posts 23 and 32 there could be helpful, but I may
    have misunderstood your phrase "tracing the
    cursor position".
    Roger Purves

  • How avoid spl charecters in jsp forms using java script..

    hi,
    iam using following function for escaping spl charcetrs..
    function checkEscapeCharacter(currentField) {
    var string = currentField.value;
    var iChars = "\"*|,?_:<>[]{}';()@&$#%!~`^-+=\\/";
    for (var i = 0; i < string.length; i++) {
    if (iChars.indexOf(string.charAt(i)) != -1){
    alert("illegal");
    currentField.value="";
    currentField.focus();
    return false;
    but with code aftet alert iam removing alll entered value..i just want to remove the illegal chacters..iam calling this onkeyup event..after alert it should remove spl char from string and assign it back to text fileld.
    regard,

    Hello,
    I wrote the following two methods, you pass the first of these the String
    you want to check, and the character you want removed. It then returnes the
    'cleaned' string.
    The second is very similar, but instead of removing the character, it replaces
    it with another.
    These only do one character at a time though, which is not exactly what your
    after.
       public String stripChar(String string, String charToStrip)
            String newString="";
            StringTokenizer st = new StringTokenizer(string, charToStrip);
            while (st.hasMoreTokens())
                newString = newString + st.nextToken();
            return newString;
    public String replaceChar(String string, String charToStrip, String charToAdd)
            String newString="";
            StringTokenizer st = new StringTokenizer(string, charToStrip);
            while (st.hasMoreTokens())
                newString = newString + charToAdd + st.nextToken();
            return newString;
        }

  • How do remove the page number using java script.

    Thank you.

    Hello,
    Where you want remove the page number? If you delete the page number in the first page of the document, that is no way to do. Becasue, first you have to try manually remove the page number 1st page of pages panel, its shown the error "Invalid entry".
    Can you please post your query briefly.
    thx
    csm_phil

  • Using Java scripting in WAD

    Hi All,
    Is it possible to make changes in Java Scripts used in WAD report?
    Can anyone tell me what are the changes possible using Java scripting and from where can I get the documentation for the same?
    Thanks.

    Hi Suchitra,
    With NW2004s, most of the javascript options can be entered directly through the Script object into the Web template. The suggestion is to use the command wizard to modify/control the behaviour of the objects...
    Check this links for details regarding Javascript.
    http://www.w3schools.com/jsref/jsref_onload.asp
    Hope this helps.
    ****Assign points if helpful****
    Regards,
    Ravikanth.

  • My mac book has pop ups all the time

    I have a mac book and it keeps getting pop ups I let my friend use the computer so I have no clue what she did but when i got it back pop ups started happening I have disabled the pop up on safari its self but it did nothing Im not sure what to do?

    You may have installed the "DownLite" trojan, perhaps under a different name. Remove it as follows.
    Malware is constantly changing to get around the defenses against it. The instructions in this comment are valid as of now, as far as I know. They won't necessarily be valid in the future. Anyone finding this comment a few days or more after it was posted should look for more recent discussions or start a new one.
    Back up all data.
    Triple-click anywhere in the line below on this page to select it:
    /Library/LaunchAgents/com.vsearch.agent.plist
    Right-click or control-click the line and select
              Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item named "VSearch" selected. Drag the selected item to the Trash. You may be prompted for your administrator login password.
    Repeat with each of these lines:
    /Library/LaunchDaemons/com.vsearch.daemon.plist
    /Library/LaunchDaemons/com.vsearch.helper.plist
    /Library/LaunchDaemons/Jack.plist
    Restart the computer and empty the Trash. Then delete the following items in the same way:
    /Library/Application Support/VSearch
    /Library/PrivilegedHelperTools/Jack
    /System/Library/Frameworks/VSearch.framework
    ~/Library/Internet Plug-Ins/ConduitNPAPIPlugin.plugin
    Some of these items may be absent, in which case you'll get a message that the file can't be found. Skip that item and go on to the next one.
    From the Safari menu bar, select
              Safari ▹ Preferences... ▹ Extensions
    Uninstall any extensions you don't know you need, including any that have the word "Spigot" or "Conduit" in the description. If in doubt, uninstall all extensions. Do the equivalent for the Firefox and Chrome browsers, if you use either of those.
    This trojan is distributed on illegal websites that traffic in pirated movies. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect much worse to happen in the future.
    You may be wondering why you didn't get a warning from Gatekeeper about installing software from an unknown developer, as you should have. The reason is that the DownLite developer has a codesigning certificate issued by Apple, which causes Gatekeeper to give the installer a pass. Apple could revoke the certificate, but as of this writing, has not done so, even though it's aware of the problem. This failure of oversight is inexcusable and has compromised both Gatekeeper and the Developer ID program. You can't rely on Gatekeeper alone to protect you from harmful software.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.

  • Wierd pop-ups all the time!

    I keep on getting annoying pop ups all the time,with block pop ups on,and they keep on coming from macster. some sites will pop up too. i spent some time taking screen shots of the pop ups as they came along. even though my mac can handle anything(not really) i give it,it lags very badly when these ads pop up!

    Helpful Links Regarding Malware Problems
    If you are having an immediate problem with ads popping up see The Safe Mac » Adware Removal Guide and AdwareMedic.
    Open Safari, select Preferences from the Safari menu. Click on Extensions icon in the toolbar. Disable all Extensions. If this stops your problem, then re-enable them one by one until the problem returns. Now remove that extension as it is causing the problem.
    The following comes from user stevejobsfan0123. I have made minor changes to adapt to this presentation.
    Fix Some Browser Pop-ups That Take Over Safari.
    Common pop-ups include a message saying the government has seized your computer and you must pay to have it released (often called "Moneypak"), or a phony message saying that your computer has been infected, and you need to call a tech support number (sometimes claiming to be Apple) to get it resolved. First, understand that these pop-ups are not caused by a virus and your computer has not been affected. This "hijack" is limited to your web browser. Also understand that these messages are scams, so do not pay any money, call the listed number, or provide any personal information. This article will outline the solution to dismiss the pop-up.
    Quit Safari
    Usually, these pop-ups will not go away by either clicking "OK" or "Cancel." Furthermore, several menus in the menu bar may become disabled and show in gray, including the option to quit Safari. You will likely have to force quit Safari. To do this, press Command + option + esc, select Safari, and press Force Quit.
    Relaunch Safari
    If you relaunch Safari, the page will reopen. To prevent this from happening, hold down the 'Shift' key while opening Safari. This will prevent windows from the last time Safari was running from reopening.
    This will not work in all cases. The shift key must be held at the right time, and in some cases, even if done correctly, the window reappears. In these circumstances, after force quitting Safari, turn off Wi-Fi or disconnect Ethernet, depending on how you connect to the Internet. Then relaunch Safari normally. It will try to reload the malicious webpage, but without a connection, it won't be able to. Navigate away from that page by entering a different URL, i.e. www.apple.com, and trying to load it. Now you can reconnect to the Internet, and the page you entered will appear rather than the malicious one.
    An excellent link to read is Tom Reed's Mac Malware Guide.
    Also, visit The XLab FAQs and read Detecting and avoiding malware and spyware.
    See these Apple articles:
      Mac OS X Snow Leopard and malware detection
      OS X Lion- Protect your Mac from malware
      OS X Mountain Lion- Protect your Mac from malware
      OS X Mavericks- Protect your Mac from malware
      About file quarantine in OS X
    If you require anti-virus protection Thomas Reed recommends using ClamXAV. (Thank you to Thomas Reed for this recommendation.)
    From user Joe Bailey comes this equally useful advice:
    The facts are:
    1. There is no anti-malware software that can detect 100% of the malware out there.
    2. There is no anti-malware that can detect everything targeting the Mac.
    3. The very best way to prevent the most attacks is for you as the user to be aware that
         the most successful malware attacks rely on very sophisticated social engineering
         techniques preying on human avarice, ****, and fear.
    4. Internet popups saying the FBI, NSA, Microsoft, your ISP has detected malware on
        your computer is intended to entice you to install their malware thinking it is a
        protection against malware.
    5. Some of the anti-malware products on the market are worse than the malware
        from which they purport to protect you.
    6. Be cautious where you go on the internet.
    7. Only download anything from sites you know are safe.
    8. Avoid links you receive in email, always be suspicious even if you get something
        you think is from a friend, but you were not expecting.
    9. If there is any question in your mind, then assume it is malware.

  • I have an iPhone 4 and my lock button is jammed and I also can not touch anything on the left side of my screen well as any pop ups from the phone itself, so i can not get past the set up stage in reset process...how can i fix it/can it be fixed?

    I have an iPhone 4 and my lock button is jammed and I also can not touch anything on the left side of my screen well as any pop ups from the phone itself, so i can not get past the set up stage in reset process...how can i fix it/can it be fixed?

    Make an appointment at the genius bar and get the phone replaced.

  • I bought my iphone from a lady at the mall but she didnt remember her icloud password well now i keep getting pop ups about the icloud password but she doesnt remember it and whenever i try turning it off it asks me for the password but i dont know it?

    i bought my iphone from a lady at the mall but she didnt remember her icloud password well now i keep getting pop ups about the icloud password but she doesnt remember it and whenever i try turning it off it asks me for the password but i dont know it?

    That is the activation lock. Your iPad will be useless unless you can remove it.

  • What's the difference between using java directly in JSP and java bean

    What is the difference if I use java code directly in JSP or use java bean in JSP?
    Which class to use for receiving the passed parameter from html or java script? Any difference for java code and java bean in the way receiving the passed data?
    How can I pass string from jsp to html or java script?

    1 Cleaner pages
    2 you have to write the class and use set and get methods
    3 What do you mean when saying passing string from jsp to html??, do you mean the value you can use <%=variablename%>

  • Step by Step Doc to Develop the JSP by using Jdev

    I am a newbie, i am looking for a setp by step doc. to tell how to start and compile the JSP by using JDev.
    chan.

    Hi Chan,
    You can check the 'Deploying Servlets and JSP' viewlet present at
    http://otn.oracle.com/products/jdev/viewlets/viewlet.html
    This viewlet explains how to start writing JSP and how to compile it using JDEV.
    You can even have a look at 'Working with JSP Tag Libraries' viewlet which helps to know how to use JDEV for JSPs. All the viewlets present in the page are very informative.
    Regards,
    Anupama

  • Error While Deploying the BPEL Process using obant script

    Hi All,
    I am getting the following error while deploying the BPEL Process using obant script. we are using the BPEL Version 10.1.2.0.2.Any information in this regard will be really helpful.
    Buildfile: build.xml
    main:
    [bpelc] file:/home5102/dibyap/saravana/Test/CreditRatingService.wsdl
    [bpelc] validating "/home5102/dibyap/saravana/Test/CreditRatingService.bpel" ...
    BUILD FAILED
    /home5102/dibyap/saravana/Test/build.xml:15: ORABPEL-01002
    Domain directory not found.
    The process cannot be deployed to domain "default" because the domain directory "/opt02/app/ESIT/oracle/esit10gR2iAS/BPEL10gR2/iAS/integration/orabpel/domains/default/deploy" cannot be found or cannot b
    e written to.
    Please check your -deploy option value; "default" must refer to a domain that has been installed locally on your machine.
    Total time: 23 seconds
    dibyap@ios5102_ESIBT:/home5102/dibyap/saravana/Test>
    Thanks,
    Saravana

    In 10.1.2.0.2 you need to create your own build.xml
    I have found an example, it may be of some help. This does call a property file
    cheers
    James
    <?xml version="1.0" ?>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Run cxant on this file to build, package and deploy the
    ASB_EFT BPEL process
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <project name="ASB_EFT" default="main" basedir=".">
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Name of the domain the generated BPEL suitcase will be deployed to
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <property name="deploy" value="default" />
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    What version number should be used to tag the generated BPEL archive?
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <property name="rev" value="1.0" />
    <!-- BPEL Best Practices Properties -->
    <!-- Defaults Properties for TARGET environments
    # CHANGE THIS FILE TO REFLECT THE TARGET ENVIRONEMNT
    # either dev, test, or prod.properties
    -->
    <property file="ebusd.properties"/>
    <property name="env" value="${env.name}"/>
    <property name="current.project.name" value="${project.name}"/>
    <property name="target.project.name" value="${project.name}_${env}"/>
    <property name="deployment.profile" value ="${env}.properties"/>
    <property name="source.development.directory" location="${basedir}"/>
    <property name="target.env.directory" location="${basedir}/deploy/${project.name}_${env}"/>
    <property file="${deployment.profile}"/>
    <property name="build.fileencoding" value="UTF-8"/>
    <!-- Prints Environment
    -->
    <target name="print.env" description="Display environment settings">
    <echo message="Base Directory: ${basedir}"/>
    <echo message="Deployment Profile: ${deployment.profile}"/>
    <echo message="target.env.directory: ${target.env.directory}"/>
    <echo message="Deploy to Domain: ${deployToDomain}"/>
    <echo/>
    <echo message="os.name: ${os.name}"/>
    <echo message="os.version: ${os.version}"/>
    <echo message="os.arch: ${os.arch}"/>
    <echo/>
    <echo message="java.home: ${java.home}"/>
    <echo message="java.vm.name: ${java.vm.name}"/>
    <echo message="java.vm.vendor: ${java.vm.vendor}"/>
    <echo message="java.vm.version: ${java.vm.version}"/>
    <echo message="java.class.path: ${java.class.path}"/>
    <echo/>
    <echo message="env: ${env}"/>
    <echo message="current.project.name: ${current.project.name}"/>
    <echo message="target.project.name: ${target.project.name}"/>
    <echo message="server.name: ${server.name}"/>
    </target>
    <!--
    Copies the current directory structure along with
    all the file into the target.env.directory and
    change the name of the project
    -->
    <target name="create.environment">
    <copy todir="${target.env.directory}">
    <fileset dir="${basedir}"/>
    <filterset begintoken="@" endtoken="@">
    <filtersfile file="${deployment.profile}"/>
    </filterset>
    </copy>
    <move file="${target.env.directory}/${current.project.name}.jpr" tofile="${target.env.directory}/${target.project.name}.jpr"/>
    </target>
    <target name="main">
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    the bpelc task compiles and package BPEL processes into versioned BPEL
    archives (bpel_...jar). See the "Programming BPEL" guide for more
    information on the options of this task.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <bpelc input="${basedir}/bpel.xml" rev="${rev}" deploy="${deploy}" />
    </target>
    </project>
    here is a property file
    project.name=ASB_EFT
    env.name=ebusd
    deployToDomain=default
    server.name=[server]
    server.port=7788
    ebusd\:7788=http://[server]:7788/
    IntegrationMailAccount=OracleBPELTest
    IntegrationMailAddress=[email]
    IntegrationMailPassword=[password]
    archivedir=[directory]
    inbounddir=/[directory]
    errordir=[directory]
    outbounddir=[directory]
    bpelpw=bpel
    dbhost1=[dbserver]
    dbhost2=[dbserver]
    dbport=1523
    dbservice=bpel
    dbconnstr=jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=YES)(FAILOVER=YES)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=[server])(PORT=1523))(ADDRESS=(PROTOCOL=tcp)(HOST=[server])(PORT=1523)))(CONNECT_DATA=(SERVICE_NAME=ebusd)))

Maybe you are looking for