Timers for button in jsp?

Hello,
I am farily new to JSP and I want to know if it is possible to add a timer event (complete with actionlistener for button and for the timer) for a button created in the jsp page. ie I have a button created as:
<INPUT ID="Button1" TYPE="BUTTON" VALUE="something" ONCLICK="doSomething()">
(doSomething is writing some data to file say abc.txt)
IN addition to this doSomething function I would also like to start a timer to write timestamp into abc.txt about every 10 min.
can it be done? pls help me ....
thanks.

Nope - not with java.
A JSP is a java SERVER page.
The java bit of the code runs on the server, and builds an HTML page, which it sends back to your browser.
From that point on, you just have a standard web page - you can't run any code on the client.
Listeners, timers etc etc on the CLIENT side have to be done in javascript, which is a totally different language.
Cheers,
evnafets

Similar Messages

  • Foreground image for buttons on jsp

    Is it possible for me to create a button with an image on it in the jsp editor. You can do it for a link by dragging and dropping the image on the visual editor.

    Hi,
    HTML, and thsi is what JSP generate, doesn't support iconic buttons
    Frank

  • I have a button in JSP page inside an UIWebView by pressing the button i want to run another existing iPhone native application in background only.Do anyone have a solution for this.

    I have a button in JSP page inside an UIWebView by pressing the button i want to run another
    existing iPhone native application in background only.Do anyone have a solution for this.

    Sounds like a virus.... I hope it's not...
    Launching Other Apps within an iPhone

  • How to create multiple toolbar buttons in jsp ?

    hi all,
    how to create multiple toolbar buttons in jsp ?
    plz help me

    mgmt
    plzhttp://www.catb.org/~esr/faqs/smart-questions.html#writewell
    How To Ask Questions The Smart Way
    Eric Steven Raymond
    Rick Moen
    Write in clear, grammatical, correctly-spelled language
    We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding (often enough to bet on, anyway). Answering questions for careless and sloppy thinkers is not rewarding; we'd rather spend our time elsewhere.
    So expressing your question clearly and well is important. If you can't be bothered to do that, we can't be bothered to pay attention. Spend the extra effort to polish your language. It doesn't have to be stiff or formal ? in fact, hacker culture values informal, slangy and humorous language used with precision. But it has to be precise; there has to be some indication that you're thinking and paying attention.
    Spell, punctuate, and capitalize correctly. Don't confuse "its" with "it's", "loose" with "lose", or "discrete" with "discreet". Don't TYPE IN ALL CAPS; this is read as shouting and considered rude. (All-smalls is only slightly less annoying, as it's difficult to read. Alan Cox can get away with it, but you can't.)
    More generally, if you write like a semi-literate b o o b you will very likely be ignored. So don't use instant-messaging shortcuts. Spelling "you" as "u" makes you look like a semi-literate b o o b to save two entire keystrokes.

  • Print button in JSP

    Is it possible to create a PRINT button in JSP which will also "shrink-to-fit" the page too when printing?
    i'm new to JSP as some people know... thank you

    the system im making is for people with very small knowledge of computers and wouldnt know how to shrink to fit a page in print preview... so i want to create a button on the website which will do this for them

  • Working with two buttons in jsp

    hi
    My working with jsp's in struts.
    I have a jsp with two buttons "Save" and "Delete".
    My requirement is, on clicking either the "save button" or "Delete button" in jsp, it should call the corresponding code in the Action class.
    wht is the logic required to call the corresponding code in the Action class ?
    Thanks

    hi
    Thanks nani and jHyena for ur reply , but its not working, can u tell me where i went wrong, how to set them in jsp and action class.
    This is my Action class
    public class EditUserDetailsAction extends Action {
          * Generated Methods
          * Method execute
          * @param mapping
          * @param form
          * @param request
          * @param response
          * @return ActionForward
         public ActionForward execute(ActionMapping mapping, ActionForm form,
                   HttpServletRequest request, HttpServletResponse response) throws DaoException {
                   System.out.println("---------------in execute() befor try/catch-----------");
    //**************************the problem is here calling in if()/else, how should i call i?**************      
          if() {
                    try{
                        EditUserDetailsForm editUserDetailsForm = (EditUserDetailsForm) form;
                        System.out.println("------------ execute()-----------------");
                        DaoImplementer daoImpl = new DaoImplementer();
                        Integer editUid       = (Integer) editUserDetailsForm.getUser_Id();
                        String editName       = (String)  editUserDetailsForm.getName();
                        String editTitle      = (String) editUserDetailsForm.getTitle();
                        String editEmail      = (String) editUserDetailsForm.getEmail();
                        Integer editTelephone = (Integer) editUserDetailsForm.getTelephone();
                        String  editUserName  = (String) editUserDetailsForm.getUserName();
                        String editPassword   = (String) editUserDetailsForm.getPassword();
                        daoImpl.registerUser(editUid, editName, editTitle, editEmail, editTelephone, editUserName, editPassword);
                        System.out.println("------------sent to model components---------------");
                        System.out.println("----------forwarding to edituserdetail.jsp----------");
                        return mapping.findForward("editUserDetails");
                   catch (Exception e) {
                        System.out.println("@@@ ---Exception in EditUserDetailsAction class--@@@@");
                        throw new DaoException("Error adding userDetails: ",e);
                   return mapping.findForward("addUserDetails");
    Here is the jsp
    <html:html locale="true">
      <head>
        <html:base />
        <title>editUserDetails.jsp</title>
        <script type="text/javascript">
             function save_display(){
                  var x = confirm("Save: Are you sure ?")
                  if( x == true ){
                       confirm("Save: OK")
                  else{
                       text("Save: Cancelled")
             function delete_display(){
                  var y = confirm("Delete: Are you sure ?")
                  if( y == true ){
                       confirm("Delete: OK")
                  else{
                       alert("Delete: Cancelled")
             function funSave(){
                  document.form[0].ID.value = id;
                  form[0].ID.value.action="<%=request.getContextPath()%>/division/editDesignation.app?save=save";
                   form[0].ID.value.method="post";
                   form[0].ID.value.submit();
             function funDelete(){
                  function funSave(){
                        document.form[0].ID.value=id;
                        form[0].ID.value.action="<%=request.getContextPath()%>.app?save=save";
                        form[0].ID.value.method="post";
                        form[0].ID.value.submit();
        </script>
         <meta http-equiv="pragma" content="no-cache">
         <meta http-equiv="cache-control" content="no-cache">
         <meta http-equiv="expires" content="0">   
         <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
         <meta http-equiv="description" content="This is my page">
         <!--
         <link rel="stylesheet" type="text/css" href="styles.css">
         -->
      </head>
      <body>
      <html:javascript formName="editUserDetailsForm"/>
      <html:form action="/editUserDetails" onsubmit="return validateEditUserDetailsForm(this);">
                   user_Id : <html:text property="user_Id"/><html:errors property="user_Id"/><br/>
                      name : <html:text property="name"/><html:errors property="name"/><br/>
                     title : <html:text property="title"/><html:errors property="title"/><br/>
                telephone : <html:text property="telephone"/><html:errors property="telephone"/><br/>
                     email : <html:text property="email"/><html:errors property="email"/><br/>
                 userName : <html:text property="userName"/><html:errors property="userName"/><br/>
                 password : <html:password property="password"/><html:errors property="password"/><br/>
                           <html:submit property="save" value="Save"  onclick ="funSave()"/>
                           <html:cancel property="delete" value="delete" onclick="funDelete()"/>
      </html:form>
      </body>
    pls let me know how to set the hidden variables within the  above jsp .
    and  in Action class how to call it.
    I would be very thankful to u guys.
    Thanks

  • Using submit button in jsp to set a boolean value

    Hello,
    any help would be much appreciated.
    I have put the following submit button in jsp:
    <TR>
    <TD ALIGN=CENTER><INPUT TYPE="SUBMIT" NAME="next" VALUE="Next"></TD>
    </TR>
    I have then put the following java code in:
    <%
    boolean next = (request.getParameter("next") != null);
    session.setAttribute("next", next);
    boolean previous = (request.getParameter("previous") != null);
    session.setAttribute("previous", previous);
    int row = 1;
    session.setAttribute("row", row);
    %>
    now I expected when user hit next button and jsp was forwarded to another jsp that when I did the following:
    //get session attributes for next/previous action from previous jsp
    boolean next = (Boolean) session.getAttribute("next");
    boolean previous = (Boolean) session.getAttribute("previous");
    int row = (Integer) session.getAttribute("row");
    that the boolean next would be set to true, but it is set to false and I do not understand why?
    Can somebody help please?
    Cheers Joe.

    One reason i see you are getting false is that the default value for a boolean type is false and your code doesn't set it to true . So whatever be the page Next or previous , It would be set to false.. Try doing something like
    boolean next=true;
    next=request.getParameter("next");
    if(next.equals(""))
    // Your Business Logic goes here.
    Hope this helps.

  • Portalapp.xml for Button Example

    HI,
    How to write Portalapp.xml file for Button Example?
    Project Name: Button
    src.core - > bean -> ButtonBean, ButtonExample.
    ButtonExample extends PageProcessorComponent.
    Button.jsp is jsp file.
    I wrote Portalapp.xml file like this:
    <?xml version="1.0" encoding="utf-8"?>
    <application>
        <application-config>
            <property name="SharingReference" value="com.sap.portal.htmlb"/>
      </application-config>
    <components>
      <component name="Button">
          <component-config>
               <property name="ClassName" value="Button.Button"/>
               <property name="SecurityZone" value="com.sap.portal.pdk/low_safety"/>
             </component-config>
          <component-profile>
               <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-profile>
        </component>
    </components>
    </application>
    The output throws some exception.
    How to modify the above code? Also where can I see the log file?
    Please guide me
    Regards,
    Ravi.

    Hi Ravi,
    You can change the code under dist/portalapps.xml, In the Outline View select the components you need to change by Right selecting it. Do changes according to your requirements.
    Award Points
    Cheers
    Venkat

  • Type of listener needed for buttons ? please help

    hi
    does anyone know what type of event or listener one should
    include for buttons in a web page which has been downloaded
    into a JEditorPane. i have been able to get a web page
    onto my JEditorPane and can even follow most of the hyper links
    by implemmeting hyperlinklistenter.
    but i am not able to do the same for butttons
    ie for eg in google web site i am not able to get anythinh
    by clicking on button .

    This is not easily dooable, You're talking about form submit buttons, which the Default HTMLEditorKit does not support. Even worse, the LinkController class is not overridable, which is a bad design on sun's part.
    You'd have to create your own EditorKit, me thinks, and use that for text/html.
    Not an easy job, but you could cheat off the HTMLEditorKit source.

  • How to find function code for buttons on toolbar in oops alv

    Hi experts,
    I want to remove some buttons from toolbar in oops alv, i know the procedure like get function code and pass the value in a table and pass that table to IT_TOOLBAR_EXCLUDING of
    method set_table_for_first_display but I WANT TO KNOW HOW TO FIND FUNCTION CODE FOR BUTTONS ON TOOLBAR IN OOPS ALV

    Hi Prakash,
    -->First you have to set the pf status in your alv program by,
    {FORM pf_status USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'FIRST'.
    ENDFORM.                    "PF_STATUS}
    -->Pass this Subroutine name in the Function module, Reuse_alv_grid_display's parameters i.e,
          i_callback_pf_status_set          = 'PF_STATUS'}
    *-->Then doble click on that pf status,
    From the menu bar, select Extras->Adjust Template->List Viewer,
    This will give you the existing statndard gui status of the program*
    ->Then catch that function codes in the User command Parameter of the Function module Reuse.. i.e,
          i_callback_user_command           = 'COMM'
    And make a subroutine of the name 'COMM'i.e,
    FORM comm USING ucomm LIKE sy-ucomm selfield TYPE slis_selfield.
      DATA: okcode TYPE sy-ucomm.
      okcode = ucomm.
      CASE okcode.
        WHEN 'REF'.
        CALL FUNCTION 'POPUP_TO_INFORM'
          EXPORTING
            titel         = 'MANSI'
            txt1          = 'CREATED BY'
            txt2          = SY-UNAME
          TXT3          = ' '
          TXT4          = ' '
    endcase.
    Hope it helps you
    Regrds
    Mansi

  • To open a window & html page at a time on a single button, in JSP.

    Hello!
    I want to open 1 window as well as i want to open 1 html page on a single button click at a same time, in JSP.
    on button's "action" event i am opening the html page and button's "onclick" event i am opening the window, but it is not showing these 2 actions at a time. only window gets open when i click the button.
    [Also on form's "action" event i am having validate() function.]
    how do i open a window & html page at a time on a single button, in JSP?
    I don't know how to do this. I have stuck over here, if anyone is having any solution, please let me know.
    I need your help.
    Thank You.

    write js as
    window.open(page, "Popup", windowprops);
    windowprops = "height="+hi+",width="+wd+",top="+ wint +",left="+ winl +",location=no,"
              + "scrollbars=yes,menubars=no,toolbars=no,resizable=no,status=yes";
              encapsulate this in one function and call that function on button click event !!

  • Setting icon for buttons in labview 6i

    Hi All,
    Currently i am working on Labview 6i. i created two buttons in my vi one button is used to perform the test, another will be used to exit from the test. i would like to add icons for those buttons. can anyone tell me how to add icons for buttons.
    Thanks,
    kalpana

    You realize that LabVIEW 6.0 is at least 15 years old? That would be almost equivalent to working with a Windows 98 machine nowadays!
    Yes your picture can't be imported in LabVIEW 6.0 on my machine either. I haven't checked about all the details, but the LabVIEW import in 6.0 doesn't seem to work for png and gif images but only for bmp. Newer versions do work for your png file including honoring the transparency at least since version 7.1.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • t:inputFileUpload : problem with styleClass for button

    Hello,
    the component <t:inputFileUpload> has a field and a button. I want to add styleClass for button, but the styleClass into inputFileUpload tag works only for fields. Where can I add styleClass for button?
    Thank you in advance
    Manu

    Hello,
    I tried your suggestion, but it is not working.
    look the code:
    jsf
    <t:panelGroup styleClass="inputFile">
              <t:inputFileUpload value="#{interpreterDataImageHandler.uploadedFile}"
                   storage="file" accept="image/*" size="30"/>
                                  </t:panelGroup>css:
    .inputFile p{
         color:#5d0408;
         width:80px;
         margin-top:20px;
         border:1px solid #cacac4;
         background-color: #f87e39;
         }generated source:
    <span class="inputFile"><input type="file" size="30" accept="image/*" name="imageListForm:subimageUpload:_idJsp7"/></span>

  • InterMedia Java Classes for Servlets and JSPs and Netscape

    I am using the interMedia Java Classes for Servlets and JSPs to upload and retrieve multimedia data. I have found that it is much more performant in Internet Explorer (5.5) than in Netscape Communicator (4.7). In fact, I cannot upload images larger than 10K at all using netscape. However, the same image can be uploaded into the same application using IE. Is this a known issue?
    Thanks in advance.

    Hi,
    We have successfully uploaded multimedia data in the giga-byte range (Quicktime and AVI files) at the same speed with both the Netscape (4.7n) and MS IE (4.n and 5.n) browsers. One thing we have noticed is that its very important to set the manual proxy settings correctly if you have an environment with a proxy server. If you don't, then uploads can go via the proxy server and, for some reason, that seems to take considerably longer. For example, suppose you are in the www.xyzco.com domain and are connecting to a host named webserver.www.xyzco.com, then specify webserver and webserver.www.xyzco.com (to cover both cases) in the "Do not use proxy servers for..." box in the manual proxy server configuration screen. Also, if you're using a tool such as JDeveloper that uses the host IP address in the debugger environment, then you also need to add the numeric-based (nnn.nnn.nnn.nnn) IP address to this list.
    Hope this helps.
    In order to better understand the variety of ways in which our customers are using interMedia, we'd be very interested in knowing a little more about your application, the interMedia functionality that you are using, and how you are developing and deploying your application. If you are able to help us, please send a short email message with some information about your application, together with any comments you may have, to the Oracle interMedia Product Manager, Joe Mauro, at [email protected] Thank you!
    Regards,
    Simon
    null

  • Eclipse Plugins for Servlets and JSP.

    Hi Guys,
    Can any one suggest where i can get the eclipse plugins for Servlets and JSP. May i am wrong posting this question in this forum. I already browsed thru all the forum to get the info but in vain. so any help will be appreciated.
    Thank You,
    cheers,
    thrinath.j

    [url http://www.eclipse.org/webtools/]http://www.eclipse.org/webtools/
    Regards

Maybe you are looking for

  • Can I keep my Lightroom 3 catalog on a PowerMac hard drive with Apple Partition Map

    I want to keep my LR3 catalog on a HD in my Power Mac (Intel chip) that I had formatted and used to store my pre-LR3 photo folders on my G5 tower. The 1TB drive is half full, and was formatted as an Apple Partition Map. On swapping the drive into an

  • Not able to create new entry in RSADMIN Table

    Hi All,         I am going thru the OSS note 1275837  (Note 1275837 - PrecServer: process based load distribution (ABAP part)), as it recommends         add the entry "BWPREC_USE_NEW_LOAD" with value "X" in table "RSADMIN"       When I check in SE11

  • OpenType Glyphs

    Hi, I have a problem with my Glyphs in Pages. They show in Special Characters, but they don't actually end up on a page. What's up with that?? What can I do? Thanks, Marc

  • SLOW Login when Network Unavailable

    Hello all, this is my first post on Apple Discussions. I recently upgraded my MBP from OS X 10.4 to 10.5.4 Leopard. When I am at work and plugged into the network, everything runs fine. When I am home, however, OS X takes over 5 minutes to log me in.

  • Why won't my sisters computer load my iTunes in homeshare?

    my sisters itunes cant load my itunes music despite me being able to access hers. help please.