0
...
<%
ArrayList<String[]> list = new ArrayList<String[]>();
int i = 0;
while (result.next()){...

%>
 ...

<input type="button" value="drehen"
 onclick="tauscheBild(**list, i**);">
         </div>
...

I am trying to use my Java variables when calling the onclick function. How do I do it?

Thanks alot!

0

2 Answers 2

1

try this

onclick="tauscheBild('<%=VAR1%>', '<%=VAR2%>')
Sign up to request clarification or add additional context in comments.

Comments

0

You need to use expression tags in JSP. Find the information you need here. http://docs.oracle.com/javaee/5/tutorial/doc/bnaov.html

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.