JavaScript in URL

Hi,

How to Use JavaScript:(Statement) in URL that lets me if i have any error then it let me to the potential error in another window .ie javaeditor…

Please can anybdoy help me !!!

Regards,

Devsur Chauhan