Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSIE page timeout 1

Status
Not open for further replies.

brownfox

Programmer
Joined
Jan 5, 2003
Messages
173
Location
GB
When MSIE tries to load an image that's not there it seems to go on for ever trying to load it. I have a php script that interacts with javascript:
<img src='whatever' onError='myFunction()'>
but as MSIE never stops trying to load a missing image I never get to the onError bit unless I click the red circle with the white cross in (stop). So what I want to know is, is there a way for php to do the same thing as the circle ie. stop the page from loading after 30 seconds for example?
Thanks in advance for any help!
 
Well, by default all PHP web scripts are limited to a 30-second runtime. That setting can be found in php.ini as max_execution_time.

As far as generating errors, you're example is client-side. PHP runs server-side.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
Thanks for your reply. I do know the difference between server and client side scripting. I have heard it said that javascript can be the &quot;glue&quot; between different processes, and that is true in this case. Disregard the javascript issue please, the point I'm trying to resolve is: my php.ini
says timeout at 300 BUT MSIE is still trying to find a missing .jpg at 5 mins later. I need to find the code that will, in effect, do the same as if I hit the &quot;stop page loading&quot; button (red circle with white cross - top left, next to refrsh on MISE). Any suggestions welcome?
 
Basically, the script says &quot;Look here for the picture.&quot; and then IE takes over, php has nothing to do with what it does.

I suggest checking the file source (right-click image, click properties) and check that case etc are correct.
 
are these images displayed in html JavaScript as it sounds like u have an infinite loop in the script somewhere but as KempCGDR said php has nothing to do with this.

To err is human, to completely mess up takes a computer. [morning]
 
Good question - the images are called by just HTML, there is a onClick script for each image but that shouldn't come into the equation.
 
no it should not, i have a Suggestion though. Update IE to the latest version (if it isn’t already) there was a doggy version released about a year ago maybe longer. if this does not solve the problem here is another sugg comment out all pics then re-introduce them one at a time and i think you will be surprised at the results. let us know how u go on. T

To err is human, to completely mess up takes a computer. [morning]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top