I don't really know what to call this. Here is my files
data.php => calculate some random numbers jscript.js => this echos the result from data.php to a div id
but what i wanted to do on some part is get the value from data.php and then place it to the style of the div.
$.get('jQuery/data.php?Con&userHP&perc' , { userID: xUserID } ,
function(output) {
$('#userHP').html(output).show();
var o = document.getElementById("userHealthbar");
o.style.width= result_here ;
}
);
instead of placing the result inside the div /div i want it to the style portion of the div.
P.S: i want the result from data.php to be a variable in javascript.
but i can't seem to make it work. i hope my explanation is clear.