# Using input text field problem driving me mad (and probably very simple!)

**URL:** <https://forum.kirupa.com/t/using-input-text-field-problem-driving-me-mad-and-probably-very-simple/305336>\
**Category:** Uncategorized\
**Created:** [February 23, 2010, 6:40pm UTC](https://forum.kirupa.com/t/using-input-text-field-problem-driving-me-mad-and-probably-very-simple/305336 "2010-02-23T18:40:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christam1](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@Christam1](https://forum.kirupa.com/u/Christam1)\
**Post date:** [February 23, 2010, 6:40pm UTC](https://forum.kirupa.com/t/using-input-text-field-problem-driving-me-mad-and-probably-very-simple/305336/1 "2010-02-23T18:40:33Z")

</div>

I’m currently working on a project where an input field appears (given the variable name of “input”) and this is then used to set as a variable within the multimap web link so that a user can find directions from their house to the place of interest.

I have the following code on a frame:

```auto
stop();

var postCode = "";
function openMap()
{
    postCode = input;
getURL("http://www.multimap.com/directions/?qs_1=" + postCode + "&countryCode_1=GB&qs_2=B98+7YB&countryCode_2=GB&mode=driving&optimizeFor=time&mapData=916,917",blank)
}

```

On click of a button, the following code is executed:

```auto
on(press)
{
openMap();
}

```

Unfortunately, for some reason I can’t get it to work as when the user types in a postcode (using B97 5HW as an example below) into the text box and presses the “Submit” button, it comes up with [http://www.multimap.com/directions/?qs\_1=\<TEXTFORMAT%20LEADING=2\>\<P%20ALIGN=LEFT\>\<FONT%20FACE=Impact%20SIZE=23%20COLOR=#000000%20LETTERSPACING=0%20KERNING=0\>B97%205HW\</FONT\>\</P\>\</TEXTFORMAT\>&countryCode\_1=GB&qs\_2=B98+7YB&countryCode\_2=GB&mode=driving&optimizeFor=time&mapData=916,917](http://www.multimap.com/directions/?qs_1=%3CTEXTFORMAT%20LEADING=2%3E%3CP%20ALIGN=LEFT%3E%3CFONT%20FACE=Impact%20SIZE=23%20COLOR=#000000%20LETTERSPACING=0%20KERNING=0%3EB97%205HW%3C/FONT%3E%3C/P%3E%3C/TEXTFORMAT%3E&countryCode_1=GB&qs_2=B98+7YB&countryCode_2=GB&mode=driving&optimizeFor=time&mapData=916,917)

Without typing anything into the input text box, this is what comes up when I press submit:

[http://www.multimap.com/directions/?qs\_1=\<p%20align="left"\>\</p\>&countryCode\_1=GB&qs\_2=B98+7YB&countryCode\_2=GB&mode=driving&optimizeFor=time&mapData=916,917](http://www.multimap.com/directions/?qs_1=%3Cp%20align=%22left%22%3E%3C/p%3E&countryCode_1=GB&qs_2=B98+7YB&countryCode_2=GB&mode=driving&optimizeFor=time&mapData=916,917)

Can anyone figure out what may have happened here?

So aggravated and it’s probably such a simple thing I’ve forgotten to do ☹ Tried rendering the input text box as HTML and not as HTML…makes no difference!

Cheers guys!

Chris
