okay.. after what felt like hours, i made a workaround, it's prolly not the best solution, but it works for my need
[HTML]function eval_body(text) {
var tempmsg;
var pattern = /<script>documen t\.write\(lang\[(.+?)\]\)\;<\/script>/;
var ar;
while(ar = pattern.exec(te xt)){
tempmsg = lang[ar[1]];
text = text.replace(pa ttern, tempmsg);
}
return text;
}[/HTML]...
User Profile
Collapse
-
Ajax replacing javascripts in responseText
Hello everyone.
i'm constructing a multi-language supporting webpage.
every piece of text is put in a large javascript array which is called by the user when opening the webpage. so far so good.
when I now use an Ajax-function to change the content of a certain <div>, which's content is in an external.php (in fact, ajax changes this php),
i want to make this change appear directly to the viewer (me)...
No activity results to display
Show More
Leave a comment: