PDA

View Full Version : Link form values to url parameters



heavywave
23 May 2010, 2:16 AM
What is the best way to assign form's inputs values to url parameters?
For instance if I pass url params "?name=abc&type=xyz" I want form inputs 'name' and 'type' to have values 'abc' and 'xyz' respectively.

Eugen_
23 May 2010, 6:33 AM
What is the best way to assign form's inputs values to url parameters?
For instance if I pass url params "?name=abc&type=xyz" I want form inputs 'name' and 'type' to have values 'abc' and 'xyz' respectively.
try this:


items: [{
name: 'name',
value: Ext.urlDecode(location.search.substring(1)).name
}, {
name: 'type',
value: Ext.urlDecode(location.search.substring(1)).type
}]