Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

JSP save button and page message

  • 14-06-2007 2:44pm
    #1
    Registered Users, Registered Users 2 Posts: 1,559 ✭✭✭


    What Im trying to do is have a jsp page with a save button and when this save button is pressed the page shows a message which declares that "the data had been saved" and on the same page as where the button is.

    Is there anywhere I can find out how to do that as it involves both javascript and jsp?


Comments

  • Registered Users, Registered Users 2 Posts: 1,127 ✭✭✭smcelhinney


    Sounds as if you're looking for Ajax.

    You want server interaction without refresh? Im not sure how Ajax works with multipart form data.

    Google ajax multipart form data


  • Registered Users, Registered Users 2 Posts: 950 ✭✭✭jessy


    sounds like you need to call a javascript function when you click the button,

    from there all you need to to is display an alert.

    http://www.javascript-page.com/alert.html


  • Registered Users, Registered Users 2 Posts: 1,559 ✭✭✭quinnd6


    Nope Id prefer if it appeared at the top of the same page rather than an alert.
    I think thats the way Im supposed to do it.


  • Registered Users, Registered Users 2 Posts: 950 ✭✭✭jessy


    quinnd6 wrote:
    Nope Id prefer if it appeared at the top of the same page rather than an alert.
    I think thats the way Im supposed to do it.

    i see, so maybe you could use a hidden div tag? have a lookl here.

    http://builder.com.com/5100-6371-5035190.html


  • Registered Users, Registered Users 2 Posts: 1,559 ✭✭✭quinnd6


    There is some code that does a similar thing to what Im trying to do but it uses hidden input types to determine what actions are carried out.

    Im finding it hard to understand


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 950 ✭✭✭jessy


    it is definitely possible to do it that way, but perhaps a more simple way would be to write a Java script function and when the save button is clicked it calls this function which will do a document.write “your message.”


  • Registered Users, Registered Users 2 Posts: 1,559 ✭✭✭quinnd6


    ok I think its kinda working now.
    was looking through the code that was already there and copying what it did and working through the errors.

    What I need to do now is have the radio button update so that when you go back into the same page it is at the same value it was set to previously.

    Im guessing theres a way of accessing and changing what radio button is lit up using javascript.

    I wonder hows that done?


  • Registered Users, Registered Users 2 Posts: 950 ✭✭✭jessy


    quinnd6 wrote:
    Im guessing theres a way of accessing and changing what radio button is lit up using javascript.

    I wonder hows that done?

    heres some help http://javascript.internet.com/page-details/evaluation-radio-buttons.html


Advertisement