GeeCON Prague 2014*
The moose likes HTML, CSS and JavaScript and the fly likes How to call  a JSP file within a JavaScript file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to call  a JSP file within a JavaScript file" Watch "How to call  a JSP file within a JavaScript file" New topic
Author

How to call a JSP file within a JavaScript file

Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 576
I have a javascript program where when I click on a image on mouseup to fire of a function openDashboard that will fire of a page.
document.write("onmouseUp=\"this.className='imgbout';openDashboard(1,1,1,1,1)"");
This function, which is a javascipt function, is in another file a JSP file : detail2.jsp.
What I need to know is how do you include a jsp file in a js file so that my js application can call the openDashboard function.
Thanks for any help.
Cheers Tony
Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 576
I have changed the code to be :
document.write("onmouseUp=\"this.className='imgbout';parent.frames['detail']openDashboard(1,2,25,850,550)\"");
Still cant get it to work.
Trying to figure out the syntax.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
.....'detail']openDashboard.....
should be
.....'detail'].openDashboard.....
 
GeeCON Prague 2014
 
subject: How to call a JSP file within a JavaScript file