2

I have a variable v which contains a string type value at any point of time . Now i want to use these variable v in database connectivity code.. in my SQL query in Where clause, Something like this "Where F_Name = "v""; . But as the code is in javascript or <script> tags. how can i use it in scriptlets <%%> where my database connectivity code will go. The part of the code where i am declaring my var v is ::

dojo.connect(gridemp, "onRowDblClick", gridemp, function(){
                var items = gridemp.selection.getSelected();



            //  do something with the selected items
                dojo.forEach(items, function(item){
                    var v = gridemp.store.getValue(item,"ID");

Now once i get a selected value in v i want to use it in query. How to do this . ? Thanks .

1 Answer 1

2

Javascript plays at client side where scriptlet is serverside stuff,

You need to set the string to some hidden field and make a form post/ajax request to server where it processes the data from request

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.