Solved

add if statement

Posted on 2012-03-30
2
252 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
[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:
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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
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…

752 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