Note that there are some explanatory texts on larger screens.

plurals
  1. POStrange problem with Google Maps and Ajax in Google Chrome and Safari
    text
    copied!<p>I am developing web-application using Google Maps API and ASP.NET Ajax. Here is my JavaScript-code for PageLoad:</p> <pre><code>map.openInfoWindowHtml(map.getCenter(),'Hello, &lt;b&gt;world&lt;/b&gt;!'); </code></pre> <p>First run is successful. But after execution some ASP.NET Ajax-function we have strange effect: In Internet Explorer, Mozilla Firefox and Opera everything is good, but in Google Chrome and Safari text with html-tags is invisible. In other words in Google Chrome we have text: “Hello, !”</p> <p>I want to make the application that would normally in Google Chrome and Safari too. How can I do it? </p> <p><strong>Update:</strong></p> <p>String <code>"Hello, &lt;b&gt;world&lt;/b&gt;, &lt;strong&gt;world&lt;/strong&gt;, &lt;span style='font-weight: bold;'&gt;World&lt;/span&gt;, &lt;a href='http://ya.ru'&gt;Link&lt;/a&gt;."</code> transform to <code>"Hello, , , , . "</code> (I examined the DOM). Words really are disappearing.</p> <p>I observed this strange effect on <em>any</em> Ajax-function with request to server.</p> <p><strong>Update2:</strong></p> <p>Many thanks to Koobz for many leading questions. They helped me a more detailed understanding of the problem.</p> <p>First of all, full description of actions:</p> <ol> <li>Load the page. GMap have several markers with dblclick-event in JavaScript. Dblclick event exec marker.openInfoWindowHtml(/My text/). /My text/ is located in JavaScript of my Page.</li> <li>I double-click on the marker. I see a infoWindow with a normal formatting</li> <li>Exec __doPostBack (starndard ASP.NET PostBack)</li> <li>In server side JavaScript is updated with same </li> <li>Server return some information with /My text/ to my page</li> <li>I doouble-click on the marker. I see a infoWindow with a wrong formatting.</li> </ol> <p>An interesting fact, which puts me in embarrassing:</p> <p>I try set to “Hello, &lt;b&gt;world&lt;/b&gt;, &amp;lt;b&amp;gt;test&amp;lt;/b&amp;gt;”</p> <p>Before Ajax function in all browser I have: “Hello, <strong>world</strong>, &lt;b&gt;test&lt;/b&gt;”</p> <p>After Ajax function in Google Chrome and Safari: "Hello, ,<strong>test</strong>"</p> <p>After Ajax function in Mozilla, Opera and IE: “Hello, <strong>world</strong>, &lt;b&gt;test&lt;/b&gt;”</p> <p>What Chrome and Safari have features that may cause such behavior? Now I can write separately necessary infoWindow-text for each browser. But I would like to find a normal way to solve my problem.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload