Browser bar loading, but nothing happens

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

icesolid
Forum Regular
Posts: 502
Joined: Mon May 06, 2002 9:36 pm
Location: Buffalo, NY

Browser bar loading, but nothing happens

Post 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?
marcth
Forum Contributor
Posts: 142
Joined: Mon Aug 25, 2008 8:16 am

Re: Browser bar loading, but nothing happens

Post by marcth »

Depends on the browser. Endless loop in JavaScript?
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: Browser bar loading, but nothing happens

Post by aceconcepts »

Do you have any re-directs in place? Maybe an infinite loop is occurring.

How does your code look?
icesolid
Forum Regular
Posts: 502
Joined: Mon May 06, 2002 9:36 pm
Location: Buffalo, NY

Re: Browser bar loading, but nothing happens

Post 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.
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: Browser bar loading, but nothing happens

Post by aceconcepts »

Can you post your code?

Just your form and destination file.
icesolid
Forum Regular
Posts: 502
Joined: Mon May 06, 2002 9:36 pm
Location: Buffalo, NY

Re: Browser bar loading, but nothing happens

Post 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?
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: Browser bar loading, but nothing happens

Post by aceconcepts »

I see 8O

Do you have a url for me?
icesolid
Forum Regular
Posts: 502
Joined: Mon May 06, 2002 9:36 pm
Location: Buffalo, NY

Re: Browser bar loading, but nothing happens

Post 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.
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: Browser bar loading, but nothing happens

Post 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?
icesolid
Forum Regular
Posts: 502
Joined: Mon May 06, 2002 9:36 pm
Location: Buffalo, NY

Re: Browser bar loading, but nothing happens

Post by icesolid »

I use action="post", but it posts to the same file. Should I be posting to a seperate file?
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: Browser bar loading, but nothing happens

Post by aceconcepts »

So, your form declaration looks like this:

Code: Select all

 
<form method="POST" action="POST">
 
Is that correct?
icesolid
Forum Regular
Posts: 502
Joined: Mon May 06, 2002 9:36 pm
Location: Buffalo, NY

Re: Browser bar loading, but nothing happens

Post by icesolid »

No.

Code: Select all

<form method="PHP_SELF" action="post">
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: Browser bar loading, but nothing happens

Post by aceconcepts »

You have them the wrong way round.

It should be:

Code: Select all

<form method="POST">
You can forget about the action="..." bit.
icesolid
Forum Regular
Posts: 502
Joined: Mon May 06, 2002 9:36 pm
Location: Buffalo, NY

Re: Browser bar loading, but nothing happens

Post 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.
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: Browser bar loading, but nothing happens

Post 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).
Post Reply