473,320 Members | 1,951 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Evaluate login result and do something...

Hello again Bytes and TGIF!

I've got an index page (text version) that has a login form with data being sent to a file called pwcheck.php (txt version)

With a good login the success message is being displayed correctly but I need to then reload the index page.

However I do not need to reload index if the login fails, instead report the failure and simply clear the form fields for another try.

How does one evaluate the response from pwcheck.php and act differently based on the html data returned?

Please excuse my code, I'm sure it's sub-par, but I'm java-rookie-supreme with tons more questions than answers.

Respectfully,
Aaron
Sep 11 '09 #1
3 1446
acoder
16,027 Expert Mod 8TB
If you're going to reload the page on success, why not do away with Ajax?

To evaluate the result, get the responseText and check its content. You can code your server-side code to return a particular response for failure which you can check for.
Sep 12 '09 #2
Let me move the htaccess file out of the way again so it's visible.

I prefer to keep it as seamless as possible acoder.

Ultimately I'd like to login, evaluate for success and if good, load/show the large data table (#entrytext) table under the (#onshdr)

I guess by using the post method I'm not going to achieve that?
Is that also is contributing to the loading image being useless right now?

user credentials: tmp:tmp

Regards,
Aaron
Sep 12 '09 #3
acoder
16,027 Expert Mod 8TB
Since you're using jQuery, check out the documentation on Ajax.
Sep 14 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Steve Fitzgerald | last post by:
The below login script does work. The form does not seem to be submitting. I keep getting the username and password fields. The only errors I get are notices that email and password and undefined...
17
by: orekinbck | last post by:
Hi There Say I want to check if object1.Property1 is equal to a value, but object1 could be null. At the moment I have code like this: if (object1 != null) { if (object1.Property ==...
0
by: ruju00 | last post by:
I am getting an error in Login() method of the following class FtpConnection public class FtpConnection { public class FtpException : Exception { public FtpException(string message) :...
1
by: xcelmind | last post by:
Hello Dev. Guru, I want to at this time introduce myself. I am Stanley Ojadovwa by name. I’m a freelance and a newbie in web application development. I’m currently using ASP as my application...
2
by: dylanhughes | last post by:
I'm looking for an example of a login system that has multiple fields (2 to be exact) + password. e.g username, company name and password, the user, company and password are checked against a mysql...
2
by: sheaguevara | last post by:
This is my first post onto the forum. So first off, I'd like to say hello to everyone. I just started working on a login/registration system and I am trying to have a feature where the user will...
1
by: Adrock952 | last post by:
I have a link on my site which obviously says "Login" where users log in. I would like that link to be changed to "Logout" when the user has successfully logged in and the session has been created...
10
by: DavidPr | last post by:
When I logout as one user and log in under a different user, it opens with the last user's information. User 1 - Unsername: Davey Jones User 2 - Unsername: David Smith I log out from Davey...
9
by: adweaver | last post by:
Hello All, I'm new to the world of php. I've just had a site designed for me by a company, and I'm now trying to manage and grow it, so it will suit my needs. The site was built in a folder...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.