Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Appending Variables  RSS feed

 
Jeff Chuongvan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm attempting to join variables into one variable, in a JSP.

&lname=<%=user_lastName%>

&fname=<%=user_firstName%>

Can someone please show me how to do this?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not clear on what you are trying to accomplish. Is perhaps something like:

<%= fname + lname %>


what you are after?
 
merwin pinto
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I think you are trying to send a jsp variable as a parameter to the next page ... You could try this
in the script ...

var lastName="<%=user_lastName%>";
var firstName="<%=user_firstName%>";

window.open('somePage?fname='+firstName+'&lname='+lastName,'scrollbars=yes,width=980,height=600'
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!