Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

jquery set .html with array data

Status
Not open for further replies.

thompom

Technical User
Dec 4, 2006
395
GB
Hi - am moving my ajax funcs to jquery and want to set innerhtml with array data - but the following doesnt work, just get blank div and no errors
If i replace update[0] with "text" it works but doesnt seem to like array data (which does have values)

Code:
$.get(loadUrl, function(data){ 
	var update = new Array();
        if(data.indexOf('|') != -1) 
        {
        update = data.split('|');
	$('#actionlistinner').html(update[0]);
	}
});

thanks MG
 
hi - thanks for reply, is something todo with content in update[0] as if i replace content with simple text it works.
used to work ok with javascript innerhtml.

This is an intranet app with customer data so is not going to be easy to post a live version.

Will have a play with output to find troublesome output

thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top