Java Script help

Last post 11-25-2006 9:40 AM by NC01. 3 replies.

Sort Posts:

  • Java Script help

    11-24-2006, 11:21 AM
    • Loading...
    • kdkcchoco
    • Joined on 11-24-2006, 4:13 PM
    • Posts 3

    Hi

    I have a situation i need help with.I have a web page with save button.When i hit save the data from fields is saved into Data Base table via Stored Procedure and a Alert pop up confirms that the information has been saved.

    I need a little change here .After saving the information into DB rather than the alert pop up i need to add a pop up which asks if "you want to continue using same screen"  with Yes and No buttons.If hit yes i need to stya on same page and if no i need to goto a Home Page.

    Since i have very little knowledge of Java Script.Any help will be appreciated.

     

    Thanks

     

    Filed under: ,
  • Re: Java Script help

    11-24-2006, 1:37 PM
    • Loading...
    • ZLA
    • Joined on 06-22-2004, 3:28 PM
    • Posts 718

    javascript popup message is from the alert function as you are probably already using. To ask a ok, cancel question, use the confirm function. you can find examples on the web.

    HTH.

  • Re: Java Script help

    11-24-2006, 1:46 PM
    • Loading...
    • kdkcchoco
    • Joined on 11-24-2006, 4:13 PM
    • Posts 3

    Hi HTH

    Thanks for your reply.I am aware of fact that i need to use confirm function and this is what i am using

    RegisterStartupScript("startupScript", "<script language=JavaScript> if(!confirm('Check Saved.Do you want to enter another transaction?'){parent.right.location='home.aspx;}) </script>");

    Is this right?

    Thanks

    kdkcchoco

  • Re: Java Script help

    11-25-2006, 9:40 AM
    • Loading...
    • NC01
    • Joined on 08-26-2005, 3:33 PM
    • Posts 9,471
    • TrustedFriends-MVPs

    Check here as this code sample shows how to use a client-side confirm message box and send the value server-side.

    http://forums.asp.net/1257057/ShowThread.aspx#1257057

    NC...

     

Page 1 of 1 (4 items)
Microsoft Communities
Page view counter