SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    this.form.submit() isn't submitting

    I'm trying to submit a form using the onChange event of my select box, but I get a "Object doesn't support this property or method" error when I change the select's value.
    HTML Code:
    <form action='AddAppProcess.jsp' method='post' onSubmit='return validForm(this)' name='AddApp1'>
     <tr bgcolor='#FFFFFF'>
      <td width='119' class='tabledata'>Application SSG & Mothership</td>
      <td width='358'>
      <select name='appl_ssg_cde' onChange="this.form.submit();"> <! -- Error line -->
      	<option value='0'></option>
    	<option value='1'>COMM</option>
    	<option value='3'>CORP</option>
    	<option value='9'>INFRAM</option>
    	<option value='10'>LIBINT</option>
    	<option value='4'>LIFE</option>
    	<option value='5'>NFRA</option>
    	<option value='2'>PERS</option>
    	<option value='6'>RAM</option>
    	<option value='7'>RISKSV</option>
    	<option value='11'>SHARED</option>
    	<option value='8'>WAUSAU</option>
      </select>&nbsp;<select name="appMothership">
      	<option value='0'></option>
    	<option value='0'>No SSG Selected, Select an SSG</option>
      </select></td>
     </tr>
     <tr bgcolor='#ffffff'>
      <td colspan='3' align='center' valign='middle'>
      <input type='submit' name='submit' value='submit' class='buttn' style='width:70' />&nbsp;&nbsp;&nbsp;
      <input type='button' name='cancel' value='cancel' class='buttn' style='width:70' onClick='javascript:history.back();'/></td>
     </tr>
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not even May yet, and this issue pops up again... always give me a laugh...
    Code:
    <input type='submit' name='submit'....
    Before: Form.submit -------> method, submits form
    After: Form.submit -------> submit button, don't invoke me, please!

    Try another name, any other name...

    Also:
    Code:
    <input type='button' name='cancel' value='cancel' class='buttn' style='width:70px;' onClick='history.go(-1);' />
    Always use units with CSS, and quotes with your attributes.
    ::: certified wild guess :::

  3. #3
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I need to remember that one

    And with the second issue, tis what happens when you share code in a workplace...

    I have one coworker that uses dreamweaver to do html and it butchers it. There's no single OR double quotes on attributes, not to mention the horrible structure to the code itself.
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*

  4. #4
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What version of DW? 2.0? Seriously, that can't possibly be the case. DW is much better at code than that.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  5. #5
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I found it hard to believe it wouldn't put quotes around attribute values too... He must hand-code the html and doesn't use anything around the attributes.

    All i know is he said he uses dreamweaver.
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •