I m using jquery to do an ajax call on 3 types of files html/javascript and img file:
$.ajax({ url: url, type: "POST", dataType: "text", async: true, success: function(data) { data = data.replace( < , < ); data = data.replace( > , > ); $( #file_content ).html( <pre> + data + </pre> ); }, error: function(a,b,c){ alert("There has been an error! Try again..."); } });
The html file is this:
<link href = "{get_url}style.css" rel = "stylesheet" type = "text/css" /> <script language = "javascript"> var get_url = {get_url} ; </script> <script src = "{get_url}functions.js" language = "javascript"></script> <div id="screen"> <div id="floor"></div> <div id="ceiling"></div> </div> <div id="minimapcontainer"> <canvas id="minimap"></canvas> <canvas id="minimapobjects"></canvas> </div>
退还的数据是:
<link href = "{get_url}style.css" rel = "stylesheet" type = "text/css" />
其余部分似乎以html的形式运行,即使一米的替换时间少于或超过标记...... 确实,我需要将未处理的内容退回到html。 我如何这样做? <>strong>-SOLVED,od
Now moving onto the other questions about retrieving an image from an image url and why the javascript file returns a snipped off version of the data:
- The js file is 8956 characters long and it seems to snip it off at 8343... Why might it be doing this?
- The image files (opening a direct url to the image) get returned as the binary data (I guess) rather than the image... The character length of the returning result is 18615. How do i return the image rather than the data the makes up the image?
How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.