Solved

add if statement

Posted on 2012-03-30
2
248 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
custom jquery validation method 11 28
JavaScript Scope issue 4 40
Replace &lt; with < 14 56
Change text to radio button and calendar form 2 36
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
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)

867 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

16 Experts available now in Live!

Get 1:1 Help Now