Password: Surveyjunkie.com Forgot
// Show loading state on button const originalBtnText = sendBtn.innerHTML; sendBtn.disabled = true; sendBtn.style.opacity = '0.7'; sendBtn.innerHTML = ` <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="animation: spin 1s linear infinite;"> <path d="M21 12a9 9 0 11-6.219-8.56" /> </svg> Sending... `;
input:focus border-color: #FFB800; box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.2);
// Optional: placeholder animation / focus effect // add small extra polishing: if user clicks on card or something? fine
// 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); ); surveyjunkie.com forgot password
<div class="form-container"> <div class="title-section"> <h1>Forgot password?</h1> <p>No worries — we’ll send you a secure reset link to your email. Enter the address associated with your SurveyJunkie account.</p> </div>
<!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;
<button class="reset-btn" id="sendResetBtn"> <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> <path stroke-linecap="round" stroke-linejoin="round" d="M15 15l6-6m0 0l-6-6m6 6H9a6 6 0 000 12h3" /> </svg> Send reset link </button> // Show loading state on button const originalBtnText
msgDiv.innerHTML = `$iconHtml <span>$text</span>`; messageContainer.appendChild(msgDiv);
.reset-btn:hover background: #e5a700; transform: scale(0.98); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
hr margin: 0.75rem 0; border: 0; height: 1px; background: #edf2f7; // But to be safe, we return a
// main submit handler async function handleResetPassword() clearMessages(); const emailValue = emailInput.value.trim();
.back-link a color: #2c3e66; text-decoration: none; font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 6px; transition: 0.2s;
<div class="sj-card" id="app"> <div class="brand-header"> <div class="logo"> <span>Survey</span> <span>Junkie</span> </div> <div class="tagline">Earn rewards • Share your opinion</div> </div>