appleofmyiframe
appleofmyiframe copied to clipboard
Injecting Dynamic Content from Another Domain
I'm wondering if you can inject content dynamically created on another domain into the jquery created iframe? By that I mean the actual $.iframe('content').appendTo('#coins-embed'); is hosted in a file on another server?
I ask because I can't get that solution to work properly at all.
Also, do all line breaks in the html need to be enclosed in apostrophes? If so, that may be why I'm having issues.
@hephaestoskin on your first question, I'm not sure I fully understand your setup (feel free to post more complete code), but browsers generally do not allow manipulating documents across domains.
About line-breaks, JavaScript strings cannot be multi-line, so if you are creating a string, it either needs to be on one line, or you need to escape the line-endings with a back-slash as follows:
var mystring = "lorem \
ipsum";