Submit always sends data to URL
-
HI, This code will work properly on a WordPress local system, it posts correctly. When the form is placed on line it will place the form information on the URL instead of posting it. What is the cause and how to fix it? This code is in the WordPress Admin section.
<div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr width="100%">
<td width="100%" class="face_padding_cell">
<form name="MyForm" id="MyForm" onSubmit="return beforeSubmit()" action="" method="POST" enctype="application/x-www-form-urlencoded">
<input type="hidden" id="MY_BLACKWHITE" name="MY_BLACKWHITE" value="Domain Lists">
<input type="hidden" id="MY_POST_CODE" name="MY_POST_CODE" value="">
<input type="hidden" id="type" name="type" value="good">
<input type="hidden" id="area" name="area" value="display">
<input type="hidden" id="user" name="user" value="dnb">
<input type="hidden" id="my_checked" name="my_checked" value="">
<input type="hidden" id="my_unchecked" name="my_unchecked" value="">
<input type="hidden" id="my_original" name="my_original" value="">
<div width="40%" align="center">
<table width="30%">
<tr><td class=my_button align="left"><button type="submit" id="button" onClick="return addEntry()"">Add</button></td>
<td class=my_button align="left"><button type="submit" id="button" onClick="return beforeSubmit()"">Save</button></td></tr>
</table>
</div>
<table align="center" width="90%" style="background-color: #0099cc;" border="10" style="border-collapse:collapse">
<tr align="left"><td align="left" width="5%">IP ID</td><td align="left" width="30%">IPs</td><td align="left" width="30%">Name:</td><td align="left" width="10%">Active</td><td align="left" width="5%">Delete</td></tr>
<tr align="left"><td align="left" width="5%"><input type="text" size="5" name="id[1]" id="id[1]" value="1" disabled></td><td><input type="text" size="60" name="name[1]" id="name[1]" value="::1" disabled defaultValue="::1" onChange="itemAdd('name[1]')"></td><td><input type="text" size="60" name="uap[1]" id="uap[1]" value="My" disabled defaultValue="My" onChange="itemAdd('uap[1]')"></td><td width="10%"><input type="checkbox" id="active[1]" name="active[1]" disabled onChange="itemAdd('active[1]')" checked="yes"</input></td><td width="5%"><input type="checkbox" id="delete[1]" name="delete[1]" disabled onChange="itemAdd('delete[1]')"</input></td></tr>
<tr align="left"><td align="left" width="5%"><input type="text" size="5" name="id[2]" id="id[2]" value="2" disabled></td><td><input type="text" size="60" name="name[2]" id="name[2]" value="127.0.0.1" disabled defaultValue="127.0.0.1" onChange="itemAdd('name[2]')"></td><td><input type="text" size="60" name="uap[2]" id="uap[2]" value="My" disabled defaultValue="My" onChange="itemAdd('uap[2]')"></td><td width="10%"><input type="checkbox" id="active[2]" name="active[2]" disabled onChange="itemAdd('active[2]')" checked="yes"</input></td><td width="5%"><input type="checkbox" id="delete[2]" name="delete[2]" disabled onChange="itemAdd('delete[2]')"</input></td></tr>
<tr align="left"><td align="left" width="5%"><input type="text" size="5" name="id[3]" id="id[3]" value="3" disabled></td><td><input type="text" size="60" name="name[3]" id="name[3]" value="75.85.144.123" disabled defaultValue="75.85.144.123" onChange="itemAdd('name[3]')"></td><td><input type="text" size="60" name="uap[3]" id="uap[3]" value="My" disabled defaultValue="My" onChange="itemAdd('uap[3]')"></td><td width="10%"><input type="checkbox" id="active[3]" name="active[3]" disabled onChange="itemAdd('active[3]')" checked="yes"</input></td><td width="5%"><input type="checkbox" id="delete[3]" name="delete[3]" disabled onChange="itemAdd('delete[3]')"</input></td></tr>
</table>
</form>
</td>
</tr>
</table>
</div>
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘Submit always sends data to URL’ is closed to new replies.