 |

|
Hi,
Below code is not working in IE-8 but it is working good in all other browsers. I am not able to understand what is wrong in this code as it is very simple one.
<a href="abc.htm" target="_blank;">Click here</a>
When I click on a link nothing happen. Please let me know how to fix this for IE.
Thanks in advance,
Inder...
|
|
|
|

|
InderK wrote: target="_blank;"
Try removing the semi-colon from the end of your target value.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|

|
I am trying to create a dynamic collapsible-set which would contain text and image. Texts are appearing fine but as soon as I try to write code (see commented line) for image, browser doesn't display it correctly. It takes 2-3 clicks to open the collapsible, and it gets stuck most of the time. Here is my code:
<pre lang="Javascript">
$("#dvAccordion").empty();
var outdiv = $('<div data-role="collapsible-set"></div>');
$(strXML).find('Category').each(function(){
var colldiv = $('<div data-role="collapsible" data-collapsed="true"></div>');
colldiv.append('<h3>' + $(this).find('Category_Name').text() + '</h3>');
var uldiv = $('<ul data-role="listview" data-inset="false"></ul>');
colldiv.append(uldiv);
$(this).find('Menu_Item').each(function(){
var sItemName = $(this).find('item_name').text() ;
var sImageUrl = "images/food1.jpg" ;
uldiv.append('<li><a href="menu.html" rel="external">' + sItemName + '</li>');
});
outdiv.append(colldiv);
outdiv.appendTo('#dvAccordion');
});
$('#dvAccordion').trigger('create');
Where am I wrong? If I try to generate the collapsible with listview and images static way in html - everything works fine.
jsFiddle - http://jsfiddle.net/yesprasoon/68v8p/
Surprisingly, images are appearing properly in fiddle. But it doesn't appear in my local file/ localhost address/ phonegap application.
modified 2 days ago.
|
|
|
|

|
I am generating a dynamic collapsible-set with listViews using XML data. It's generated correctly, but I need a click/touch event to display some data before it goes to another page. Here is my code:
$("#dvAccordion").empty();
var outdiv = $('<div data-role="collapsible-set"></div>');
$(strXML).find('Category').each(function(){
var colldiv = $('<div data-role="collapsible" data-collapsed="true"></div>');
colldiv.append('<h3>' + $(this).find('Category_Name').text() + '</h3>');
var uldiv = $('<ul data-role="listview" data-inset="false"></ul>');
colldiv.append(uldiv);
$(this).find('Menu_Item').each(function(){
var sItemName = $(this).find('item_name').text() ;
uldiv.append('<li data-name="baby"><a href="menu.html" rel="external">' + sItemName + '</a></li>');
});
outdiv.append(colldiv);
outdiv.appendTo('#dvAccordion');
});
$('#dvAccordion').trigger('create');
I am adding an eventListener on page load like this:
$('#dvAccordion ul').children('li').bind('vclick', function(e) {
alert('Selected Name=' + $(this).attr('data-name'));
});
Where am I wrong? If I try to write the same event listner after developing collapsible in static way in html - everything works fine.
jsfiddle - http://jsfiddle.net/yesprasoon/MvcHm/
modified 2 days ago.
|
|
|
|
 |
Message Automatically Removed
|
|
|
|

|
Java?
Post it elsewhere, Java has no connection to Javascript, and it doesn't qualify as a question either.
|
|
|
|

|
He's a spammer.
Use the best guess
|
|
|
|

|
ok.
|
|
|
|

|
I am developing a small html/js application where one window calls another , just to keep functionalities separated .
I need to reference , in the child window (opened with window.open (url....) etc) , an object, lets call it obj, defined in the opener.
I can correctly see, in the child window, all the methods, and all the properties with the values corresponding to the ones set in the opener. But when it comes to modify them, it looks like I am modifying a copy of the object : I send an alert in the child window to verify I correctly changed the value of the properties, but when debugging the parent (opener) window, it seems like those changes didn't happen at all, that is I see the old values.
I reference the parent's object, in the child window, as : self.opener.obj. I thought this represented a reference to the parent's object, but what's happening lets me think this is just a reference to a copy of that object, not the object itself.
Is it correct ?
|
|
|
|

|
Hello. I am attempting to create a small app that rotates images, with buttons to stop, slow or speed up the animation, or to start/reset.
The button functions work, but when they try to contact another function (setSpeed) or even use setTimeout or setInterval, those are ignored. Putting in other commands in those functions (e.g. window.alert("test") statements yields results, so I know it's doing something.
Any help would be much appreciated...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Animation</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<script type="text/javascript">
<!--
var myFx;
currImage = "pennant2.gif"; xName = "dhtmlFx";
speedVar = 500;
speedVal = 100;
maxVal = 1500;
stopSpeed = 99999;
var startFlag;
startFlag = 1;
y = speedVar;
function startMe()
{
startFlag = 1;
myFx = setInterval(doFx, speedVar);
}
function doFx()
{
currImageObj = document.getElementById(xName);
myText = document.getElementById("dhtmlText");
myText.textContent = y;
if (currImage == "pennant2.gif") {
currImageObj.src = "pennant1.gif";
currImage = "pennant1.gif";
} else {
currImageObj.src = "pennant2.gif";
currImage = "pennant2.gif";
}
}
function startThis()
{
if (startFlag == 0)
{
y=speedVar;
startFlag = 1;
setSpeed(y);
} else {
window.alert(startFlag + " Animation already started");
}
}
function slower()
{
y+=speedVal;
if (y>= maxVal )
{
y=maxVal;
}
startFlag = 1;
setSpeed(y);
}
function faster()
{
startFlag = 1;
y-=speedVal;
if (y<= 0 )
{
y=1;
}
if (y > maxVal)
{
y = maxVal;
}
setSpeed(y);
}
function stopThis()
{
startFlag = 0;
y = stopSpeed;
clearInterval(myFx);
}
function setSpeed(y)
{
clearInterval(myFx);
var myFx = setInterval(doFx,y);
}
</script>
</head>
<body onload="startMe();">
<img id="dhtmlFx" src="pennant2.gif" height="183" width="388" />
<div id="dhtmlText">0</div>
<form action="" name="animate" >
<input type="button" name="buttonStop" value="START" onclick="startThis();">
<input type="button" name="buttonStop" value="<<" onclick="slower();">
<input type="button" name="buttonStop" value=">>" onclick="faster();">
<input type="button" name="buttonStop" value="STOP" onclick="stopThis();">
</form>
</body>
</html>
Thanks!
modified 11-Jun-13 21:15pm.
|
|
|
|

|
I am assuming that you are trying to change the image based on some interval that you can control via user input. The initial image is most likely coming up but not the other.
The reason is because the second image has not been loaded.
You can either write some code to load the image or you can "stack" the two images and control their visibility via a style/css setting that you adjust during your interval calls.
Best of luck.
you want something inspirational??
|
|
|
|

|
Hi there, I think there is a problem when you call setSpeed():
You clear interval by calling
clearInterval(myFx);
This is the global myFx, but when you set a new interval, you return to a local variable
var myFx = setInterval(doFx,y);
If you remove the "var" in order to use the global myFx variable, the problem should be resolved.
myFx = setInterval(doFx,y);
|
|
|
|

|
Removing the redundant var fixed everything, I can't believe I hadn't noticed that...
Thanks much!
|
|
|
|

|
Please answer for PHP
selecation is like
cse
mech
other
when other is selected textbox should have to be appere
|
|
|
|

|
Hi All,
How do I send data from a regular html page to an asp.net application using a button without requiring the user to enter anything into a textbox? All I want to do is use javascript to send a number or a string to an asp.net application when a button within an html form is clicked. Thanks in advance.
|
|
|
|

|
I can't speak for all the people who helps on these message boards but reposting the same question will sometimes get you ignored.
Hopefully my latest response on your previous post helps.
As I tried to mention in both posts this question is best directed towards the ASP.Net forum.
Best of luck.
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|

|
Hi All,
I am using javascript to create a ActiveXObject. It runs well in one system. but after host it in IIS 7, when i run it from other computers ( http://ipaddress/sitenm) it can not create a ActiveXObject.
|
|
|
|

|
you are most likely running into security errors.
what exactly is the error you are creating when trying to create it??
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|

|
Thank u very much. There is no any error message, it runs well, problem is that it cant create ActiveX Obect. i tested the javascript code by giving alert message, the alert messages are comming, but the .exe which i am trying to call througt ActiveX Obeject cant create. i already done with all the settings in Internet Option in IE. (it runs well in one system and ActiveX Object is also created, but when i am trying to access it from other system it unable to create)
|
|
|
|

|
either,
a. ActiveXObject exists on the other machine but it hasn't been registered (using regsvr32)
or
b. ActiveXObject isn't on the remote machine at all and can't be registered until it does exist there
|
|
|
|

|
Hi All,
I am trying to send the value of the ID or Name attribute of an html form to ASP.net when the form button is clicked. Normally I would send data using textboxes, checkboxes, or radio buttons. I can also send values through the url but that is not safe. All I want to have on a form is the button and when it is clicked, send the value of the form's id attribute or form's name attribute to asp.net. The value of the id or name attribute will be generated using javascript at run time and not seen before the button on the form is clicked. Please give an example if you can, thanks in advance.
modified 7-Jun-13 23:26pm.
|
|
|
|

|
First this question is probably best posted in the ASP Forum.
I am assuming that the button is an <asp:Button .../> and that you are handling that in a POST. If that is the case my recommendation would be stuff the value a textbox whose value is server readable. I might be entirely wrong but I believe the form tag is server rendered in ASP.Net in which case you don't want to mess with the name or the id because it could have a negative impact on the page gets marshaled back into code on the server.
As I said in the beginning this question is best if posted in ASP Forum.
Best luck.
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|

|
Hi, thanks for your reply. Can't the button be a regular HTML button that uses a javascript function to send the values of the id or name attribute?
|
|
|
|

|
ASPnoob wrote: Can't the button be a regular HTML button that uses a javascript function to send the values...
Yes.
Again more directed towards the ASP.Net forum. The following article should help you get you started in the right direction towards what you are looking to do.
Calling Server Side Code from Client Side using Ajax[^]
Best of luck.
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|

|
Here's the code I ended up with (explanation follows code).
HTML (you may have to adjust for the versions of jquery and modernizr you're using):
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" src="../Scripts/modernizr-2.6.2.js"></script>
<script type="text/javascript" src="../Scripts/jquery-2.0.0.js"></script>
<script type="text/javascript" src="TreeOfHope/jscripttest.js" ></script>
</head>
<body>
<div id="canvasesDiv" style="position:relative; width:490px; height:356px; border:1px solid black; background-color:silver;"></div>
<!-- what the image is supposed to look like -->
<div id="testImage" style="width:490px; height:356px; border:1px solid black; background-color:silver;">
<img src="http://paddedwall.org/2012mustang/images/blacklights_03.jpg" width="490px" height="356px;" alt="" />
</div>
<script type="text/javascript" >
$(document).ready(function()
{
doIt();
});
</script>
</body>
</html>
Javascript (jscripttest.js):
function doIt()
{
var _filename = "http://paddedwall.org/2012mustang/images/blacklights_03.jpg";
var _divName = "#canvasesDiv";
var _sceneWidth = $(_divName).width();
var _sceneHeight = $(_divName).height();
var _scaleX = 1.0;
var _scaleY = 1.0;
var _canvas = null;
var _context = null;
var _image = $('<img />')
.attr(
{
'id' : 'backgroundImage',
'src' : _filename
})
.css(
{
'-ms-interpolation-mode' : 'bicubic',
'image-rendering' : 'optimizeQuality'
})[0];
$(_image).load(function()
{
if (this.complete === true)
{
Continue($(this)[0].naturalWidth, $(this)[0].naturalHeight)
}
});
this.Continue = function(imgWidth, imgHeight)
{
_scaleX = _sceneWidth / imgWidth;
_scaleY = _sceneHeight / imgHeight;
_canvas = $("<canvas>Not html5-compatible</canvas>")
.css(
{
'position': 'absolute'
,'top' : 0
,'left' : 0
,'z-index' : 0
,'display' : 'inline'
})
.attr(
{
'id' : 'backgroundCanvas'
,'width' : _sceneWidth+"px"
,'height' : _sceneHeight+"px"
});
$(_divName).append($(_canvas)[0]);
_context = $(_canvas)[0].getContext('2d');
_context.setTransform(_scaleX, 0, 0, _scaleY, 0, 0);
_context.drawImage(_image, 0, 0);
}
}
The first problem was determining the actual "natural" size of the image. I had to put a call to subsequent code inside the call to image.load.
The second problem involved scaling the image to fit the desired size. Originally, I was using the jquery object's css() method to set the size of the canvas. When you do it that way, the canvas does not properly transform/scale. You MUST set the width and height as attributes in order to get scaling to work correctly.
Maybe this will help someone else in the future.
".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
|
|
|
|

|
very cool... you should write an article on this.
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|

|
Hello all,
How to invoke Code behind method and java script function
on check box change event
|
|
|
|

|
sujeet321 wrote: How to invoke Code behind method and java script function on check box change event
I am not sure what you meant by code behind... I am guessing ASP.NET in which case I would recommend you post this question in that forum.
I wrote this[^] quick sample on jsFiddle which does a simple jQuery setup to handle when a checkbox is selected.
http://jsfiddle.net/xehmr/[^]
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|

|
Hi, i have a problem.
i want to send a callback function with params.
and every time to send different params.
the problem is that the callback function recive all the time
the same values of the last iteration of the loop-
how can i solve this problem?
thnks!
function B(a,b)
{
alert(a + b);
}
function A()
{
for(var i = 0;i < Z ; i++)
{
for(var j = 0;j < Z ; j++)
{
var temp = function() {return function(){B(i,j)}};;
func(temp);
}
}
}
|
|
|
|

|
So where is func defined? where is Z defined?
What is your code supposed to do exactly?
here's some code.
function add(a,b)
{
alert(a + b);
}
function mult(a,b)
{
alert(a * b);
}
var o = { func : function(f, x,y) { return f(x,y); }};
function A(Z)
{
for(var i = 0;i < Z ; i++)
{
for(var j = 0;j < Z ; j++)
{
o.func(add, i,j); }
}
}
.
|
|
|
|

|
I would think you could debug and step through and see what is happening.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|

|
When I define Z and func, the code runs, but B is never called. You have to provide a complete example.
".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
|
|
|
|

|
hi to all
i written some code for toggle between textbox and textare
but when my textbox convert to multi line(textarea) it cant be convert to input text again how can i do this
my html:
<form id="form1" runat="server">
<asp:TextBox ID="txt" runat="server" Text="11111111111111111111111111111"></asp:TextBox>
<table class="auto-style1">
<tr>
<td>
<asp:TextBox ID="txt0" runat="server" Text="222222222222222222222222"></asp:TextBox>
</td>
</tr>
<tr>
<td><asp:TextBox ID="TextBox1" runat="server" Text="333333333333333333333333333"></asp:TextBox></td>
</tr>
<tr>
<td><asp:TextBox ID="TextBox2" runat="server" Text="44444444444444444444444444444444444"></asp:TextBox></td>
</tr>
<tr>
<td><asp:TextBox ID="TextBox3" runat="server" Text="5555555555555555555555555555555555555555"></asp:TextBox></td>
<td> </td>
</tr>
<tr>
<td><asp:TextBox ID="TextBox4" runat="server" Text="66666666666666666666666666666666666666666666"></asp:TextBox></td>
</tr>
</table>
</form>
$(function () {
$(':input').click(function () {
var newTextArea = document.createElement('TextArea');
this.parentElement.appendChild(newTextArea);
debugger
newTextArea.name = $(this)[0].id;
newTextArea.value = $(this)[0].defaultValue;
newTextArea.onclick = function () {
var newtext = document.createElement('input');
newtext.value = this.innerText;
newtext.name = this.name;
this.parentElement.appendChild(newtext);
$(this).remove();
}
$(this).remove();
})
});
thanks in advance
|
|
|
|

|
I'm still having problems:
0) The code will not get the width of the _image.
1) This in turn causes _scale to be "Infinity" (because _imageWidth is 0 when I try to do the division to determine _scale's value
2) Finally, the _context isn't drawing the _image.
If you want to try the code, I'm using jQuery 2.0 (prior versions back to 1.83 should work fine). Other than that, it's completely self-contained.
<body>
<div id="canvasesDiv" style="position:relative; width:416px; height:512px; border:1px solid black; background-color:silver;"></div>
</body>
function doIt()
{
var _filename = "http://paddedwall.org/2012mustang/images/blacklights_03.jpg";
var _divName = "#canvasesDiv";
var _sceneWidth = $(_divName).width();
var _sceneHeight = $(_divName).height();
var _imageWidth = 0;
var _image = $('<img />').attr({'id': 'backgroundImage', 'src' : _filename})[0];
$(_image).load(function()
{
if (this.complete === true)
{
_imageWidth = this.width;
if (_imageWidth === 0)
{
_imageWidth = _sceneWidth;
}
}
});
var _scale = _sceneWidth / _imageWidth;
var _canvas = $("<canvas>Not html5</canvas>");
$(_canvas).css('width', _sceneWidth);
$(_canvas).css('height', _sceneHeight);
_canvas.attr('id', "backgroundCanvas");
_canvas.css('width', _sceneWidth);
_canvas.css('height', _sceneHeight);
_canvas.css('position', 'absolute');
_canvas.css('top', 0);
_canvas.css('left', 0);
_canvas.css('z-index', 0);
_canvas.css("display", "block");
$(_divName).append($(_canvas)[0]);
var _context = $(_canvas)[0].getContext('2d');
_context.setTransform(1, 0, 0, 1, 0, 0);
_context.scale(_scale, _scale);
_context.drawImage($(_image)[0], 0, 0);
}
".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
|
|
|
|

|
I'm sure you are aware that the function you fed to the images load method will be executed when the image loads. This happens asynchronically. The rest of the doIt method may well be executed before the image had a chance to load. Try moving everything after var _scale = _sceneWidth ... into the anonymous method in the image's load method call.
Cheers!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|

|
I've already tried that - the image.width property is still 0.
".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
|
|
|
|

|
I'm not particularly familiar with the <canvas> tag, but I can see why your _imageWidth is zero: the load(function(){ ... }) method is adding the function as a handler to the image's load event. It won't get called until the image has loaded, which won't happen immediately.
Try putting the rest of your code in the callback:
function doIt()
{
var _filename = "http://paddedwall.org/2012mustang/images/blacklights_03.jpg";
var _divName = "#canvasesDiv";
var _sceneWidth = $(_divName).width();
var _sceneHeight = $(_divName).height();
$('<img />').attr({'id': 'backgroundImage', 'src' : _filename}).load(function()
{
if (this.complete === true)
{
var _imageWidth = this.width;
if (_imageWidth === 0)
{
_imageWidth = _sceneWidth;
}
var _scale = _sceneWidth / _imageWidth;
var _canvas = $("<canvas>Not html5</canvas>");
_canvas.css('width', _sceneWidth);
_canvas.css('height', _sceneHeight);
_canvas.attr('id', "backgroundCanvas");
_canvas.css('width', _sceneWidth);
_canvas.css('height', _sceneHeight);
_canvas.css('position', 'absolute');
_canvas.css('top', 0);
_canvas.css('left', 0);
_canvas.css('z-index', 0);
_canvas.css("display", "block");
$(_divName).append(_canvas[0]);
var _context = _canvas[0].getContext('2d');
_context.setTransform(1, 0, 0, 1, 0, 0);
_context.scale(_scale, _scale);
_context.drawImage(this, 0, 0);
}
});
}
http://jsfiddle.net/hXqMG/[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|

|
That's exactly what I meant.
I'm not sure though that load will happen if the node JSOP constructed is not added to the DOM yet.
Cheers!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|

|
It seems to work in the jsFiddle I linked to, at least in Firefox.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|

|
Thanks for the information Richard!
I should try that one in other browsers as well.
[Modified]Works in IE 10 as well[/Modified]
Cheers!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|

|
It also appears to work in Chrome 29, Opera 12.15 and IE10.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|

|
Just modified my post for IE 10.
Cheers!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|

|
That's all well and good for this sample, but the actual code I took it from is 700 lines spread out among four classes.
".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
|
|
|
|

|
Do you have this on a public website where one could take a look at the whole thing?
Cheers!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|

|
Nope. I don't publish until something is working pretty much the way I want it to. I have a spaghetti-code non-jquery version running just fine, but that's kind of moot since that won't be used by anyone anyway.
FWIW, this little sample is exhibiting the same issues as the big version. I created this sample to simplify everything to try to see what's happening a little easier. Unfortunately, it hasn't helped.
I'm using Chrome to debug, and even though the image appears to load (if you put an alert in the load anonymous function, you can see that it succeeds), nothing shows up on the canvas. I'm willing to concede that I'm doing something wrong, but what it is, I don't know. I've also tried this code in both an aspx page, and a standard html page with the same results.
".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
|
|
|
|

|
If the code you've posted is representative of the code you're using, the problem is quite obvious: when the load method returns, the image hasn't loaded, and so you're trying to draw a blank image. You need to wait until the load event fires before you try to use the image.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|

|
I was under the impression that calling load on the image would cause it to load. Beyond that, what about the line that reads if (this.complete === true) in the anonymous function? Won't that do what you're saying?
".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
|
|
|
|

|
Calling jQuery's load method[^] attaches an event handler to the load event; it doesn't cause the script to block until the image has loaded.
The this.complete === true line in the event handler works because it's called when the image has loaded. The code which follows the call to load(function(){...}) is executing before the image has loaded.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|

|
...and the light goes on.
Is there a way to postpone exiting the anonymous function before loading has completed?
".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
|
|
|
|

|
Not that I've seen. You'll need to trigger the remainder of the code from the anonymous function which handles the event.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
 |