View Full Version : redirect to another page with post data

22 Jul 2010, 9:35 PM

I have a page called Emp Search. In this page, I have tool bar, New and View Detail and emp list using Grid.

If I click View Detail button on tool bar, i want to call EmpDetail.aspx with EmpID.

What is the good way to redirect to EmpDetail.aspx with EmpID?


23 Jul 2010, 5:24 AM
This is how I've achieved something similar.

I create a temporary child "form" (ie, an html form) and populate that with my parameters in "input" boxes - in much the same way you'd write out an html form. Use the "target" parameter if you want to specify a new or existing window.

Once that's done, you can .submit() the form.

var form = Ext.getBody().createChild({
tag: 'form',
cls: 'x-hidden',
id: 'form',
action: 'http://server/path/file.asp',
target: '_blank',
method: 'POST',
children: [
tag: 'input',
name: 'param_name',
value: 'param_value',
type: 'hidden'

Hope this helps.