EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Gazzeh on July 02, 2013, 05:57:30 AM



Title: Get text from validatebox [solved]
Post by: Gazzeh on July 02, 2013, 05:57:30 AM
Hi

Please bear with me on this as I'm new to jQuery and only know basic JavaScript.

What I'm trying to do is get the text from a validate box and build it into a link.

I know how to concatenate a link i just cant get the value out of the validate box

eg.
onClick="javascript:window.location='ChangeOrderRef.asp?ref=' + $('#valRef').validatebox('textbox').text;"

Thanks in advance


Title: Re: Get text from validatebox
Post by: stworthy on July 02, 2013, 07:29:27 AM
Call jQuery's val to get input text.
Code:
<input is="vv" class="easyui-validatebox" ...>
<script>
var s = $('#vv').val();
alert(s);
</script>


Title: Re: Get text from validatebox
Post by: Gazzeh on July 02, 2013, 07:42:54 AM
Many thanks.

I tried .val but didn't put the () at the end.

Much appreciated

Regards

Gazz