Click here to Skip to main content
15,886,258 members
Home / Discussions / JavaScript
   

JavaScript

 
Questionhow make a skype call by getting a phone number from textbox Pin
Pasqualissimo23-Jun-13 12:20
Pasqualissimo23-Jun-13 12:20 
QuestionMSN style links Pin
Bart23-Jun-13 10:20
Bart23-Jun-13 10:20 
AnswerRe: MSN style links Pin
thanh_bkhn23-Jun-13 16:09
professionalthanh_bkhn23-Jun-13 16:09 
GeneralRe: MSN style links Pin
Bart25-Jun-13 10:22
Bart25-Jun-13 10:22 
QuestionHow to show info marker google maps when clicked in outside map? Pin
Akbarblack22-Jun-13 4:12
Akbarblack22-Jun-13 4:12 
AnswerRe: How to show info marker google maps when clicked in outside map? Pin
Dan Randolph23-Jun-13 8:55
Dan Randolph23-Jun-13 8:55 
GeneralRe: How to show info marker google maps when clicked in outside map? Pin
Akbarblack10-Dec-13 20:32
Akbarblack10-Dec-13 20:32 
QuestionShopping Cart Qty Button - I need to make it faster Pin
jkirkerx21-Jun-13 11:16
professionaljkirkerx21-Jun-13 11:16 
I wrote this script some time ago, it works fine on PC's, but on mobile devices, I need to optimize it and get it to run faster in speed.

So like on a iPhone 4, it takes about 3 seconds to run.on a PC it takes 1 second, which is slow.

Just looking for ideas or tips, or another set of eyes to check it out.

1. Confirms a value in the textbox, if not, textbox turns pink, and the error arrow shows
2. checks if it's a number
3. increments value.


function jquery_Add2Cart_Numeric_Up() {

    var vFlag = true;
    var txtFocus = $('[id*="_txt_Focus_Field"]').val();
    var txtError = $('[id*="_txt_Error_Field"]').val();
    
    var qty_value = $('[id*="_txt_Modal_Add2Cart_SelectQty"]').val();
    if (qty_value.length < 1) {
        $('[id*="_txt_Modal_Add2Cart_SelectQty"]').css('background-color', txtError);
        vFlag = false;
    }
    else if (qty_value.length > 0) {
        $('[id*="_txt_Modal_Add2Cart_SelectQty"]').css('background-color', txtFocus);

        var re_Qty = new RegExp("^([1-9]|[1-9][0-9]|[1-9][0-9][0-9])$")
        var txt_Qty = $('[id*="_txt_Modal_Add2Cart_SelectQty"]').val();
        var match_Qty = re_Qty.exec(txt_Qty);

        if (match_Qty == null) {
            $('[id*="_txt_Modal_Add2Cart_SelectQty"]').css('background-color', txtError);
            $('[id*="_lbl_Modal_Add2Cart_Center_Container_QtyMessage"]').text("Invalid Quantity!");
            $('[id*="_txt_Modal_Add2Cart_SelectQty"]').val("1");
            vFlag = false;
        }
        else if (match_Qty !== null) {

            $('[id*="_txt_Modal_Add2Cart_SelectQty"]').css('background-color', txtFocus).show();
            $('[id*="_lbl_Modal_Add2Cart_Center_Container_QtyMessage"]').text("Select your quantity:");

            var qty = parseInt($('[id*="_txt_Modal_Add2Cart_SelectQty"]').val());
            if (qty < 1000) {
                qty ++
                $('[id*="_txt_Modal_Add2Cart_SelectQty"]').val(qty);
            }
        }
    }
    
    return false;
}

AnswerRe: Shopping Cart Qty Button - I need to make it faster Pin
enhzflep24-Jun-13 11:19
enhzflep24-Jun-13 11:19 
GeneralRe: Shopping Cart Qty Button - I need to make it faster Pin
jkirkerx24-Jun-13 11:38
professionaljkirkerx24-Jun-13 11:38 
GeneralRe: Shopping Cart Qty Button - I need to make it faster Pin
enhzflep24-Jun-13 12:15
enhzflep24-Jun-13 12:15 
GeneralRe: Shopping Cart Qty Button - I need to make it faster Pin
jkirkerx24-Jun-13 12:33
professionaljkirkerx24-Jun-13 12:33 
GeneralRe: Shopping Cart Qty Button - I need to make it faster Pin
enhzflep24-Jun-13 12:53
enhzflep24-Jun-13 12:53 
QuestionJavascript, KnockoutJS (and possibly TypeScript) Pin
_Maxxx_19-Jun-13 18:32
professional_Maxxx_19-Jun-13 18:32 
AnswerRe: Javascript, KnockoutJS (and possibly TypeScript) Pin
AlphaDeltaTheta19-Jun-13 19:00
AlphaDeltaTheta19-Jun-13 19:00 
GeneralRe: Javascript, KnockoutJS (and possibly TypeScript) Pin
_Maxxx_20-Jun-13 1:29
professional_Maxxx_20-Jun-13 1:29 
GeneralRe: Javascript, KnockoutJS (and possibly TypeScript) Pin
AlphaDeltaTheta20-Jun-13 1:37
AlphaDeltaTheta20-Jun-13 1:37 
AnswerRe: Javascript, KnockoutJS (and possibly TypeScript) Pin
Payrok17-Jul-13 5:45
Payrok17-Jul-13 5:45 
GeneralRe: Javascript, KnockoutJS (and possibly TypeScript) Pin
_Maxxx_17-Jul-13 13:01
professional_Maxxx_17-Jul-13 13:01 
GeneralLooking for team Pin
ashkanpower17-Jun-13 23:03
ashkanpower17-Jun-13 23:03 
GeneralRe: Looking for team Pin
Richard MacCutchan17-Jun-13 23:35
mveRichard MacCutchan17-Jun-13 23:35 
GeneralRe: Looking for team Pin
ashkanpower18-Jun-13 0:49
ashkanpower18-Jun-13 0:49 
QuestionHTML issue with IE. Pin
InderK17-Jun-13 3:17
InderK17-Jun-13 3:17 
AnswerRe: HTML issue with IE. Pin
Richard Deeming17-Jun-13 4:46
mveRichard Deeming17-Jun-13 4:46 
GeneralRe: HTML issue with IE. Pin
InderK19-Jun-13 1:25
InderK19-Jun-13 1:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.