Surveyjunkie.com Forgot Password Link
<div class="footer-note"> <span>🔒 Secure password recovery • SurveyJunkie trusted since 2013</span> </div> </div>
// 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>
// 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); );
// Client-side validation if (!emailValue) showMessage('error', 'Please enter your email address to reset your password.'); emailInput.focus(); return; surveyjunkie.com forgot password
.logo display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.8rem; letter-spacing: -0.3px; color: #1A2C3E;
.logo span:last-child background: transparent; font-weight: 600;
<script> (function() // DOM elements const emailInput = document.getElementById('email'); const sendBtn = document.getElementById('sendResetBtn'); const backLink = document.getElementById('backToLoginBtn'); const messageContainer = document.getElementById('messageContainer'); but i prefer empty
<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>
/* buttons */ .reset-btn width: 100%; background: #FFB800; border: none; padding: 0.9rem; font-weight: 700; font-size: 1rem; font-family: 'Inter', sans-serif; border-radius: 2rem; color: #1f2a3e; cursor: pointer; transition: 0.2s; margin-top: 0.5rem; margin-bottom: 1.25rem; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 2px 6px rgba(0,0,0,0.05);
// Event listeners sendBtn.addEventListener('click', handleResetPassword); backLink.addEventListener('click', (e) => e.preventDefault(); handleBackToLogin(); ); .logo display: inline-flex
<!-- email input form --> <div class="input-group"> <label for="email">Email address</label> <div class="input-icon"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"> <path stroke-linecap="round" stroke-linejoin="round" d="M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" /> </svg> <input type="email" id="email" placeholder="you@example.com" autocomplete="email" value=""> </div> </div>
<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>
// Allow "Enter" key inside email input to trigger reset emailInput.addEventListener('keypress', (e) => if (e.key === 'Enter') e.preventDefault(); handleResetPassword(); );
hr margin: 0.75rem 0; border: 0; height: 1px; background: #edf2f7;
// 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... `;