I am working on a set of javascript functions to create a sort of slideshow where all the photos are sequentially numbered. However, sometimes there are gaps where there is no image. I want to do something with those gaps to let the user know that they do not have to wait for the image to load...
I think onsubmit would execute as soon as the submission was taking place, you have to intercept it before that, maybe use onclick and have code in there to check the status of the confirmation object and then submit directly from that function.
I am assuming you have some sort of check box to...
Nevermind, I think I fixed both problem with this:
function nextImage()
{
var tmp = new Image();
var ctr = 0;
do
{
tmp.src = makeFilename();
ctr++;
}while ((tmp.width == 0 || tmp.height == 0) || ctr < 250 );
x = tmp.width;
y = tmp.height;
refreshSize()...
I am trying to create a slideshow and I want to resize each picture to be as large as possible while retaining the aspect ratio. Anyways, what I came up with works the majority of the time, but sometimes, when I load up a new image into a temporary variable to get the dimensions, said...
I just started learning javascript yesterday afternoon so I don't think I can address your question, but I thought I might mention a flaw in your 'rolling' algorithm. You have to perform each die roll separately otherwise the distribution will be fairly linear when it should be a bell curve (if...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.