Hi,
I tried to concatenate a string to a div with its value but I can't please help. Here is my little codes
var server = 'server name: '
$('#div').load('myservername.aspx');
I like to display at div id is
server name: myserver
Thanks.
Hi,
I tried to concatenate a string to a div with its value but I can't please help. Here is my little codes
var server = 'server name: '
$('#div').load('myservername.aspx');
I like to display at div id is
server name: myserver
Thanks.
Tweaking what you have
$('#div').load('myservername.aspx');
$('#div').prepend('Server Name:')
Could also do
$.get("myservername.aspx", function(data){
$('#div').html('Server name: ' + data)
});
jQuery manipulation docs have these little codes to append
$("p").append("<strong>Hello</strong>");
I'm assuming that you have an html with the following html code
<div id="some_id">
</div>
and you want to load the div with server name: myserver (?).
If so, i think you can use
$('#some_id').text("server name: myserver");