# Default Data in a Text Field + Submitting

**URL:** <https://forum.kirupa.com/t/default-data-in-a-text-field-submitting/220167>\
**Category:** flash\
**Created:** [March 23, 2007, 12:18pm UTC](https://forum.kirupa.com/t/default-data-in-a-text-field-submitting/220167 "2007-03-23T12:18:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mazar](https://avatars.discourse-cdn.com/v4/letter/m/ea666f/32.png) [@Mazar](https://forum.kirupa.com/u/Mazar)\
**Post date:** [March 23, 2007, 12:18pm UTC](https://forum.kirupa.com/t/default-data-in-a-text-field-submitting/220167/1 "2007-03-23T12:18:31Z")

</div>

Hey all, I’m encountering a problem I did not think of. I have a single textfield, that once submitted via “Get” method, sends the data to the site (Think of a google search field in a banner).

In any case, I have some default text in the field. But when someone clicks on the submit button, the default text gets submitted as the search string. Is there a way to get the result from submitting the form without entering text into the textfield to be a default URL, and not the text string? See Below:

myfield.text = “Enter Your Text”;  
myfield.onSetFocus = function(oldFocus) {  
myfield.text = “”;  
};  
myfield.onKillFocus = function(oldFocus) {  
if (myfield.text == “”) {  
myfield.text = “Enter Your Text”;  
}  
};  
\_root.onEnterFrame = function() {  
if (Key.isDown(Key.ENTER)) {  
getURL(“theformurlgoeshere”, “\_top”, “GET”);  
}  
};
