views:

132

answers:

2

Can anyone help me with my project? How will I be able to call the textfield details in javascript?

function AddPushpin()
{
    var shape = new VEShape(VEShapeType.Pushpin, map.GetCenter());
    shape.SetTitle(**//it should be coming from a textfield//**);
    shape.SetDescription('This is shape number '+pinid);
    pinid++;
    map.AddShape(shape);
}
+4  A: 

document.getElementById('myTextElementsId').value

idrosid
+3  A: 
<textfield id="shapeTitle"></textfield>

---- // -----

document.getElementById('shapeTitle').value

where 'shapeTitle' should correspond to the ID of the element you need the value of.

toothygoose
is it possible that I can upload for example a picture through this?I mean, is this the same code?
bluestella