Hello,
I have to following line in my code:
href = "<a href=\"#\" onclick=\"javascript:document.getElementById(' "+getInput+" ').value=' "+city+" ';\">";
All is working fine. Only in some cases I have a city value like = 's City. So href gets the value something like this = .value=' 's City';\">"; You see the problem with the 's.
I tried to replace the ' by \' in city. city.replace(" ' "," \' ");. But it didn't have any effect.
thanks for your help.
Greetings
p.s. I placed some spaces between ' and " to make it more clear
The One And Only KryptoS
I have to following line in my code:
href = "<a href=\"#\" onclick=\"javascript:document.getElementById(' "+getInput+" ').value=' "+city+" ';\">";
All is working fine. Only in some cases I have a city value like = 's City. So href gets the value something like this = .value=' 's City';\">"; You see the problem with the 's.
I tried to replace the ' by \' in city. city.replace(" ' "," \' ");. But it didn't have any effect.
thanks for your help.
Greetings
p.s. I placed some spaces between ' and " to make it more clear
The One And Only KryptoS