Skip to content
Advertisement

How to stop Ajax success(response) from showing the entire html structure on my element

I am building a user logon system on my website. My code works fine with no problems. See the the reset password Ajax request.

html

JavaScript

PHP

JavaScript

The problem is after a successful reset password. The div show my #forgotPass response plus the entire html structure. Why is that and how to stop it. Thanks. See the below html structure displayed in my div

JavaScript

I do not all this to be displayed in my div. But only the massageShow = ‘We have send you password reset link’, ‘Please check you email!’

Advertisement

Answer

It seems as though the SMTP debugging is being immediately output. If you comment out the line $mail->SMTPDebug = SMTP::DEBUG_SERVER;, After commenting out the line; Case has been resolved.

Credits to El_Vanja

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement