Page 1 of 2
Browser bar loading, but nothing happens
Posted: Tue Oct 07, 2008 8:07 am
by icesolid
I have noticed that every once in awhile when I click the submit button on some of my scripts, performing a POST, the web browser loading bar goes across and then gets to the end and just sits there like it’s still loading.
Generally at this point it just sits there forever and ever like it’s getting locked up, or it just goes to page cannot be displayed.
Why could this be happening?
Re: Browser bar loading, but nothing happens
Posted: Tue Oct 07, 2008 8:10 am
by marcth
Depends on the browser. Endless loop in JavaScript?
Re: Browser bar loading, but nothing happens
Posted: Tue Oct 07, 2008 8:11 am
by aceconcepts
Do you have any re-directs in place? Maybe an infinite loop is occurring.
How does your code look?
Re: Browser bar loading, but nothing happens
Posted: Tue Oct 07, 2008 8:14 am
by icesolid
No redirects or JavaScript.
It only occurs once in awhile. It is very odd.
The loading bar just like gets stuck, this has occured in IE, FireFox, Opera as far as I know.
Re: Browser bar loading, but nothing happens
Posted: Tue Oct 07, 2008 8:22 am
by aceconcepts
Can you post your code?
Just your form and destination file.
Re: Browser bar loading, but nothing happens
Posted: Tue Oct 07, 2008 8:29 am
by icesolid
Its a lot of code and it embeds a bunch of files.
I am just confused why it only happens sometimes. I mean is there any code to detect like if PHP has made a bad connection or a failed connection?
Re: Browser bar loading, but nothing happens
Posted: Tue Oct 07, 2008 8:30 am
by aceconcepts
I see
Do you have a url for me?
Re: Browser bar loading, but nothing happens
Posted: Tue Oct 07, 2008 8:31 am
by icesolid
I really wish I did, it is in a secure web page. You would have to log into the system.
It is a processing form for commercial building inspections.
Re: Browser bar loading, but nothing happens
Posted: Tue Oct 07, 2008 9:08 am
by aceconcepts
How do you process your form's data?
Do you process it within the same file or do you use 'action=""' in the <form...> declaration?
Re: Browser bar loading, but nothing happens
Posted: Tue Oct 07, 2008 9:21 am
by icesolid
I use action="post", but it posts to the same file. Should I be posting to a seperate file?
Re: Browser bar loading, but nothing happens
Posted: Tue Oct 07, 2008 9:43 am
by aceconcepts
So, your form declaration looks like this:
Code: Select all
<form method="POST" action="POST">
Is that correct?
Re: Browser bar loading, but nothing happens
Posted: Tue Oct 07, 2008 9:46 am
by icesolid
No.
Code: Select all
<form method="PHP_SELF" action="post">
Re: Browser bar loading, but nothing happens
Posted: Tue Oct 07, 2008 9:50 am
by aceconcepts
You have them the wrong way round.
It should be:
You can forget about the action="..." bit.
Re: Browser bar loading, but nothing happens
Posted: Tue Oct 07, 2008 9:52 am
by icesolid
Your right I accidentally posted it here the wrong way, but in my code it is the right way.
This script works, it posts, but SOMETIMES it hangs and I can't understand why. It is like it times out.
My form post code is fine.
Re: Browser bar loading, but nothing happens
Posted: Tue Oct 07, 2008 9:59 am
by aceconcepts
I guess it really depends on how you're processing the form data (is there lots of code, functions, includes etc...) and the way you're coding it (do have long and drawn out code?).
Typically a script will timeout after 30 seconds (depending on your server setup).