• Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp and navigation or jsp calling javascript function  RSS feed

 
liliya woland
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone, I have a small javascript function listed below which is located in a .jsp page. I need to call it in one of my jsp "if" statments. I tried several ways of doing it and yet no success. Can some one tell me how can I call this function? Or maybe there is an alternative way of doing a page redirect without using javascript? Thanks in advance.
<SCRIPT> <!--
function window_onload(){
window.location.replace("http://livewire2/engineering/epis.shtml")
}
--></script>
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP cannot call Javascript, and vice versa. They live in different worlds and never can they interact.

You have a common misunderstanding about how JSPs operate. Perhaps this article would help?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!