Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Dropdownlist and Button

Dropdownlist and Button

Scheduled Pinned Locked Moved ASP.NET
helpquestion
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sroberts82
    wrote on last edited by
    #1

    Hi, I have a form with a dropdownlist on it. I have an eventhandler for OnSelectedIndexChanged which works grand. The problem arises when I try to add a submit button. Form appears fine first time, but when I attempt to change the selected item in dropdownlist, and error comes about saying there is a problem with some JScript error (I imagine added itself I didnt have any Jscript in) saying function __doPostBack(eventTarget, eventArgument) { if (!theForm.onsubmit || (theForm.onsubmit() != false)) { theForm.__EVENTTARGET.value = eventTarget; theForm.__EVENTARGUMENT.value = eventArgument; theForm.submit(); <-----"object doesnt support this property or method" } } any ideas? Thanks in advance, Ste

    T G M 3 Replies Last reply
    0
    • S sroberts82

      Hi, I have a form with a dropdownlist on it. I have an eventhandler for OnSelectedIndexChanged which works grand. The problem arises when I try to add a submit button. Form appears fine first time, but when I attempt to change the selected item in dropdownlist, and error comes about saying there is a problem with some JScript error (I imagine added itself I didnt have any Jscript in) saying function __doPostBack(eventTarget, eventArgument) { if (!theForm.onsubmit || (theForm.onsubmit() != false)) { theForm.__EVENTTARGET.value = eventTarget; theForm.__EVENTARGUMENT.value = eventArgument; theForm.submit(); <-----"object doesnt support this property or method" } } any ideas? Thanks in advance, Ste

      T Offline
      T Offline
      ToddHileHoffer
      wrote on last edited by
      #2

      Have you tried using an asp.net button control? "People who never make mistakes, never do anything." My Blog

      S 1 Reply Last reply
      0
      • T ToddHileHoffer

        Have you tried using an asp.net button control? "People who never make mistakes, never do anything." My Blog

        S Offline
        S Offline
        sroberts82
        wrote on last edited by
        #3

        yeah im using asp:Button and asp:dropdownlist.

        T 1 Reply Last reply
        0
        • S sroberts82

          yeah im using asp:Button and asp:dropdownlist.

          T Offline
          T Offline
          ToddHileHoffer
          wrote on last edited by
          #4

          can you pase the aspx page? "People who never make mistakes, never do anything." My Blog

          1 Reply Last reply
          0
          • S sroberts82

            Hi, I have a form with a dropdownlist on it. I have an eventhandler for OnSelectedIndexChanged which works grand. The problem arises when I try to add a submit button. Form appears fine first time, but when I attempt to change the selected item in dropdownlist, and error comes about saying there is a problem with some JScript error (I imagine added itself I didnt have any Jscript in) saying function __doPostBack(eventTarget, eventArgument) { if (!theForm.onsubmit || (theForm.onsubmit() != false)) { theForm.__EVENTTARGET.value = eventTarget; theForm.__EVENTARGUMENT.value = eventArgument; theForm.submit(); <-----"object doesnt support this property or method" } } any ideas? Thanks in advance, Ste

            G Offline
            G Offline
            gharry
            wrote on last edited by
            #5

            1.What would you like to do with the Button. 2.Could it be that the second time you use the ddl event a parameter is changed out off bounds

            1 Reply Last reply
            0
            • S sroberts82

              Hi, I have a form with a dropdownlist on it. I have an eventhandler for OnSelectedIndexChanged which works grand. The problem arises when I try to add a submit button. Form appears fine first time, but when I attempt to change the selected item in dropdownlist, and error comes about saying there is a problem with some JScript error (I imagine added itself I didnt have any Jscript in) saying function __doPostBack(eventTarget, eventArgument) { if (!theForm.onsubmit || (theForm.onsubmit() != false)) { theForm.__EVENTTARGET.value = eventTarget; theForm.__EVENTARGUMENT.value = eventArgument; theForm.submit(); <-----"object doesnt support this property or method" } } any ideas? Thanks in advance, Ste

              M Offline
              M Offline
              minhpc_bk
              wrote on last edited by
              #6

              Hi there, Looks like you set the Id of the button as "submit". If this is the case, you simply replace with another name.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups