Awww, be nice, now... I'm just learning basic JS syntax. Thanks for the help, MorningZ and Liam... it's working.
> -----Original Message----- > From: [email protected] [mailto:[email protected]] On > Behalf Of MorningZ > Sent: Friday, December 12, 2008 9:08 AM > To: jQuery (English) > Subject: [jQuery] Re: What's the correct way to write this code? > > > Wow, this is just basic JavaScript syntax > > if (conditon) { > } > else { > } > > > you have > > if (response.login = "Login Successful"); > > drop the semi-colon after both your (conditions) > > > > On Dec 12, 8:58 am, "Rick Faircloth" <[email protected]> wrote: > > How should this be written? I can't figure it out. > > I keep getting "syntax error: else" > > > > success: function(response){ > > > > if (response.login = "Login Successful"); > > {top.location.href = "site_manager.cfm"} > > > > else > > > > if (response.login == "Login Unsuccessful"); > > {$('#contentdiv').empty().fadeIn(1000).append(response.login)}; > > > > }

