Hi every body!!
I'm creating an application that uses JavaScript, AJAX and IFrames. A complete example is when you mouseover for a while on an element to see its popup: it sends a HTTPRequest and writes it response to a dynamically generated IFrame. It's something like:
My problem is that charset is not set correctly: it has UTF-8 and I want it to be iso-8859-1. I've tried with META inside the HEAD of the HTTPResponse, adding this META dynamically to HEAD, adding charset='iso-8859-1' to the script tag, modifying document.characterSet (but it's readonly) and adding Accept-Charset to HTTPRequest header. None of these actions gave me the desired result.Code:var if = document.createElement('iframe'); if.src='about:blank'; // here I use another func that tells which is the document, depending on // browser type and version, using object detection var doc = getDocument(if); doc.write(content); doc.close();
Some info that may help to help meis that, in other process than informational popup (ie, editing the element), there is the same problem, but when you submit the form to see the confirmation page, it has the correct charset. The form is targeted to the same IFrame and there is no Javascript linked to the submit event.
żAny idea on this issue? As you can see, I've been looking for a solution in different ways, also with an intensive googling. But I couldn't find anything. Neither related problems on forums nor blogs. It seems as I'm the first having this problem... I can't believe it!!
Ah! The solution may not include to change the AJAX+IFrame process to a IFrame-only based system.
Thanks a lot in advance!
emi




is that, in other process than informational popup (ie, editing the element), there is the same problem, but when you submit the form to see the confirmation page, it has the correct charset. The form is targeted to the same IFrame and there is no Javascript linked to the submit event.

Reply With Quote



Bookmarks