Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Testing for 404 errors with javascript


ghost's Avatar
0 0

Ok, so I have never used javascript in my life but I am trying to complete realistic 2 and learning a little javascript sounded more fun than sitting there trying to guess the day and hour. Besides always better to learn something that could be useful down the road than to sit there mindlessly guessing numbers right?

Anyway my script is working fine except it just opens a window for every possible day/hour combination (720 windows I believe) I was just wondering if there was a way to test for the 404 error on the page, I noticed that the 404 error is just text so maybe if I could have it analyze the web page somehow and if the numbers "404" are present then it will close the window?

just an idea thereā€¦

Thanks


ghost's Avatar
0 0

Heh, I'm not one to just copy and paste someones code but I found some nice idea's to get my script working without opening 700+ pages, thank you! :)