variable declaration causing page not to load? [closed]
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>';
精彩评论