2 small javascript adjustments to existing form page
$30-250 USD
Terminado
Publicado hace alrededor de 10 años
$30-250 USD
Pagado a la entrega
Hi!
I have a page that dynamically creates a bunch of forms that then through jquery/ajax submits to a target page.
I need to add two functions to the form.
1. Each generated form should have a random value from an array.
2. Each form should have its own result-div.
The current code which uses some ASP.NET server coding (taken out) looks like this:
//SERVERCODE
——————————
//SERVERCODE
%>
<script type="text/javascript" src="[login to view URL]"></script>
<script type="text/javascript" >
var USERNAMES = ['USERNAME1’, ’USERNAME2’, ’USERNAME3’];
</script>
<%
//SERVERCODE THAT FETCHES SOM VALUES AND MAKES LOOP
//Creates a ’count’ variable that increases with one for each loop count = count + 1
It basically creates a form for all items in a row.
%>
<strong>
<div id="results"></div>
<form name="contact<%=count%>" action=”[login to view URL]" method="POST" id="contact<%=count%>">
<div><%=variable1%>. <%=variable1%></div>
<div>id: <input type="text" name="id" id="id" value=<%=id%> /></div>
<div>kopare: <input type="text" name=”buyer” id=”buyer” value=”RANDOMSELECTEDUSERNAMEFROMUSERNAMESARRAY” /></div>
<div>Bud: <input type="text" name=”bid” id=”bid” value="<%=bid%>”/></div>
<div id=”result<%=count%>”></div>
<div><input type="submit" name="submit" value="Submit" /></div>
</form>
<hr>
<%
//SERVERCODE
/End of loop etc…
%>
<script type="text/javascript">
$(document).ready(function() {
$("form").submit(function() {
// Getting the form ID
var formID = $(this).attr('id');
var formDetails = $('#'+formID);
$.ajax({
type: "POST",
url: '<%=target%>.aspx',
data: [login to view URL](),
success: function (data) {
// Inserting html into the result div
//The results should be shown in each forms private div.
$('#results').html(data);
},
error: function(jqXHR, text, error){
// Displaying if there are any errors
$('#result').html(error);
}
});
return false;
});
});
</script>
Hi, I'm a recent graduate with a degree in Computer Science and a lot of experience with JavaScript. I would love to help you out on your project. The only part I'm not totally clear about is the result divs - do you mean you want the result of each specific form to post the AJAX returned data into a specific div?
Ie, <form1></form1><div1>#data would go here from form 1</div1><form2></form2><div2>#data from form2 here</div2>?
$40 USD en 2 días
5,0 (5 comentarios)
3,6
3,6
7 freelancers están ofertando un promedio de $73 USD por este trabajo
hi , please check my feedback regarding my work hope you will be satisfied , i have 3 years of php experience and have good skills in jquery and ajax , will deliver what you want , thanks
Hi PntTrading,
I am intrested in working with you. I need some more details on this requirements, I need to understand the existing thing. Could you provide me with the Url if available to check.?
Await your reply.
I'm a young and experienced frontend creative developer with a lot of enthusiasm and a desire to work, which allows me to create innovative and high quality designs.
Hi Sir,
I have worked a lot with jQuery and JavaScript and am completely aware of using it properly. I have scored 80% in jQuery test which might suggest that I have a good hold of it.
Moreover if you want I can show you a demo at first (before you award me the project) of the normal functioning of your requirement if you clarify me a bit.
Hope you will turn up to me.