Javascript Warning

Posted on 2011-10-13
Last Modified: 2012-06-22
We have an option to select a radio button that will hide one div and show another div if clicked.   The client wants to add a warning that tells the end user that the data won't be saved in the hidden div.    

The code is attached - but what I need to do is if the person clicks cancel, nothing happens and if it if does, the div hides.    I tried moving the message code to the beginning and the cancel worked but the "oK" didn't, the div didn't hide.
showhide('#SL#_#GL#s'); showhide2('#SL#_#GL#d');GP_popupConfirmMsg('If you have values in the Detail section of #GL#, they will not be saved if Express mode is selected on save.');return document.MM_returnValue;

Open in new window

Question by:digitalwise
    LVL 17

    Expert Comment

    Show your showhide and showhide2 functions

    Accepted Solution

    Changed to alert instead of the option in the confirmmsg option.  

    Author Closing Comment

    It was a simple solution.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Adobe Dreamweaver CC 2015

    Adobe Dreamweaver Creative Cloud is used by web designers and front-end developers and allows you to visualize your site in real-time as you code. This course covers exam objectives for the Adobe Certified Associate (ACA) certification.

    A common challenge, or question, when working with two calendar dates is: What is the difference between the specified days? As is frequently the case, the answer is: It depends... What kind of difference do you want? Given two date obje…
    In my daily work (mainly using, I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now