PDA

View Full Version : Setting text field value with URL parameter value



odraude
21 Oct 2014, 9:34 PM
Totally new with Ext JS and Sencha Architect. I want to initialize or set the value of a text field with the value from the URL param. How is it done?

Thanks.

Scott-1
22 Oct 2014, 4:59 AM
Read the query string
var qs = Ext.Object.fromQueryString(window.location.search.substring(1));

qs.id = Name of the value in the query string

Ext.form.field.Text.setValue( qs.id ) //Set the text box