I have a link from google, and I use this in
iframe html tag. I want to change a part of this link but I get some error. seems
%20 is the problem in the link. How can I take this link without any change?
<script> document.getElementById('mapcanvas1').src = "https://maps.google.com/maps?q=37.474203,%2049.446669&t=&z=10&ie=UTF8&iwloc=&output=embed"; </script>
Seems that it is encoding the some characters twice, try:
<script> document.getElementById('mapcanvas1').src = "https://maps.google.com/maps?q=37.474203,49.446669&t=&z=10&ie=UTF8&iwloc=&output=embed"; </script>
& is how you encode a
You need a literal
& character and not an HTML entity throughout your string.
%20is just unicode for space, you should be able to just omit it.
- ok, but how can i do that?
%20to "space" (the actual space, not the word).
- how do you mean by change a part of this link?
- I want to get location coordinates from database and insert into this link
- @Amirrezazahed In the case of a correct answer mark it as such so other viewers know it's been answered by clicking the checkmark under the vote arrows on the left of the answer. This will also give the answerer their due points :)