
 Orion Tiller - 2009-06-30 02:15:11
I have a form on a webpage that I would like to submit with this class but how can I specify to submit this form if there is no name.
Thanks
//Form code
<form action="login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)">
<script type="text/javascript" src="http://i2.slickdeals.net/clientscript/vbulletin_md5.js?v=364"></script>
		<table border="0" cellpadding="0" cellspacing="3">
		<tbody><tr>
			<td class="smallfont"><label for="navbar_username">User Name</label></td>
			<td><input class="bginput" style="font-size: 11px;" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="User Name" onfocus="if (this.value == 'User Name') this.value = '';" type="text"></td>
			<td class="smallfont" colspan="2" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" checked="checked" type="checkbox">Remember Me?</label></td>
		</tr>
		<tr>
			<td class="smallfont"><label for="navbar_password">Password</label></td>
			<td><input class="bginput" style="font-size: 11px;" name="vb_login_password" id="navbar_password" size="10" tabindex="102" type="password"></td>
			<td><input class="button" value="Log in" tabindex="104" title="Enter your username and password in the boxes provided to login, or click the 'register' button to create a profile for yourself." accesskey="s" type="submit"></td>
		</tr>
		</tbody></table>
		<input name="s" value="" type="hidden">
		<input name="do" value="login" type="hidden">		
		<input name="vb_login_md5password" type="hidden">
		<input name="vb_login_md5password_utf" type="hidden">
		</form>
//php code. 
$b -> submitForm (
      $b  -> getForm ( "//form[@id='']" ) //what to put here?
	      -> setAttributeByName ( 'vb_login_username', 'myusername' )
          -> setAttributeByName ( 'vb_login_password', 'mypassword' )
          -> setAttributeByName ( 'cookieuser', 'unchecked' ),
      'fulltext'
  )