I've created a form that posts to a cfm file. When running a script onLoad that fills in the form values and tries to submit...The site takes me back to the login screen.
<script>
function f()
{
document.getElementById("email").value = "asdf#asdf.com";
document.getElementById("password").value = "asdf";
document.getElementById("form1").submit();
}
</script>
Please help!
update:
Here is the code....When the values for email and password are filled ini manually and the enter button is pressed it will direct me to the home page. However, when writing a script that submits the form onload, it redirects me to the login page.
<form action="https://www.asdf.com/dev/mem/login/login.cfm" method="post" id="caring" name="login" style="margin: 0px; padding: 0px;">
<input name="page" type="hidden" id="page" value="https://www.asdf.com/dev/mem/home/home.cfm">
<table>
<tr>
<td rowspan="2" class="title"></td>
<td class="label"><label for="email"></label></td>
<td class="element"><input name="email" id="email" value ="asdf#asdf.com" /></td>
<script>
//<td rowspan="2" class="action"><input type="submit" name="login" value="submit" alt="go" title="go" /></td>
</script>
</tr>
<tr>
<td class="label"><label for="username"></label></td>
<td class="element"><input name="password" value = "asdf" id="password" /></td>
</tr>
<td rowspan="2" class="action"><input type="submit" name="login" value="enter" alt="go" title="go" /></td>
<tr>
<td></td>
<td colspan="2"> </td>
<td> </td>
</tr>
</table>
</form>
It's hard to tell without the HTML of the form itself, but my guess would be that the action="" attribute of your form is blank. If that attribute is blank, the browser will post the form back to the same page.
Since you're using coldfusion, check to see if there is code generating your action="" value, and look for bugs in it if so. It may help to view the rendered HTML source of the page.
Make sure you aren't using a <cflocation> (or some other redirect) on your destination cfm page that could be redirecting the user back to the form page.
(It would help if you would post your full code)
Make sure to set the action. Here's the code:
<script type="text/javascript">
function f() {
document.getElementById("email").value="asdf#asdf.com";
document.getElementById("password").value="asdf";
document.getElementById('caring').action=document.getElementById("page").value;
document.getElementById('caring').submit();
}
</script>
And of course add the onload attribute to your body tag:
<body onload="f();">
There's a couple of other things to fix in your code. Check it with Total Validator. It's a great tool that will make you a better coder.
Related
i would like to know how to disable/hide all the buttons once user clicks on any of the buttons. I am only allowed to use c# or html. I have found solutions in Javascript but i cannot use it. (i did not upload my razor c# code due to lack of space)
I am creating a program that allows user to vote for any one of the candidates. Once user has clicked and chosen on one candidate, the voting result will be displayed and user should not be allowed to vote again.
<!DOCTYPE html>
<html>
<head>
<title>Elections</title>
</head>
<body>
<form id="form1" method="post">
<div>
<table>
<tr>
<td>Harry</td>
<td><input id="Harry" name="submit" type="submit" value="Vote Harry" /></td>
</tr>
<tr>
<td>John</td>
<td><input id="John" name="submit" type="submit" value="Vote John" /></td>
</tr>
<tr>
<td>Bryan</td>
<td><input id="Bryan" name="submit" type="submit" value="Vote Bryan" /></td>
</tr>
<tr>
<td>Jack</td>
<td><input id="Jack" name="submit" type="submit" value="Vote Jack" /></td>
</tr>
</table>
</div>
<div>
#if (result != "")
{
<p>#result</p>
}
<!--Ensure that user has voted before showing the vote results-->
#if (voteCheck == true)
{
<p>Total Votes: #Session["totalVotes"]</p> <!--using session allows values to be kept even after button click-->
<p> Harry: #Session["Harry"]</p>
<p> John: #Session["John"]</p>
<p> Bryan: #Session["Bryan"]</p>
<p> Jack: #Session["Jack"]</p>
}
</div>
</form>
</body>
</html>
You need an action attribute to the form action="youraction/controller here"
And in youraction you write some C# code return list of display value ("none" or "")
And in cshtml you add style="display:#display"
<input id="Harry" name="submit" type="submit" style="display:#display" value="Vote Harry" />
You could simply add a Ternary operator that check the session object and sets the disabled property accordingly.
<input id="Harry" #(Session["Harry"] != null ? "disabled" : "") name="submit" type="submit" value="Vote Harry" />
I have a little question... I dont know whats happening but submit event is working because when I click "ingresar" submit button, it sends all the data.
But when I press enter nothing happens.
I think the problem is that i have the form inside of a table....
Am I wrong? I think the problem is here because,as I said, when i press Ingresar submit button it sends the data.
Thx for your help! :)
<form id="forma-recurso" method="POST">
<table >
<tr>
<td><p>Nombre recurso:</p></td>
<td><input type="text" class="campo nombre-recurso" maxlength="50"></td>
</tr>
<tr>
<td><p>Dirección:</p></td>
<td><input type="text" class="campo direccion-recurso" maxlength="50"></td>
</tr>
<tr>
<td><p>Descripción:</p></td>
<td><input type="text" class="campo descripcion-recurso" maxlength="100"></td>
</tr>
<tr>
<td><p>Tipo de punto de interés:</p></td>
<td><select type="text" class="campo tipo-pto-interes">
<?php
$conexion=pg_connect("host= localhost port=5432 dbname=EmergenciesResponse user=postgres password=asdf");
$registros=pg_query("select tipo_pto, tipo_pto_interes from tipos_ptos_interes where tipo_pto_interes BETWEEN 1 AND 4");
while ($reg=pg_fetch_array($registros))
{
echo "<option value=\"$reg[tipo_pto_interes]\">$reg[tipo_pto]</option><br>";
}
pg_close($conexion);
?>
</select></td>
</tr>
<tr>
<td><p>Latitud/longitud</p></td>
<td><input type="text" class="latlng" disabled></td>
</tr>
<tr>
<td class="salida-btn"><button class="btn-salir">Salir</button></td>
<td class="ingreso-boton"> <input type="submit" class="ingresar-recurso"value="Ingresar"></td>
</tr>
</table>
</form>
Your HTML code seems to be okay, so there must be something in your browser or in the PHP code: the "enter submit" doesn't work when the submit button is not present in the form, otherwise, it should work.
You can see if it is working using inspector tool, press f12 to open it in your browser, change to networking tab, and try to click on submit button if something happens its ok.
I notice that in your form you are not using action form atribute, try it like this example: http://www.w3schools.com/html/html_forms.asp
Sorry for asking something that seems to have been asked many times, but is because I'd not found anything so... simple as my case, so I'm not so sure about that path to follow.
The thing is, I have a form, in the page "estimate.php" with most of its input types as Text, and some checkboxes. Its action is set to "insert.php", where is the code that sends the e-mail, and sends the data to the database, and on the end of it, an alert and a redirection to the form page.
When I fill the form without checking anything on the checkboxes, everything works just fine, the database columns are filled perfectly, and the e-mail is correctly sent, the fields that were supposed to receive the checkboxes values are blank, as it was supposed to be, since I've not filled them. But once I try to use the checkboxes, when I hit Submit, I get a empty page, and the address freezes on insert.php. I'm not sure what is happening, but since I haven't worked with Checkbox to SQL before, and I'm pretty newbie on coding, I think it has something to do with the way I'm trying to process the data from the checkboxes to send it to the db. I understood that, setting values to each checkbox, it would post them as text.
Here are the codes (the most important parts of if, to try to summarize. [...] are in place of parts I took away, to make it more simple for you to help me.)
-
FORM:
<form id="contact-form" action="../painel/insert.php" method="POST">
//[...]
<div style="margin-top: 20px;">
<p style="margin-bottom: 0;">Quantidade de pares por numeração</p>
<br />
<div class="table-responsive">
<table class="table table-bordered">
<tr>SANDÁLIAS INFANTIS</tr>
<thead>
<tr>
<th class="text-center">Numeração</th>
<th class="text-center">Quantidade</th>
<th class="text-center">Alça</th>
</tr>
</thead>
<tbody>
<tr>
<td>25/26</td>
<td><input type="text" name="i2526_quant"></td>
<td style="text-align: left;">
<input type="checkbox" name="i2526_a" value="Slim"> Slim<br>
<input type="checkbox" name="i2526_a" value="Tradicional"> Tradicional
</td>
</tr>
<tr>
<td>27/28</td>
<td><input type="text" name="i2728_quant"></td>
<td style="text-align: left;">
<input type="checkbox" name="i2728_a" value="Slim"> Slim<br>
<input type="checkbox" name="i2728_a" value="Tradicional"> Tradicional
</td>
</tr>
<tr>
<td>29/30</td>
<td><input type="text" name="i2930_quant"></td>
<td style="text-align: left;">
<input type="checkbox" name="i2930_a" value="Slim"> Slim<br>
<input type="checkbox" name="i2930_a" value="Tradicional"> Tradicional
</td>
</tr>
<tr>
<td>31/32</td>
<td><input type="text" name="i3132_quant"></td>
<td style="text-align: left;">
<input type="checkbox" name="i3132_a" value="Slim"> Slim<br>
<input type="checkbox" name="i3132_a" value="Tradicional"> Tradicional
</td>
</tr>
</tbody>
</table>
</div>
//[...]
<input type="submit" class="submit no-margin-bottom" value="Enviar" style="font-size:20 px; padding: 10px; border: 3px solid #555555;"/>
</form>
-
THE CODE, on Insert.php:
<?php
include "conexao.php";
//[...]
$i2526_quant = $_POST['i2526_quant'];
$i2526_a = $_POST['i2526_a'];
$i2728_quant = $_POST['i2728_quant'];
$i2728_a = $_POST['i2728_a'];
$i2930_quant = $_POST['i2930_quant'];
$i2930_a = $_POST['i2930_a'];
$i3132_quant = $_POST['i3132_quant'];
$i3132_a = $_POST['i3132_a'];
//[...]
$inserir = "INSERT INTO orcamento VALUES([...],'$i2526_quant','$i2526_a','$i2728_quant','$i2728_a','$i2930_quant','$i2930_a','$i3132_quant','$i3132_a',[...])";
//[...](here is the part of the code that sends the e-mail. As I said, everything is working fine, except for the checkboxes (actually, I took away the part from the code that would send the checkbox values to the e-mail and tested it again, and it didn't work. Since the code is pretty long, I decided not to post it (if you need to, I will).
$enviado = $mail->Send();
if ($enviado) {
//$envia = mail($recipient, $subject, $message, $headers);
echo '<script>alert("Obrigado! Orcamento enviado com sucesso, responderemos o mais breve possível.");location="../estimate.php";</script>';
}else{
echo '<script>alert("Erro ao enviar orcamento.");location="../estimate.php";</script>';
} }
?>
--
Thank you very much in advance. I'm sorry for the poor english, and for being such a newbie, as I'm pretty sure this is a simple thing to solve, but hey, here I am trying to learn from the bests (:
Try to add [] after the checkbox name in your HTML file. This will post them as an array to your PHP file. If you don't do that there is no possibility to have several checked values.
Not sure if this solves your error. You should be able to get more information though by adding the following to the top of your insert.php file:
error_reporting = E_ALL;
ini_set('display_errors', 'On');
This enables error reporting for the file and should output what's going wrong. Make sure to remove that after fixing your error.
I am stuck with a tabindex problem here. As you can see in the HTML mock up, I have four buttons namely "Add", "Subtract", "Save" and "Close". When user Hits the Tab key, the flow starts correctly from Add-> Subtract-> Save-> Close, but after Close if user hits the Tab key again, the focus goes to the TD TAG with comment "Jumping Here". What I want it to do is to go to Add button instead. I tried giving all Buttons a tabindex of 1, 2, 3, 4 then I tried giving every button an index of 1 and rest of the places as -1 but that didnt solve the problem either. How do I solve this issue?
http://jsfiddle.net/t3ch/aNxjy/
Pretty sure this is not possible. Just because you have a form with tabindex values, it doesn't mean those are the only elements that will receive focus. Even browser components, like the address bar, will receive focus at some point. The browser will use the tabindex you specify, but after that tabbing will cycle through everything else.
I don't like this idea but a way you could achieve this is registering an onblur event for the Close Button, then set the focus to what ever control you wanted...
This does work....
function resetFocusIndex(){
var obj = document.getElementsByName('addIt');
if(obj[0])
obj[0].focus();
}
<INPUT TYPE="button" tabindex = "1" VALUE="Close" NAME="closeIt" onblur="resetFocusIndex()">
UPDATE
<html>
<head>
<script>
function resetFocusIndex(){
var obj = document.getElementsByName('addIt');
if(obj){
obj[0].focus();
}
}
</script>
</head>
<body>
<TABLE WIDTH=95%>
<TR>
<TD><INPUT TYPE="button" tabindex = "1" id="test2" VALUE="Add" NAME="addIt"></TD>
<TD><INPUT TYPE="button" tabindex = "1" VALUE="Subtract" NAME="minusIt"></TD>
<TD> </TD>
</TR>
</TABLE>
<DIV>
<TABLE BORDER="1" CELLSPACING="0" CELLPADDING="1">
<TD> </TD>
<TD>First</TD>
<TD>Second</TD>
<TD>Third</TD>
<TD>Fourth</TD>
<TR>
<!-- Jumping Here --> <TD><INPUT TYPE="radio" NAME="selected" tabindex = "-1" VALUE=""></TD>
<TD><INPUT TYPE="text" tabindex="-1" NAME="" VALUE="" disabled></TD>
<TD ></TD>
<TD><INPUT TYPE="text" tabindex="-1" NAME="" VALUE="" disabled> </TD>
<TD><INPUT TYPE="text" tabindex="-1" NAME="" VALUE="" disabled> </TD>
<INPUT TYPE="hidden" NAME="" VALUE="">
<INPUT TYPE="hidden" NAME="" VALUE=""></TD>
</TR>
</TABLE>
</DIV>
<TABLE>
<TR>
<TD>Click Here!</TD>
</TR>
<TR><TD> </TD></TR>
<TR>
<TD>
<INPUT TYPE="button" tabindex = "1" VALUE="Save" NAME="saveIt">
<INPUT TYPE="button" tabindex = "1" VALUE="Close" id="test" NAME="closeIt" onblur="resetFocusIndex()">
</TD>
</TR>
</TABLE>
</body>
</html>
Don't do this it's an awful idea.
Have focusable items (eg input) preceding the first and following the last button in tab order. Hide them (eg by positioning them off the side of the page with position: absolute; left: -1000px;). When they get a focus event, move focus to the button at the other end of the tab order.
Don't do this it's an awful idea. Really.
First you need 'id's for the buttons, that's always good.
Then you need to set two handlers; one on the last to tab to first, and one on the first button to shif+tab to the last.
See this: http://jsfiddle.net/aNxjy/11/.
I used jquery, but you can accomplish this with regular js as well. Just that you'll have to do cross-browser compatibility.
Further to gmcalab's answer instead of getElementsByName you could use getElementById
var obj = document.getElementById('test2');
if(obj){
obj.focus();
}
or possibly:
var obj = document.getElementById('test2');
if(obj){
obj.select();
}
I can best describe this as follows:
I want this (entire table in editmode and save button in every row).
<table>
<tr>
<td>Id</td>
<td>Name</td>
<td>Description</td>
<td> </td>
</tr>
<tr>
<td><input type="hidden" name="id" value="1" /></td>
<td><input type="text" name="name" value="Name" /></td>
<td><input type="text" name="description" value="Description" /></td>
<td><input type="submit" value="Save" /></td>
</tr>
<tr>
<td><input type="hidden" name="id" value="2" /></td>
<td><input type="text" name="name" value="Name2" /></td>
<td><input type="text" name="description" value="Description2" /></td>
<td><input type="submit" value="Save" /></td>
</tr>
<!-- and more rows here ... -->
</table>
Where should I put the <form> tags?
It's worth mentioning that this is possible in HTML5, using the "form" attribute for input elements:
<table>
<tr>
<td>Id</td>
<td>Name</td>
<td>Description</td>
<td> </td>
</tr>
<tr>
<td><form id="form1"><input type="hidden" name="id" value="1" /></form></td>
<td><input form="form1" type="text" name="name" value="Name" /></td>
<td><input form="form1" type="text" name="description" value="Description" /></td>
<td><input form="form1" type="submit" value="Save" /></td>
</tr>
<tr>
<td><form id="form2"><input type="hidden" name="id" value="1" /></form></td>
<td><input form="form2" type="text" name="name" value="Name" /></td>
<td><input form="form2" type="text" name="description" value="Description" /></td>
<td><input form="form2" type="submit" value="Save" /></td>
</tr>
</table>
While clean in its lack of JS and use of original elements, unfortunately this isn't working in IE10.
I had a similar question and this answer in question HTML: table of forms? solved it for me. (Not sure if it is XHTML, but it works in an HTML5 browser.)
You can use css to give table layout to other elements.
.table { display: table; }
.table>* { display: table-row; }
.table>*>* { display: table-cell; }
Then you use the following valid html.
<div class="table">
<form>
<div>snake<input type="hidden" name="cartitem" value="55"></div>
<div><input name="count" value="4" /></div>
</form>
</div>
You can't. Your only option is to divide this into multiple tables and put the form tag outside of it. You could end up nesting your tables, but this is not recommended:
<table>
<tr><td><form>
<table><tr><td>id</td><td>name</td>...</tr></table>
</form></td></tr>
</table>
I would remove the tables entirely and replace it with styled html elements like divs and spans.
I wrote the below over ten years ago, when the world was a different place. These days I know of many ways to crack this particular nut, but a quick and dirty solution that will validate is to do much the same but use CSS tables for layout, not a regular HTML table.
I'd say you can, although it doesn't validate and Firefox will re-arrange the code (so what you see in 'View generated source' when using Web Developer may well surprise). I'm no expert, but putting
<form action="someexecpage.php" method="post">
just ahead of the
<tr>
and then using
</tr></form>
at the end of the row certainly gives the functionality (tested in Firefox, Chrome and IE7-9). Working for me, even if the number of validation errors it produced was a new personal best/worst! No problems seen as a consequence, and I have a fairly heavily styled table. I guess you may have a dynamically produced table, as I do, which is why parsing the table rows is a bit non-obvious for us mortals. So basically, open the form at the beginning of the row and close it just after the end of the row.
The answer of #wmantly is basicly 'the same' as I would go for at this moment.
Don't use <form> tags at all and prevent 'inappropiate' tag nesting.
Use javascript (in this case jQuery) to do the posting of the data, mostly you will do it with javascript, because only one row had to be updated and feedback must be given without refreshing the whole page (if refreshing the whole page, it's no use to go through all these trobules to only post a single row).
I attach a click handler to a 'update' anchor at each row, that will trigger the collection and 'submit' of the fields on the same row. With an optional data-action attribute on the anchor tag the target url of the POST can be specified.
Example html
<table>
<tbody>
<tr>
<td><input type="hidden" name="id" value="row1"/><input name="textfield" type="text" value="input1" /></td>
<td><select name="selectfield">
<option selected value="select1-option1">select1-option1</option>
<option value="select1-option2">select1-option2</option>
<option value="select1-option3">select1-option3</option>
</select></td>
<td><a class="submit" href="#" data-action="/exampleurl">Update</a></td>
</tr>
<tr>
<td><input type="hidden" name="id" value="row2"/><input name="textfield" type="text" value="input2" /></td>
<td><select name="selectfield">
<option selected value="select2-option1">select2-option1</option>
<option value="select2-option2">select2-option2</option>
<option value="select2-option3">select2-option3</option>
</select></td>
<td><a class="submit" href="#" data-action="/different-url">Update</a></td>
</tr>
<tr>
<td><input type="hidden" name="id" value="row3"/><input name="textfield" type="text" value="input3" /></td>
<td><select name="selectfield">
<option selected value="select3-option1">select3-option1</option>
<option value="select3-option2">select3-option2</option>
<option value="select3-option3">select3-option3</option>
</select></td>
<td><a class="submit" href="#">Update</a></td>
</tr>
</tbody>
</table>
Example script
$(document).ready(function(){
$(".submit").on("click", function(event){
event.preventDefault();
var url = ($(this).data("action") === "undefined" ? "/" : $(this).data("action"));
var row = $(this).parents("tr").first();
var data = row.find("input, select, radio").serialize();
$.post(url, data, function(result){ console.log(result); });
});
});
A JSFIddle
You just have to put the <form ... > tag before the <table> tag and the </form> at the end.
Hopte it helps.
In fact I have the problem with a form on each row of a table, with javascript (actually jquery) :
like Lothre1 said, "some browsers in the process of rendering will close form tag right after the declaration leaving inputs outside of the element"
which makes my input fields OUTSIDE the form, therefore I can't access the children of my form through the DOM with JAVASCRIPT..
typically, the following JQUERY code won't work :
$('#id_form :input').each(function(){/*action*/});
// this is supposed to select all inputS
// within the form that has an id ='id_form'
BUT the above exemple doesn't work with the rendered HTML :
<table>
<form id="id_form"></form>
<tr id="tr_id">
<td><input type="text"/></td>
<td><input type="submit"/></td>
</tr>
</table>
I'm still looking for a clean solution (though using the TR 'id' parameter to walk the DOM would fix this specific problem)
dirty solution would be (for jquery):
$('#tr_id :input').each(function(){/*action*/});
// this will select all the inputS
// fields within the TR with the id='tr_id'
the above exemple will work, but it's not really "clean", because it refers to the TR instead of the FORM, AND it requires AJAX ...
EDIT : complete process with jquery/ajax would be :
//init data string
// the dummy init value (1=1)is just here
// to avoid dealing with trailing &
// and should not be implemented
// (though it works)
var data_str = '1=1';
// for each input in the TR
$('#tr_id :input').each(function(){
//retrieve field name and value from the DOM
var field = $(this).attr('name');
var value = $(this).val();
//iterate the string to pass the datas
// so in the end it will render s/g like
// "1=1&field1_name=value1&field2_name=value2"...
data_str += '&' + field + '=' + value;
});
//Sendind fields datawith ajax
// to be treated
$.ajax({
type:"POST",
url: "target_for_the_form_treatment",
data:data_string,
success:function(msg){
/*actions on success of the request*/
});
});
this way, the "target_for_the_form_treatment" should receive POST data as if a form was sent to him (appart from the post[1] = 1, but to implement this solution i would recommand dealing with the trailing '&' of the data_str instead).
still I don't like this solution, but I'm forced to use TABLE structure because of the dataTables jquery plugin...
Im late to the party, but this worked great for me and the code should explain itself;
<script type="text/javascript">
function formAJAX(btn){
var $form = $(btn).closest('[action]');
var str = $form.find('[name]').serialize();
$.post($form.attr('action'), str, function(data){
//do stuff
});
}
<script>
HTML:
<tr action="scriptURL.php">
<td>
Field 1:<input type="text" name="field1"/>
</td>
<td>
Field 2:<input type="text" name="field2" />
</td>
<td><button type="button" onclick="formAJAX(this)">Update</button></td>
</tr>
If you try to add a form warping a tr element like this
<table>
<form>
<tr>
<td><input type="text"/></td>
<td><input type="submit"/></td>
</tr>
</form>
</table>
some browsers in the process of rendering will close form tag right after the declaration leaving inputs outside of the element
something like this
<table>
<form></form>
<tr>
<td><input type="text"/></td>
<td><input type="submit"/></td>
</tr>
</table>
This issue is still valid for warping multiple table cells
As stereoscott said above, nesting tables are a possible solution which is not recommended.
Avoid using tables.
<table >
<thead >
<tr>
<th>No</th><th>ID</th><th>Name</th><th>Ip</th><th>Save</th>
</tr>
</thead>
<tbody id="table_data">
<tr>
<td>
<form method="POST" autocomplete="off" id="myForm_207" action="save.php">
<input type="hidden" name="pvm" value="207">
<input type="hidden" name="customer_records_id" value="2">
<input type="hidden" name="name_207" id="name_207" value="BURÇİN MERYEM ONUK">
<input type="hidden" name="ip_207" id="ip_207" value="89.19.24.118">
</form>
1
</td>
<td>
207
</td>
<td>
<input type="text" id="nameg_207" value="BURÇİN MERYEM ONUK">
</td>
<td>
<input type="text" id="ipg_207" value="89.19.24.118">
</td>
<td>
<button type="button" name="Kaydet_207" class="searchButton" onclick="postData('myForm_207','207')">SAVE</button>
</td>
</tr>
<tr>
<td>
<form method="POST" autocomplete="off" id="myForm_209" action="save.php">
<input type="hidden" name="pvm" value="209">
<input type="hidden" name="customer_records_id" value="2">
<input type="hidden" name="name_209" id="name_209" value="BALA BAŞAK KAN">
<input type="hidden" name="ip_209" id="ip_209" value="217.17.159.22">
</form>
2
</td>
<td>
209
</td>
<td>
<input type="text" id="nameg_209" value="BALA BAŞAK KAN">
</td>
<td>
<input type="text" id="ipg_209" value="217.17.159.22">
</td>
<td>
<button type="button" name="Kaydet_209" class="searchButton" onclick="postData('myForm_209','209')">SAVE</button>
</td>
</tr>
</tbody>
</table>
<script>
function postData(formId,keyy){
//alert(document.getElementById(formId).length);
//alert(document.getElementById('name_'+keyy).value);
document.getElementById('name_'+keyy).value=document.getElementById('nameg_'+keyy).value;
document.getElementById('ip_'+keyy).value=document.getElementById('ipg_'+keyy).value;
//alert(document.getElementById('name_'+keyy).value);
document.getElementById(formId).submit();
}
</script>