__doPostBack throws object expected error

  • Thread starter Kavitha N via DotNetMonster.com
  • Start date
K

Kavitha N via DotNetMonster.com

I have 2 frames in my web page. The top frame is just a jscript file which
contains the menu items. The bottom frame changes based on the selected
menu.

I have added this piece of code in my top JS file
function HandleOnClose(arr)
{
txt = window.parent.frames[1].document.getElementById('txtClose');
btnSubmit = window.parent.frames[1].document.getElementById('btnSubmit');
if (txt.value != "")
{
if (confirm('Do you want to update the changed data?'))
{
__doPostBack(btnSubmit,'onClick');
}
}
}

ie. If the bottom frame has had any change from the previous load, i need
to call the btnSubmit's click event. This gives an object expected error on
the __doPostBack(..).

Please note: the top frame does not have any server control and its not
possible to add any.

Can somebody pllllllease help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top