tags:

views:

49

answers:

1

Im using PHP cURL to connect to another server, post data and return it to my page. It has worked up until now, this situation is a little different. I am using the following and it sucks.

$(document).click(function() { 
$("#SymbolSearchForm").submit(function() {
$.ajax({
 url: "PHP/Kinetick_Symbol_Search.php",
 type: "post",
 dataType: "HTML",
  success: function(html){
    var end = "{ENDKINETICK}";
    $("#return").append(html.substring(html.indexOf("{STARTKINETICK}"), html.indexOf(end) + end.length));
}

});
});

the url im submitting to returns an entire page, I'm trying to trim out all content except what is between the {STARTKINETICK} AND {ENDKINETICK} tags it returns. Currently it loads the entire page for a split second into the div, then goes white. Any ideas?

thx, Kane

A: 

maybe try a different approach but nothing jumps out that would make the page react like you stated.

html = html.match(/{STARTKINETICK}(.*?){ENDKINETICK}/)[1];
$("#return").append(html);
hunter
Ill give that a shot, so you'r just using html as a variable and appending it correct? thx
Dirty Bird Design
mark as answer?
hunter