This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
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 Head First Android this week in the Android 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
Rancher

Joined: Mar 22, 2005
Posts: 42956
    
  73
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
Rancher

Joined: Mar 22, 2005
Posts: 42956
    
  73
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
 
It's not a secret anymore!