Link to home
Start Free TrialLog in
Avatar of normbry
normbry

asked on

setTimeout problem




Hello,

At the bottom of this page:

http://www.samengoedkoopbellen.nl/

is a link that pops a window and a form. On submission, a setTimeout is fired which is implemented to combat the tragically long CGI delays at this client's server. However, the setTimeout is not firing. The delays are quite long.

Can you spot where things go awry?

Thanks
Avatar of win32
win32

Init timers in the index.htm, not in the framed pages !!
Avatar of normbry

ASKER

Pardon me? Could you elaborate somewhat, Win32?

Thanks,

NBB
Avatar of Michel Plungjan
Why on earth don't you put it before the
document.form1.submit()
in senddata???

Anyway, I do get the dank, but not within 5 seconds

Michel
Try for fun to add
alert('submitting');
just in front of
document.form1.submit()
 
I wonder if the validation script sucks (since it is not one of mine ;-)

Michel
Avatar of normbry

ASKER

What do you mean with that forst post, man?
Please change

document.form1.submit()

in function senddata

to

setTimeout('parent......',5000);
document.form1.submit()

why do you execute a function in a hidden frame instead of the location change directly???

setTimeout('top.location=\'dank.html\'',5000);
document.form1.submit()


Michel
Avatar of normbry

ASKER

Michel, ik vind 't erg nobel van je, maar please don't try to educate me. Die snippets hierboven, ik heb geen idee wat ik nou moet doen. Ok, ik moet e.e.a. veranderen, maar wat is dat tweede gedeelte??

Ik wil geen JS proberen te doen, want er gaat te veel tijd inzitten - simpelweg omdat het zwoegen is voor me. En als ik dan wat probeer, dan krijg je dergelijke technische fouten als hierboven. Kortom, ik KAN het niet. Kun je 't a.u.b. uitstippelen voor me?

Hopeloosje.
In europe.html, please locate the script:

alert(error_message)
  } else {
    document.form1.submit()
  }

change it to

alert(error_message)
  } else {
    setTimeout('parent.hidden.go()',5000)
    document.form1.submit()
  }

and remove the

onSubmit="setTimeout('parent.hidden.go()',5000)"

from the form

Michel
Avatar of normbry

ASKER

Trying....
In europe.html, please locate the script:

alert(error_message)
  } else {
    document.form1.submit()
  }

change it to

alert(error_message)
  } else {
    setTimeout('parent.hidden.go()',5000)
    document.form1.submit()
  }

and remove the

onSubmit="setTimeout('parent.hidden.go()',5000)"

from the form

Michel
ASKER CERTIFIED SOLUTION
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of normbry

ASKER

Bedankt dus.

Groetjes

NBB