File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Display Tag with struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Display Tag with struts " Watch "Display Tag with struts " New topic
Author

Display Tag with struts

Bilal A.Siddiqui
Ranch Hand

Joined: Feb 22, 2010
Posts: 31
I am using display tag to display my report, there is a description field in my report. i want to display only part of that description initially but when user clicks on it a popup should open with full description. I have written a js function for popup but i am unable to send the data from display tag to js function

the description column looks like this




Thanks & Regards
Bilal


Regards
Bilal
Bilal A.Siddiqui
Ranch Hand

Joined: Feb 22, 2010
Posts: 31
I am still struggling with the problem.

any will be highly appreciated.

Thanks & Regards

Bilal
Bilal A.Siddiqui
Ranch Hand

Joined: Feb 22, 2010
Posts: 31
any help will be highly appreciated.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42913
    
  68
Shouldn't the "href" attribute be an "onClick" attribute so that the JavaScript is actually executed?

I don't understand what "i am unable to send the data from display tag to js function" means. If the JS popup should display some data, then that data must either be a parameter to the JS function, or it must be part of some other JS block elsewhere on the page that the method knows how to access.
Bilal A.Siddiqui
Ranch Hand

Joined: Feb 22, 2010
Posts: 31
the data has to sent as a parameter to js function. and this is what i am unable to do.

Bilal
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42913
    
  68
If the JSP can generate "javascript:activatePopupDivs()", then it can generate ”javascript:activatePopupDivs('This is a really long report description.')", no? Taking the string to be displayed from a request attribute instead should not be hard either.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Display Tag with struts