Set title by dynamically loaded AJAX

Karrenbertonu

New Member
I currently parse some AJAX that I load with this script:\[code\]function parseScript(_source) { var source = _source; var scripts = source.match(/<script[^>]*src=http://stackoverflow.com/questions/14081133/[^>]*>/g); if (scripts) { for (var i = 0; i < scripts.length; i++) { src = scripts.match(/src=("([^"]*)"|'([^']*)')/); src = http://stackoverflow.com/questions/14081133/src[2] || src[3]; if (src) { addScriptTag(src); } } } var scripts = new Array(); return source;}\[/code\]I have been trying to find the title and add it before the current title like "Loaded page title - Loading page title" experimenting a bit with \[code\]<title>\[/code\] matches but still no success.Thanks in advance!
 
Back
Top