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
normbryAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

win32Commented:
Init timers in the index.htm, not in the framed pages !!
0
normbryAuthor Commented:
Pardon me? Could you elaborate somewhat, Win32?

Thanks,

NBB
0
Michel PlungjanIT ExpertCommented:
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
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Michel PlungjanIT ExpertCommented:
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
0
normbryAuthor Commented:
What do you mean with that forst post, man?
0
Michel PlungjanIT ExpertCommented:
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
0
normbryAuthor Commented:
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.
0
Michel PlungjanIT ExpertCommented:
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
0
normbryAuthor Commented:
Trying....
0
Michel PlungjanIT ExpertCommented:
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
0
Michel PlungjanIT ExpertCommented:
Sorry. EE made me reload

Michel
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
normbryAuthor Commented:
Bedankt dus.

Groetjes

NBB
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.