I am new to jQuery and I have the following problem.
My project said 2 pages, 1.JSP and 2.html. Now I want to select the selected data from 2.html and use it on 1.JSP. Now this was achieved very easily with .load , but I want the data to be present in the JavaScript variable and not put it on the page (div tags, etc.), so that I can work with this data (modify or add databases data).
I tried using .ajax and was able to write the following code:
var value = (function () { var val = nulll; var filename = " 2.html"; $.ajax ({ 'async': false, 'global': false, 'url': filename, 'success' : function(data) { val = data; } }) return val; })() document.write(value)
Where can I put the selector format (say div.id5) so that my variable has only the relevant data and not the complete file data?
source share