开发者

variable declaration causing page not to load? [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 9 years ago.

I've got the following variable declaration..

var html = "<b>" + name + "</b> <br/>" + message + ' <div align="left"> ' 
+ '<a href="path/to/php?      id='+name'&message='+message+'&id='+id+'&lat='+lat+'&lng='+lng+'&type='+type+'"      target="_blank">Click me!</a>'
+ ' </div> <form name="myform" action="delete.php" method="POST"> <div align="right"> ' 
+ '<br/> <input type="radio" name="id" value= '+id+' > Delete Entry<br/> <input type="submit" /> </div> </form>';

inside the function function create开发者_如何转开发Marker(point, name, message, type, file, id, lat, lng)

I can't seem to spot why but the variable declaration appears to be crashing the page. Does anyone have any idea what's wrong with my declaration?

Thanks.


There's a "+" missing behind name.


Correct one is

var html = "<b>" + name + "</b> <br/>" + message + ' <div align="left"> ' 
+ '<a href="path/to/php?      id='+name + '&message='+message+'&id='+id+'&lat='+lat+'&lng='+lng+'&type='+type+'"      target="_blank">Click me!</a>'
+ ' </div> <form name="myform" action="delete.php" method="POST"> <div align="right"> ' 
+ '<br/> <input type="radio" name="id" value= '+id+' > Delete Entry<br/> <input type="submit" /> </div> </form>';
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜