• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 283
  • Last Modified:

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
0
normbry
Asked:
normbry
  • 6
  • 5
1 Solution
 
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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
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
 
normbryAuthor Commented:
Bedankt dus.

Groetjes

NBB
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now