Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Display Tag with struts

 
Bilal A.Siddiqui
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Bilal A.Siddiqui
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am still struggling with the problem.

any will be highly appreciated.

Thanks & Regards

Bilal
 
Bilal A.Siddiqui
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any help will be highly appreciated.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the data has to sent as a parameter to js function. and this is what i am unable to do.

Bilal
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic