File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes calling JSP page in a Windows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "calling JSP page in a Windows " Watch "calling JSP page in a Windows " New topic
Author

calling JSP page in a Windows

Ahmed Basheer
Ranch Hand

Joined: Apr 15, 2004
Posts: 77
I have a problem where I need to call jsp page in a Java Script Prototype window. e.g when the navigational rules evaulates to abc.jsp, I need to have abc.jsp in a Window Prototype. Is it possible to do it or is there a better way to do it. Windows class does accept the URL. Here is the Java script for windows

function openWindow(id) {
if (win == null) {
win = new Window('testit', {className: "alphacube",
title: "DynaInclude",
parent: document.body,
url : "abc.jsp",
draggable : true,
hideEffect:Element.hide,
showEffect:Element.show,
width:490,
height:560,
top:25,
left:25});
win.setContent(id);
}
win.showCenter(true);
}

Your suggestions are appreciated.

Thanks in Advance.
-Basheer
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60071
    
  65

Not a JSP question. Moved to the HTML/Javascript forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60071
    
  65

win = new Window('testit', {className: "alphacube",


It might be helpful to point out the context of this statement. It's not native Javascript.

Whether the page is generated by JSP or not is generally immaterial. You need to provide a valid URL to the page and all should be well.
[ January 15, 2007: Message edited by: Bear Bibeault ]
Ahmed Basheer
Ranch Hand

Joined: Apr 15, 2004
Posts: 77
Bear,

Can you explain it a bit more? Basically the HTML generated by JSP need to be encapsulated in Prototype Window. So Where can that action take place? JSF navigation points to the JSP page, so somwehere between navigation and the when page is called I need to take action to call window with url.

Thanks for you time.
-Basheer
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
When you say Prototype window you mean: http://prototype-window.xilinus.com/documentation.html

what is the error you are getting?

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60071
    
  65

When using third party libraries, it's folly to assume that everyone knows what you are talking about.

Please be more explicit in future posts.
Ahmed Basheer
Ranch Hand

Joined: Apr 15, 2004
Posts: 77
Sorry I should have been more detailed in my question. Yes I am using http://prototype-window.xilinus.com this prototype.js library has a java script that I can call with URL and the page is displayed in modal window dialog.
Without using prototype.js, nanigation rules of config file evaulates to jsp page abc.jsp and page abc.jsp is displayed. I need to encapsulate the page abc.jsp in Prototype window so that it becomes modal.

My question is when and where I should use the Prototype windows?

Should I create a third page (abc_intermediate.jsp) where I can call window with url abc.jsp? That sounds too much of work and I am looking for better way to do it.

The other way is when abc.jsp page is rendered, automatically java script should be called within that page that will open the window with contents of abc.jsp. I like this approach but don't know what it can be accomplished?


Thanks for your time.
Basheer
[ January 16, 2007: Message edited by: Ahmed Basheer ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: calling JSP page in a Windows
 
Similar Threads
opening popup window conditionally
Question on using Ajax.Updater
opening popup window conditionally
Passing Value From Popup Window To Parent Window
opening popup window conditionally