Solved

add if statement

Posted on 2012-03-30
2
247 Views
Last Modified: 2012-03-30
want to have in my jquery if integer < than 99 then do nothing else popup. like to add this to my syntax.

 function test(txt, id) {

        $("#dialog:ui-dialog").dialog("destroy");
        $("#dialog-form").html('You are adding a quantity of ' + txt + ', is this quantity correct?');
        $("#dialog-form").dialog({
            height: 120,
            width: 300,
            modal: true,
            buttons: {
                Yes: function() {
                   
                   // document.getElementById('ifrm').src = document.getElementById('ifrm').src;
                $(this).dialog("close");
              //  __doPostBack('UpdatePanel1', '');
                   
                },

                No: function() {
                    // $("#" + id).val($("#" + id).data("prevvalue"));
                document.getElementById('ifrm').contentWindow.text(id);

                    $(this).dialog("close");
                }

            }
        });
0
Comment
Question by:sevensnake77
2 Comments
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 400 total points
ID: 37787797
before this line
$("#dialog-form").dialog({

add this line

txt = parseInt(txt);
if ( txt < 99 )
{
   return false;
}
0
 
LVL 9

Author Closing Comment

by:sevensnake77
ID: 37787879
cool thanks
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

760 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