Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Whenever my form postback from a dropdown control I get a javascript error stating, "Object doesn't support this property or method." I think this happens on theform.submit(); line below. Does anyone know how I can fix this problem?

 

function __doPostBack(eventTarget, eventArgument) {

var theform = document.Form1;

theform.__EVENTTARGET.value = eventTarget;

theform.__EVENTARGUMENT.value = eventArgument;

theform.submit();

}

 

Thanks,

 

James

Posted

I have IsPostBack in my code. Also, the reason why I am using doPostBack is because I have a dropdown control that has AutoPostBack="true" and the dropdown calls a VB sub procedure. In order for my dropdown to work I thought I was suppose to add AutoPostBack="true". The AutoPostBack adds a doPostBack function automatically. Any thoughts?

 

James

Posted

I found my problem. I have a button control with the id="submit". For some reason the postback doesn't like buttons with the id="submit." If anyone know why please let me know.

 

James

  • *Experts*
Posted

Since the button is named submit, calling theform.submit() in the

JS you pasted refers to that control instead of the submit method

of the form like it is supposed to.

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...