|
BobJanova wrote: That looks like it will only work with .Net on the client side (i.e. on Windows), and probably only in IE.
Nope. It works in Firefox, Chrome and Opera here. It's using the built-in XmlHttp object, which was added to all browsers several years ago.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
You need to add an extra step to your submission process, if you want AJAX validation before submitting. At the moment your workflow looks like
Press button -> client validation -> post to server
... as a synchronous process. You need to do
Press button -> client validation -> send AJAX validation request (...) receive AJAX response -> post to server
The (...) is an asynchronous wait with an event handler set. As for all AJAX queries you need to handle long delays and dropped connections gracefully.
Do you actually need this? I would think that people would expect a 'Submit' button to submit a postback, and for it to return them to the form after a postback with server-side validation errors would be acceptable. You will always have to do the server side validation anyway, so this is purely a user convenience feature.
|
|
|
|
|
You're right actually, I probably don't need this feature. I have implemented server side validation which will ensure that invalid data doesn't get saved, so I suppose the post back is only a minor inconvenience to the user. There will still be the inline validation so the likelihood is that the user will correct their errors before submitting anyway (or maybe not!).
Thanks a lot
Jay
|
|
|
|
|
wow that got complicated
submit button > client script- if valid postback
So I would just add the onClientClick="return validate_Form();"
And write a simple function first in javascript/jquery
test if the fields are empty
test the field data
regex the email address,
if validation completes, then return true to fire the postback
Then you can get fancy, and add an ajax call to check for duplicate email address,
I would use onblurr for that, so it only fires once, and if a duplicate exist, focus the email field again.
|
|
|
|
|
dear sir...
i am starting coding with asp.net. i need your help. i want to ask that is how can i add given source code by you.
please help me and give suggestions for me how can i good command on coding of asp.net.
thanks sir
|
|
|
|
|
Which source code are you referring to and what are you trying to add it to? Please try and explain more clearly what problem you are trying to solve.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
firstly i want to say thanks for your reply....!!
sir i am starting coding with asp.net. i want to create a website for minimum functionality.so i need some technical help. i have lot of confusion....so please guide me.
|
|
|
|
|
I would suggest you start here[^] and work through some of the tutorials.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
i am doing my final year project n m stucked...can anybody complete my project on payment..its 70% completed already...for the rest of 30% i will pay..
|
|
|
|
|
Short answer: No. This site does not provide the service you require.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Oh tish I say Richard. You have missed out on a bit of business skill there - why, for £2000 a day, I would be more than willing to finish the project (the money to be paid before the code is released of course).
|
|
|
|
|
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
LOL
Hey, at least he offered money for the services and was totally honest about it.
|
|
|
|
|
Sure, no worries.
How much you gonna pay?
|
|
|
|
|
If you say "plx" because it is shorter than "please", I say "no" because it is shorter than "yes"
--
"My software never has bugs. It just develops random features."
|
|
|
|
|
+5. Love this answer.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
How do i write an SQL query for alphabetical ordered list?
SELECT countryName
FROM tblCountry
ORDER BY countryCode ASC
this queary nt correct???
|
|
|
|
|
I think you should order by countryName as suggested here[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Iam using asp.net C#, when trying to add app_data folder ,its disabled help me
|
|
|
|
|
You will need to provide a lot more information than the above if you expect an answer. Remember, no one can see your screen so we have no idea what is going on at the time you get the problem.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Are you using Visual Studio?
If so, use the mouse on your web project, and right click to add a folder, and call it App_Data.
You should see a gear in front of it when completed.
If you did it by hand, in windows, then you have to right click and include the folder in your project.
|
|
|
|
|
yes am using visual studio, i tried by that way but still it was disabled, and now i am using ado.net to connect to database.
|
|
|
|
|
I have dtEffectiveDate textbox and assigned postback event for _TextChanged.
Is it possible to do the same logic without postback event?
Private Sub dtEffectiveDate_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles dtEffectiveDate.TextChanged
If IsDate(dtEffectiveDate.Text) Then
If Session("myInsPlanConfiguration").Installment = True Then
If chkIgnoreEventDates.Checked = False Then
If String.IsNullOrEmpty(dtEvent1.Text) = True Then
dtEvent1.Text = DateAdd(DateInterval.Day, -8, CDate(dtEffectiveDate.Text))
End If
End If
End If
End If
End Sub
|
|
|
|
|
You would have to use javascript, the onclick event
Javascript can do everything but the session compare, you would have to store the session compare value in a hidden textbox, or generate the data using javascript.
so you add
<input type="text" onblur="myFunction();">
ad your javascript file
function myFunction() {
}
|
|
|
|
|
yes you can do this n javascript/Jquery. without doing postback.
|
|
|
|