Surveyjunkie.com Forgot Password -
/* footer */ .footer-note background: #fafcff; padding: 1.2rem 2rem; text-align: center; border-top: 1px solid #eef2f8; font-size: 0.7rem; color: #7c8ba0;
/* main card container — mimics SurveyJunkie clean, friendly UI */ .sj-card max-width: 520px; width: 100%; background: #ffffff; border-radius: 2rem; box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.05); overflow: hidden; transition: all 0.2s ease;
<!-- dynamic message area --> <div id="messageContainer"></div> </div>
.message-box.info background-color: #eef2ff; border-left-color: #3b82f6; color: #1e40af; surveyjunkie.com forgot password
// main submit handler async function handleResetPassword() clearMessages(); const emailValue = emailInput.value.trim();
/* input group style — modern, clean */ .input-group margin-bottom: 1.5rem;
<div class="back-link"> <a href="#" id="backToLoginBtn"> ← Back to sign in </a> </div> /* footer */
// Email validation (simple but robust) function isValidEmail(email) if (!email) return false; const emailRegex = /^[^\s@]+@([^\s@.,]+\.)+[^\s@.,]2,$/; return emailRegex.test(email);
// Optional: placeholder animation / focus effect // add small extra polishing: if user clicks on card or something? fine
.reset-btn:hover background: #e5a700; transform: scale(0.98); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); // But if the email looks suspiciously like "fail@example
// Simulate API call to SurveyJunkie password reset endpoint // Because this is a frontend demo, we mimic success/error based on realistic validations. async function requestPasswordReset(email) // Mimic network delay (like real AJAX) return new Promise((resolve) => setTimeout(() => // For demo: we simulate that any well-formed email gets a "reset link sent" response. // But if the email looks suspiciously like "fail@example.com" we can simulate a "not registered" error. // to showcase both flows, but respecting SurveyJunkie style: they usually say "if account exists, we send email" // However typical recovery flow: "If there's an account associated with this email, you'll receive a reset link." // We'll follow that pattern: always show success message for valid emails, but also special case for error simulation // But we can also provide realistic edge: if email is 'error@test.com' -> show generic "something went wrong" // But better to behave like SurveyJunkie's user-friendly approach: they never reveal if email exists or not to avoid enumeration. // But to be safe, we return a success message for any valid email format, but we also show an informative message. if (email.toLowerCase() === 'noaccount@example.com') // Just to illustrate different scenario: still "If account exists" approach, but we will respect standard. resolve( success: true, message: `If an account exists for $email, you’ll receive password reset instructions shortly.` ); else if (email.toLowerCase() === 'faildemo@surveyjunkie.com') // simulate server error (rare case) resolve( success: false, message: 'Unable to process your request. Please try again later or contact support.' ); else // Standard recovery flow (SurveyJunkie style) resolve( success: true, message: `Great! We've sent a password reset link to $email. Check your inbox (and spam folder) – the link expires in 1 hour.` ); , 850); );
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <title>SurveyJunkie • Reset your password</title> <!-- Google Fonts & simple reset --> <link href="https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400;14..32,500;14..32,600;14..32,700&display=swap" rel="stylesheet"> <style> * margin: 0; padding: 0; box-sizing: border-box;
// Prefill for demo (optional) but not invasive // we can set an example but empty field is nicer, but for demo showing something relevant? // We'll set placeholder only, no default value. // however to show how it looks when filled: maybe set a demo email? but i prefer empty. // But to match the "looking at surveyjunkie forgot password", it's perfect. console.log('SurveyJunkie password reset component ready'); )(); </script> </body> </html>