Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

add if statement

Posted on 2012-03-30
2
Medium Priority
?
256 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:Seven price
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 40

Accepted Solution

by:
Gurvinder Pal Singh earned 1600 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:Seven price
ID: 37787879
cool thanks
0

Featured Post

Docker-Compose to Simplify Multi-Container Builds

Our veteran DevOps Author takes you through how to build a multi-container environment, managed with a single utility in order to simplify your deployments.

Question has a verified solution.

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

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
This article discusses how to implement server side field validation and display customized error messages to the client.
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…

722 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