Click here to Skip to main content
15,896,557 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: As simple as I can make it Pin
Manfred Rudolf Bihy31-May-13 1:35
professionalManfred Rudolf Bihy31-May-13 1:35 
GeneralRe: As simple as I can make it Pin
#realJSOP1-Jun-13 2:24
professional#realJSOP1-Jun-13 2:24 
GeneralRe: As simple as I can make it Pin
Richard Deeming3-Jun-13 2:00
mveRichard Deeming3-Jun-13 2:00 
GeneralRe: As simple as I can make it Pin
#realJSOP5-Jun-13 8:56
professional#realJSOP5-Jun-13 8:56 
GeneralRe: As simple as I can make it Pin
Richard Deeming5-Jun-13 9:12
mveRichard Deeming5-Jun-13 9:12 
GeneralRe: As simple as I can make it Pin
#realJSOP5-Jun-13 10:54
professional#realJSOP5-Jun-13 10:54 
GeneralRe: As simple as I can make it Pin
Richard Deeming5-Jun-13 11:02
mveRichard Deeming5-Jun-13 11:02 
GeneralRe: As simple as I can make it Pin
#realJSOP6-Jun-13 2:54
professional#realJSOP6-Jun-13 2:54 
Well, I don't like doing it this way, but I am using what I call a stair-step approach:

JavaScript
function doIt()
{
    doStep1();

    this.doStep1 = function()
    {
        do something 
        do something
        $(img).load(function()
        {
            if (this.complete === true)
            {
                doStep2(img.naturalWidth)
            }
        });
    }

    this.doStep2 = function(width)
    {
        calc scale
        do other suff
        $(obj).dosomeOtherAsynchThing(function()
        {
            doStep3();
        });
    }

    this.doStep3 = function(width)
    {
        do something
        etc...
    }
}


Now that the image is actually being displayed, I can now try to finger out why the scale isn't being set as expected in the context.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997


QuestionNeed help with ajax request Pin
marcusKam27-May-13 0:03
marcusKam27-May-13 0:03 
AnswerRe: Need help with ajax request Pin
Dennis E White28-May-13 4:29
professionalDennis E White28-May-13 4:29 
GeneralRe: Need help with ajax request Pin
marcusKam29-May-13 10:29
marcusKam29-May-13 10:29 
GeneralRe: Need help with ajax request Pin
Dennis E White29-May-13 10:38
professionalDennis E White29-May-13 10:38 
GeneralRe: Need help with ajax request Pin
marcusKam29-May-13 10:43
marcusKam29-May-13 10:43 
AnswerRe: Need help with ajax request Pin
Jasmine250128-May-13 12:34
Jasmine250128-May-13 12:34 
Questiona little help for DragandDrop data transfer Pin
nomarkst23-May-13 21:32
nomarkst23-May-13 21:32 
QuestionRe: a little help for DragandDrop data transfer Pin
ZurdoDev24-May-13 8:29
professionalZurdoDev24-May-13 8:29 
SuggestionRe: a little help for DragandDrop data transfer Pin
Dennis E White24-May-13 16:54
professionalDennis E White24-May-13 16:54 
QuestionHelp for below java script Pin
abmanish7123-May-13 17:22
abmanish7123-May-13 17:22 
QuestionRe: Help for below java script Pin
ZurdoDev24-May-13 4:27
professionalZurdoDev24-May-13 4:27 
QuestionJavascript/jquery problem Pin
#realJSOP22-May-13 9:46
professional#realJSOP22-May-13 9:46 
AnswerRe: Javascript/jquery problem Pin
Dennis E White22-May-13 10:31
professionalDennis E White22-May-13 10:31 
GeneralRe: Javascript/jquery problem Pin
#realJSOP23-May-13 0:54
professional#realJSOP23-May-13 0:54 
GeneralRe: Javascript/jquery problem Pin
Dennis E White23-May-13 4:09
professionalDennis E White23-May-13 4:09 
GeneralRe: Javascript/jquery problem Pin
#realJSOP24-May-13 2:54
professional#realJSOP24-May-13 2:54 
GeneralRe: Javascript/jquery problem Pin
Dennis E White24-May-13 6:08
professionalDennis E White24-May-13 6:08 

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.