I am trying to put a textbox and button into a custom map control and it won't work!
Here is My Script:
<html>
<head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script src="http://dev.virtualearth.net/mapcontrol/v3/mapcontrol.js"></script> <script>var map = null;
var layerid=1;
var layerid2=1;
function GetMap()
{
map = new VEMap('myMap');
map.LoadMap();
AddMyControl();
}
function AddMyLayer(type)
{
var veLayerSpec = new VELayerSpecification();
veLayerSpec.Type = type;
veLayerSpec.ID = layerid;
veLayerSpec.LayerSource = 'http://api.local.yahoo.com/MapsService/rss/trafficData.xml appid=ManjaSoftware&zip='+txtSource.value;
veLayerSpec.Method = 'get';
map.AddLayer(veLayerSpec);
layerid++;
}
function AddMyLayer2(type)
{
var veLayerSpec = new VELayerSpecification();
veLayerSpec.Type = type;
veLayerSpec.ID = layerid2;
veLayerSpec.LayerSource = 'http://xml.weather.yahoo.com/forecastrss p='+txtSource2.value;
veLayerSpec.Method = 'get';
map.AddLayer(veLayerSpec);
layerid++;
}
function AddMyControl()
{
var el = document.createElement("div");
el.style.top ="10px";
el.style.left = "10px";
el.style.border = "2px solid black";
el.style.background = "White";
el.innerHTML = "<INPUT id="txtSource2" type="text"
name="txtSource2" size="20">
<INPUT id="loadFeed" type="button" value="Load Weather" name="loadFeed2"
onclick="AddMyLayer2(VELayerType.GeoRSS);">";
map.AddControl(el);
}
</script> </head> <body onload="GetMap();" bgcolor="#008000"> <div id='myMap' style="position:relative; width:700px; height:400px;"> <p> </div> <INPUT id="txtSource" type="text"
name=
"txtSource" size="20"> <INPUT id="loadFeed" type="button" value="Load Traffic" name="loadFeed"onclick=
"AddMyLayer(VELayerType.GeoRSS);"> </body></html>
It Keeps giving me a script error! I checked the script like 10 times already, fixed the potential errors but the error still comes up!!! Help Me!

Script Help!
Mbowles
el.innerHTML = "<INPUT id='txtSource2' type='text' name='txtSource2' size='20'><INPUT id='loadFeed' type='button' value='Load Weather' name='loadFeed2' onclick='AddMyLayer2(VELayerType.GeoRSS);'>";
It worked for me with this change
John.
Rocinante8
Matt Lin
el.innerHTML = "<INPUT id="txtSource2" type="text"
name="txtSource2" size="20">
<INPUT id="loadFeed" type="button" value="Load Weather" name="loadFeed2"
onclick="AddMyLayer2(VELayerType.GeoRSS);">";
You can't use the same quotes! Not a js expert here but change the quotes inside to ' or else find the escape sequence for using quotes within quotes.el.innerHTML = "<INPUT id='txtSource2' type='text'
name='txtSource2' size='20'>
<INPUT id='loadFeed' type='button' value='Load Weather' name='loadFeed2'
onclick='AddMyLayer2(VELayerType.GeoRSS);'>";
John.