Java script not working..help plzzzz

i am trying to do the following but not getting the result..help me plzzz
admin.jsp
<html>
<script language="JavaScript">
function compare()
var name1;
var pwd1;
var repwd1;
name1=name.value;
out.println(name1);
</script>
<body>
<%@ page language="java" import="java.sql.*,java.text.SimpleDateFormat,java.util.*" %>
<%
String staff=request.getParameter("staff");
if ("add".equals(staff))
%>
<p>Name<input type ="text" name="name" size="10"></p>
<p>Password<input type ="text" name="pwd" size="10"></p>
<p>Re-enter password<input type ="text" name="repwd" size="10"></p>
<p>Accesslevel<input type ="text" name="Name" size="10">
<input type="submit" name="b1" value=" Go " onClick="compare()">
<%}%>
</body>
</html>
i cannot pass the text value to the javascript function...why?..help me plzzzz.

This is not a javascript forum, but you may want to look up something called document.getElementById().

Similar Messages

  • Java script not working in firefox browser

    hi,
    I created my application in struts and it was running perfectly in Internet explorer. My application is a public facing application so now i am in need to run the application in Firefox and safari browsers.
    While running the application in those browsers i am facing the problem in javascript.
    function change() {
              if(document.usedCarSearchForm('usedCarSearchDto.blockCode').selectedIndex==0){
                   document.usedCarSearchForm.command.value="executeLoad";
                   document.usedCarSearchForm.submit();
              }else {
                   document.usedCarSearchForm('usedCarSearchDto.block').value=document.usedCarSearchForm ('usedCarSearchDto.blockCode').options[document.usedCarSearchForm('usedCarSearchDto.blockCode').selectedIndex].text;
                   document.usedCarSearchForm.command.value="executePrefectureLoad";
                   document.usedCarSearchForm.submit();
        }I am calling this onchange() function,
    document.usedCarSearchForm('usedCarSearchDto.blockCode').selectedIndex
    this line is not working
    Help me to resolve this issue.
    Thanks in advance.

    Hi,
    Atlast i found the solution. Its very small change, I changed document.usedCarSearchForm ('usedCarSearchDto.blockCode'). To
    document.usedCarSearchForm ['usedCarSearchDto.blockCode'].
    Now its working.
    I hope this will be useful.
    Thanks.

  • Java script not working in 1 pdf, but same script is NOT working in other

    Dear Experts,
    I have a problem with java script.
    I have created 2 PDFs with the same Form name and sub form names.
    I have written a javascript and this script seems to be working in one (Demand2.pdf) and NOT working in the other (Sample.pdf).
    The link for Demand2.pdf is
    https://acrobat.com/#d=XIydWx1RIU4oNdTySHtHfg
    and the link for sample.pdf is
    https://acrobat.com/#d=sKPRs2dtDY57RSvMVtnh3w
    Can you please guide me on this.
    Many Thanks
    BookFans

    Hi,
    The second file (Sample.pdf) is saved as Static. The script is changing the visual appearance of the form (showing and hiding objects). This requires the file to be saved as a Dynamic PDF. This is available in the save-as dialogue under the file name.
    Good luck,
    Niall

  • Java script not working

    Hi all
    I have a web dynpro abap application with an adobe interactive form. In the form I want to make certain fields read only. To do this I am using java script. It works fine from the livecycle designer in preview mode but when I run the wd4a nothing happens - like the java script is not being executed. I tried changing the Adobe form properties to Acrobat 8 (Dynamic) XML form but it still does not work. Any ideas?
    I'm using ALD 8.0, sapgui 710, Netweaver 7 SP 22 and IE8
    Regards

    Have you checked that you can see the access property, for example, with a message box?
    xfa.host.messageBox(xfa.form.D8.Page2.<my field>.access);
    Also try accesing the field directly
    <my field>.access = "readonly";
    Do you have any script working in your form?
    Regards, Aldo.
    Edited by: Aldo Velazquez on Dec 9, 2010 4:36 PM

  • Java script not working in JSP.

    Hi everyone
    I've got a problem with a java scipt that's not doing what I want it to do.
    I have a jsp which gets data from a database to display.
    On the jsp there is a "add" button which on click will open another jsp to add a contact, when I add the contact the jsp calls a web servlet which adds the contact to the database.
    After the contact is added the servlet directs the page back to the contacts page, and it must display the newly added contact in the jsp.
    I've configured a script that checks if there is a attribute called "addContact", if it has a value of "added" it must reload the page on load, which in turn will display the newly added contact, it refreshes but it doesn't display the newly added contact, it worked but after awhile it stopped working.
    Beneath is my code for the contact list jsp and the servlet.
    ContactList.jsp
    <?xml version="1.0"?>
    <%@ page import="contacts.Contacts"%>
    <%@ page import="java.util.*"%>
    <jsp:useBean id = "contactsData" scope = "page" class ="contacts.ContactsData"/>
    <html>
         <head>
              <title>Contact List</title>
              <script language=JavaScript>
              <!--
                   function clicked(clickedValue)
                        if(clickedValue == "add")
                             window.location = "AddContact.jsp";
              -->
              </script>
         </head>
              <%
              String refreshSession = (String)session.getAttribute("addContact");
              if(refreshSession != null && refreshSession.equals("added"))
              %>
              <body onload="window.location.reload(true);">
              <%
              session.removeAttribute("addContact");
              else
              %>
              <body>
              <%
              %>
              <h1>Contacts</h1>
              <form>
                   <table cellpadding="5">
                        <%
                             ArrayList contactList = contactsData.getContacts();
                             Iterator contactsIterator = contactList.iterator();
                             Contacts contacts;
                             while(contactsIterator.hasNext())
                                  contacts = (Contacts) contactsIterator.next();
                                  String contactName = contacts.getContactName();
                        %>
                                  <tr>
                                       <td><input type="radio" name="deleteContact" value=<%=contactName%>></td>
                                       <td><a href = "UpdateContact.jsp?paramName=<%=contactName%>"><%=contactName%></a></td>
                                       <td><%=contacts.getCompany()%></td>
                                       <td><%=contacts.getWorkNumber()%></td>
                                       <td><a href = "mailto:<%=contacts.getEmail() %>"><%=contacts.getEmail() %></a>
                                  </tr>
                        <%
                        %>
                   </table>
                        <br>
                        <input type="button" value="Add" onClick="clicked('add')"/>
              </form>
         </body>
    </html>NewContactServlet.java
    package contacts;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import contacts.*;
    public class NewContactServlet extends HttpServlet
         public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
              res.setHeader("Expires", "Tues, 01 Jan 1980 00:00:00 GMT"); //no cache allowed
              HttpSession session = req.getSession(true); //get current session
              String contactssession = (String)session.getAttribute("contactsSession");
              if(contactssession.equals("add"))
                   Contacts contacts = new Contacts();
                   ContactsData contactsData = new ContactsData();
                   contacts.setContactName(req.getParameter("contactName"));
                   contacts.setCompany(req.getParameter("companyName"));
                   contacts.setWorkNumber(req.getParameter("workNum"));
                   contacts.setCellNumber(req.getParameter("cellNum"));
                   contacts.setFaxNumber(req.getParameter("faxNum"));
                   contacts.setEmail(req.getParameter("email"));
                   contacts.setCountry(req.getParameter("country"));
                   contactsData.addContact(contacts);
              else if(contactssession.equals("add"))
              session.setAttribute("addContact","added");
              res.sendRedirect("ContactList.jsp");
    }

    Ren2407 wrote:
    Hi stevejluke
    Thanks for the reply.
    ContactsData stores the Contacts into a database, Access to be precise.
    The store of the Contacts works fine and it gets redirected to the ContactsList.jsp page, but I need to click refresh on the browser to see the new
    contact. I've tried to make it load automatically when the browser opens but it wouldn't, it worked before.
    I'm using Apache to host the webpage.I don't see any errors.So lemme get this straight:
    You have the contactsList.jsp which when Add is clicked you go to addContact.jsp in the same window. Then when addContact is submitted it goes to the neContact servlet which adds the contact to the database and then sends a redirect back to the contactsList.jsp.
    When contactsList.jsp is re-shown it doesn't display the new data so you are using javascript to force-refresh the page, which used to work, but doesn't anymore.
    My guess is that your browser or some proxy between your browser and server is caching the page. You have to tell all clients not to cache that page using META tags:
    <?xml version="1.0"?>
    <%@ page import="contacts.Contacts"%>
    <%@ page import="java.util.*"%>
    <jsp:useBean id = "contactsData" scope = "page" class ="contacts.ContactsData"/>
    <html>
         <head>
              <title>Contact List</title>
                    <meta HTTP-EQUIV="expires" CONTENT="0" />
                    <meta HTTP-EQUIV="Pragma" CONTENT="no-cache" />
                    <meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache" /> You could then get rid of your javascript refresh code altogether.
    p.s. I am a big fan of using JSTL. Try to get rid of all your scriptlets and replace it with JSTL. It would look something like this:
              <h1>Contacts</h1>
              <form>
                   <table cellpadding="5">
                        <c:forEach var="contact" items="${contactsData.contacts}">
                                  <tr>
                                       <td><input type="radio" name="deleteContact" value="${contact.name}"></td>
                                       <td><a href = "UpdateContact.jsp?paramName=${contact.name}">${contact.name}</a></td>
                                       <td>${contact.company}</td>
                                       <td>${contact.workNumber}</td>
                                       <td><a href = "mailto:${contact.email}">${contact.email}</a>
                                  </tr>
                        </c:forEach>
                   </table>
                        <br>
                        <input type="button" value="Add" onClick="clicked('add')"/>
              </form>

  • Java script not working in Answers

    Hi All,
    I have a problem with my Narrative report which contains Javascript.
    I need to show a checkbox (Checked or Unchecked) using a certain condition.
    This is showing correct output when am doing _"Preview Analysis"_ , but not in the _"Display Results"_ section and not even on the Dashboard.
    Am not really sure what is causing this behavior. Anyone kindly help me to get this report displayed properly on the dashboard.
    Thanks,
    Imtiaz.

    Hi,
    My advise, when ever you are writing javascript for a report. First place the report in the dashboard and then take the view source html code and then write your script accordingly. Because the code in the report and the code when placed in the dashboard always varies.
    Hope this helps.
    Regards
    MuRam

  • MY app world is not working HELP PLZZZZ

    Every time I creat bb ID It can't logon every time msg ' an error occured plz try again later ' I tried to make several ID s and logon but nothing happened. Plz help as I want to use it and not to be useless like this, plz if the solution is to redownload app world again tell me how to do this and how to delete the old one. , thanks in advace hope to solve m problem
    Cherry

    Yuppiiiiiiiiiiii , I JUST DID IT 
    this troubleshooting for BB 7 mine is curve9300 6 bundle 2475 can't be updated for 7 as it says " no updates available, it's up to date" .and the options > device doesn't contain anything related to the bb ID.
    I replaced the app on my device from www.blackberry.com/appworld/download with a newer version, proceed with rebooting. then BB identity is required to be installed
    it will ask for rebooting or restarting  just proceeeed 
    IT WORKS 
    Thanks ,,,
    Cherry

  • Refreshing java script not working properly

    Hello
    i am using two frames in my system and one is top and other is main.The top frame contains the link and the main frame displays data according to the clicked link.When i refresh the page i will reach to the lending page of my website .but when i did the right click my top frame get refresh it shows the menu of the lending page but my main frame stiill shows the same page from which the refresh button is pressed .
    So what i want to know that do what needs to include to make my right click to work as simillar as refresh button

    Frames are soo 1990. Throw away (better, burn away) that oldfashioned tutorial/book you've learnt the frames from.
    As you're already on JSP, just use jsp:include to include page fragments.

  • Java does not work at all upon using the update manager to update to firefox 3.6.10 for Ubuntu 9.0.4

    OS: Ubuntu 9.0.4
    Browser: Firefox 3.6.10
    upon updating to firefox 3.6.10, java does not work at all.
    websites that use java do not work at all anymore, when they worked just fine before the updating thru update manager. e.g. hulu website cannot play any of the shows.
    i can give the folder of bookmarked pages i tried.
    how to do that on here, i've yet to see if possible.
    i can even give saved text from the terminal concerning certain attempts.
    when i updated thru update manager, it gave some weird java plugin that wasn't there before "The IcedTea Web Browser Plugin IcedTea6 Java Web Browser Plugin (execution of applets on webpages)".
    i uninstalled this as instructed by an answer found in one of the pages i saved, cuz it was conflicting w/another java program the updater said i needed. right now, i don't remember for sure what it was. it perhaps was realplayer flash or Java itself. w/all the hours/days of searching i put in, it's difficult if not downright impossible for me to remember all the specifics of what i tried.
    i've searched throughout many webpages (including many searches on mozilla, ubuntu, java, etc) for instruction in fixing the problem.
    oh, and incidentally, on the Java site, when i try the verify test of Java, firefox pops up with that yellow bar right below the slew of tabbed website windows, giving the statement "additional plugins are required to display all the media on this page. (w/link to) install missing plugins ." which is what i do, go thru the requesting plugin installation. it comes up with, guess what, the IcedTea Java Plugin. i click on the 'next' in the "Plugin Finder Service" box that pops up, & all it gives me is "No plugins were installed. IcedTea ...Plugin failed. and the link 'find out more about plugins or manually find missing plugins'". the link takes me to some of the very things/plugins that wouldn't install in the first place. the Java test failure is a LOL funny, as what plugin it is saying is required (IcedTea) is a recommended alternate program to display the very test in the first place.
    i followed the given instructions on those many searched pages, in every case (barring what i may have just plain missed), but to no avail.
    i've even gone to the point of trying to reinstall the previous 3.5.13 firefox version, from mozilla site. even that wouldn't install.
    i've tried installing Java for my sys direct from it's site. nada.
    now it's time for me to post the problem & perhaps someone will come up with some kind of "dummy" way to fix it.
    until then many sites a regularly use are totally useless to me on this fast puter.
    the only way i can get to use such sites, are two choices: 1. use a dinosaur laptop, which is slower than molasses & cannot handle to any streaming stuff, or 2. use an available internet access puter at the library. but useage for ea person per day is limited to only one hour a day. and one can end up waiting for an hour or more ( in the busiest periods) to even get to use one.
    so, is there anyone at all, who knows any for-sure working fix for this problem?
    thanks muchly :^D
    p.s. i can't pay anybody any money for such help, as is required in certain sites (e.g. Java website), cuz i don't have any.
    i can pay in labor tho, if there is someway to find someone who can physically be at this puter w/me, taking me step-by-step
    sorry for the 20-pg essay. i hope it was all clearly understood. if, not, well, clear communication is always what is needed, ask away.

    Your above posted system details show outdated plugin(s) with known security and stability risks.
    *Shockwave Flash 9.0 r999
    Update the [[Managing the Flash plugin|Flash]] plugin to the latest version.
    *http://www.adobe.com/software/flash/about/
    In Firefox 3.6 and later versions you need the Next-Generation Java™ Plug-In present in Java 6 U10 and later (Linux: libnpjp2.so; Windows: npjp2.dll).
    http://java.com/en/download/faq/firefox_newplugin.xml
    See also http://java.sun.com/javase/6/webnotes/install/jre/manual-plugin-install-linux.html

  • Java 7 not working on OSX 10.8.3

    I need some help with Java 7.
    I am trying to open my photo lab software, however, it keeps giving me a message saying I need to download the Java Runtime Environment. I clicked on the link and it brought me to the Java site. I sucessfully download the software but it still doesn't work even though Java test show's it's working.
    I'm running OS X 10.8.3.
    I downloaded the softwared using Firfox don't know if that makes a difference.
    I've checked my Java setting and they all seem to be enabled. At this point I have not idea whats going on. I didn't have this problem before and can't figure out what to do.

    I had a similar problem running Java with OSX 10.8.3.  Even after performing the latest software update (including Safari 6.0.4) in addition to download and installation of the latest version of Java (version 7 update 21), Java did not work. And the “Java icon” was absent from the “system preferences” menu (should be at the bottom under the tab “other”). Very strange! But I found a solution: 1.) Go to “Library > Internet Plug-Ins”; 2.) Move all JavaAppletPlugins to trash (I moved “JavaAppletPlugin (1.7.10.18).plugin” and “JavaAppletPlugin.plugin”); 3.) Download and run the latest Java update; 4.) re-launch Safari.
    That solved my problem and I can run Java applications in Safari. Again......

  • Java Safari Not Working

    Hi all, I am running 10.4.11 with the new safari but now I believe my java is not working right anymore. I am getting the mug with arrows and no response when I try to upload photos onto places like facebook and costco. I have gone through the software update but it says I am all up to date. As well, I need to access the following site:
    http://www.cra-arc.gc.ca/esrvc-srvce/tx/ndvdls/myccnt/menu-eng.html
    and the following comes up...
    "Java applet unable to load"
    then..
    +On Macintosh Operating Systems:+
    +Mac OS X version 10.4.+
    +Browsers Supported:+
    +Safari 2.0.4 (Webkit 419.3 or higher).+
    +Apple JVM 1.4.2_07 to 1.4.2_16;+
    +Apple JVM 1.5.0_05 or higher.+
    +Safari 3.0.4 (Webkit 523.12 or higher).+
    +Apple JVM 1.4.2_07 to 1.4.2_16;+
    +Apple JVM 1.5.0_05 or higher.+
    Any help?

    Commiserating with you Seanifer - I cannot get Java-based Webinars (Citrix) to load either. As a test of a theory, I tried to load the same webinars in Firefox. It too didn't load - I suspect it's an issue specifically with Java and not necessarily with Safari.
    I too have all software updated - I'm running in Leopard v10.5.6, running Safari v3.2.1 and Java Web Start 12.2.0. Firefox v3.0.6
    We might want to begin with temporarily removing the plist for Java. Do you know how to do this (I do - I'm asking so as to know how detailed my assistance should be for you).
    I have the following Java components loading in this order:
    Java applet versions
    J2SE 5.0 32bit
    Java SE 6 64-bit
    J2SE 5.0 64bit
    J2SE 1.4.2 32-bit
    Java application versions
    J2SE 5.0 32bit
    Java SE 6 64-bit
    J2SE 5.0 64bit
    J2SE 1.4.2 32-bit
    I believe these are the "default" settings as seen in my Java Preferences panel.
    Rolling-up my sleeves on this one! Stay tuned.
    - mp

  • Java apps not working right

    I lately have found problems with Java apps not working correctly. For example, in Yahoo Widgets I cannot get any widget preferences to display; in Apple's Java Preferences for J2SE 5.0 the preference window opens but is blank; and in JBidwatcher the buttons are missing in main and preference windows.
    When I log in as another user I find all those apps work properly, so it seems to be something wrong within my User folder. I tried reinstalling the Java J2SE50ReIease4 but it didn't help. Is there something I can delete and/or reinstall to fix this problem?

    Ditto here,
    I made the mistake of thinking I could throw away the preferences in the Java folder and new pref's would automatically replace the missing pref's, much to my surprise no such thing happened. My settup is the same as yours, except my OS is 10.4.8.
    Someone please help.
    Thanks,
    BJZTX
    G5 D2GHz   Mac OS X (10.4.7)   G4 Notebook 10.3

  • Java currently not working, but was working previously. Change occurs around updates.

    I need Java to upload info to a GoDaddy website. Java was working in January, then did not work. It worked again after an update, then stopped working about the time of another Firefox update. Currently, Java is not working, but I am able to upload thru Internet Explorer. I seem to have the latest Java for Firefox installed, it is enabled so I am at a lost. Did an update not install properly? I am really at a lost since success and failure seem to be tied to Firefox updates.

    >
    You should be aware that this is a forum for discussion for Java developers. It is not an end user support forum.
    At any rate your issue is a problem with the site in question. "java.lang.NoClassDefFoundError: PChatPanel" means that resources the program needs cannot be found. This is a problem with that site and you will have to address it with them in order to resolve it. Nobody else can help you with this because it is a site problem and beyond our control.

  • Java update not working

    Java is not working. Already tried downloading Java 7 update. Java (Oracle) cannot verify that I have Java installed. Java does not show up in system prefrences even after download success screen, and shutting down all apps and computer. I checked console - var/log - install.log  Displaying 'Install Succeeded'
    Please help!
    Thanks!

    Simple drag-and-drop does not normally involve Java at all. How is the external HD formatted?
    The final Java update for Leopard was:
    Update 10, 29 June 2011 - This release updates J2SE 5.0 to 1.5.0_30, and updates Java SE 6 to 1.6.0_26. J2SE 1.4.2 is no longer being updated to fix bugs or security issues and remains disabled by default in this update. Support for out-of-process Java applets on Mac OS X 10.5 Leopard has been removed with this update.
    This release is only for Mac OS X 10.5.8 or later versions of Mac OS X 10.5. http://support.apple.com/kb/DL1359
    and for Snow Leopard:
    http://support.apple.com/kb/DL1360
    Note: Java 1.6 for Leopard is 64 bit only, but for Snow Leopard it is available for both 32 and 64 bit.
    http://www.roguish.com/blog/?p=266
    Since August 2012 updates for Java (and especially Java Runtime Environment, which is what you actually need) must now be downloaded direct from Oracle:
    http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1637588.h tml
    Further information here:
    http://www.oracle.com/us/corporate/press/1735645
    and their FAQ’s:
    http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/mac-faq.html
    However, if you need the Jave 6 JRE and plug-in, MadMAC0 has posted at
    https://discussions.apple.com/message/20107182?ac_cid=tw123456#20107182
    Apple has also posted (Oct 22/12) the approved solution for restoring the Java 6 plug-in:
    Java for OS X 2012-006: How to re-enable the Apple-provided Java SE 6 applet plug-in and Web Start functionality.

  • After upgrading to iOS 5 I cannot enter to mail (outlook exchange ),contact did not open, general settings - mail contact did not work.help me

    After upgrading to iOS 5 I cannot enter to mail (outlook exchange ),contact did not open, general settings - mail contact did not work.help me

    Hi,
    the settings are gone, i guess. But even worse, I cannot get the iPad2 to play Full HD thru the Apple digital AV adaptor using apps that support  (and advertise this), like AVPlayer HD. This definiteley used to work before one of the last iOS upgrades. (I am now at 5.1.1).

Maybe you are looking for

  • Multiple computers on a wireless network

    Hi, I'm new to iTunes and downloading music, so I apologize if my question seems odd. I have purchased about 50 songs on my desktop computer. My spouse has a laptop in the house -- we have a wireless router that connects us both. Is there a way for m

  • Itunes freezes when my Ipod is connected

    Whenever I plug in my ipod, my Itunes freezes. When it does resume running, it wont show my ipod. I know that it is connected becasue it appears under computer, but it wont appear in Itunes. Anyone know what to do? I am running Windows 7 64 bit.

  • Small CD Stuck in drive

    I had some software on a small CD , which I've inserted in to my Macbook . I know this was a mistake . The CD is stuck , but the macbook does not show anything in the drive . How can I remove the CD ? Thanks

  • Client in VB run on V8.1.7 but not in V9.2

    Hello, My client is a VB Application on Windows 2000/NT. The VB application runs on v8.1.7 oracle server database on AIX 4.3.3 but it does not run on v9.2 oracle server database. Can someone help me ? Is there a différence between V8.1.7 and V9.2 ora

  • Adding Custom 1 dimension to all Balance Sheet and all PL accounts

    We added the Custom 1 dimension to all Balance Sheet and all PL accounts. Previously we only had a the Custom 1 dimension added to a few PL accounts. Now it takes a very long time to consolidate and we are getting warnings in the log files as follows