3

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);
}

2 Answers 2

4

document.getElementById('myTextElementsId').value

Sign up to request clarification or add additional context in comments.

Comments

3
<textfield id="shapeTitle"></textfield>

---- // -----

document.getElementById('shapeTitle').value

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

1 Comment

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.