Nov
13
2009

Gems of Ignorance #1: Response.Write JS Redirect?

ignorance

This is great… A co-worker of mine found this little Gem in a legacy Classic ASP app at my company the other day and I am still chuckling about it…

   1: if trim(session("Loginname"))="" then
   2:     response.Write("<html>")
   3:     response.Write("<body onLoad='Javascript:document.frm.submit();'>")
   4:     response.Write("<form action='../userLogin.asp' name='frm' method='post' target='_parent'>")
   5:     response.Write("</form>")
   6:     response.Write("</body>")
   7:     response.Write("</html>")
   8:     response.end()
   9: end if

 

 

You can always rely on ignorance for a good laugh, or cry depending on the situation. This is certainly a laughable one. I imagine this coder spent a few hours drafting up this programmatic feat and walked away proud. Hope they have since discovered the better ways to accomplish this…

Enjoy!

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

About me...

I am a software dev specializing in web based application lovin life in So Cal!

Month List