views:

32

answers:

2

Hey guys,

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 createMarker(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.

+4  A: 

There's a "+" missing behind name.

Eiko
A: 

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>';
mohang