Advertisement

02.06.2008 at 09:23AM PST, ID: 23141927
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.2

Upon ASP.NET form submission have jQuery intercept and post the form response

Asked by ctdigital in JavaScript, Cascading Style Sheets (CSS), .NET Framework 2.x

Tags:

Ok I am going to try and explain this as best as possible.  Here is what I am trying to do.  Because we have a content management system  - I am not able to access the .NET files that call all functionality to our pages.

My question is can I use jQuery to simulate the form submission and populate a div tag with the results?

I do not want to send any form information, validate any form information etc.  This is already all done on the ASP side.  

If you look at the code I provided you'll see the ASP code I have to use is all runat=server, and the form has no action for any script to post to.  This is how our system is set up and I cannot change it.  When the page loads, a __postBack appears within the link's HREF field.  I've heard postBacks are messy and I want to know what can be done

I want everything to work as it does now, however I just don't want to leave the page.  

Example:

- User comes to index page and fills out 3 form fields and hits submit
-  NORMALLY this user would then validate through a validation page, and be kicked back index page saying they need to fill out more required form fields
- Keep in mind using jQuery I do not want to handle the data at all - I just want to pass the form process through a div layer... so that the user does not have to leave the page.  
- My goal is when the user submits the form the page does not need to reload

The code I provided cannot be greatly modified so please try to work with what is provided

I'm capable of doing a jquery "ajax" form submission in normal circumstances but my knowledge of intercepting it on a .NET level is close to none.

Please let me know if this can or can't be done
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
<%@ Page Inherits="LandingPages.Web.UI.Page" %>
 
<script type="text/javascript" src="javascript/jQuery.js"></script>
 
</head>
<body>
<form id="Form1" method="post" runat="server">
<input name="Phone1" type="text" id="Phone1" style="width:30px;" runat="server" valuetype="Telephone">)
<input name="Phone2" type="text" id="Phone2" style="width:30px;" runat="server" valuetype="Telephone"> - 
<input name="Phone3" type="text" id="Phone3" style="width:30px;" runat="server" valuetype="Telephone">
<input type="text" runat="server" valuetype="NameOnCard" style="width:200px;" name="NameOnCard" id="NameOnCard">
 
 
 <a href="" id="a1" runat="server" valuetype="SubmitYes">CLICK ME TO SUBMIT</a>
 
</form>
</body>
</html>
[+][-]02.07.2008 at 02:20AM PST, ID: 20839604

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: JavaScript, Cascading Style Sheets (CSS), .NET Framework 2.x
Tags: jQuery ASP .NET
Sign Up Now!
Solution Provided By: Lakio
Participating Experts: 2
Solution Grade: A
 
 
[+][-]03.03.2008 at 08:20AM PST, ID: 21032956

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628