0

Hi All!

I'm working on a web application, JSP, where a user selects the text with the mouse in html. I want this text to be inserted in a MySQL database as a java string using prepareStatement in Java and executeupdate.

Example:
String querystring = "INSERT INTO mySelectedTextTable(selectedTextWithMouse) VALUES (?)";

selectedTextWithMouse would be a java String, but the selected text is kept on a javascriptvariable.

Any clues on how to convert the javascript variable into a java String?


Thanks in advance.

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by softDeveloper
0

well .. on my previous projects one of my co workers had to do something similar, and he called the webservice from within his javascript, passing the value as a parameter.
maybe you could google it? by googling 'call a java webservice from javascript' I got a lot of responses, one of them is bound to work for what you try to do.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.