All I got is an HTML string from XMLHttpRequest
and I posted it to a textbox.
document.myform.outputtext.value = xhr.responseText;
But I only want part of that big HTML string that is between </fb:send>
and <div class="styles">
. I have done similar things in PHP but don't know how I can do that in JavaScript? All I want is the xhr.responseText
part that is between </fb:send>
and <div class="styles">
. I'd be happy if some one help me with this. Thanks.
PHP example:
$start = strpos($file_contents, '</fb:send>');
$end = strpos($file_contents, '<div class="styles">', $start);
$code = substr($file_contents, $start, $end);