Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Ajax question


  • From: paul at juniperwebcraft.com (Paul Novitski)
  • Subject: [Javascript] Ajax question
  • Date: Sat Dec 30 14:48:37 2006

At 12/30/2006 12:27 PM, tedd wrote:
>I see and have considered the timing difference. I should have said 
>"I want to use ajax to send a variable and then refresh the current 
>page, or a redirect to any other page."


May I ask why you want to load new content with ajax AND redirect to 
another page?  Surely the redirect will make the ajax request 
pointless.  Or is the purpose of the ajax request simply to set a 
session variable as in your example?

>    <a onclick="javascript:sndReq('rock'); location.href='';" >Rock </a>

Is javascript returning properly after the sndReq() call?  Can you 
put alert('hello'); after sndReq() and have it activate?  If not, I'd 
imagine that's your problem.  One thing to look for is an invalid 
javscript statement in sndReq() that's halting the interpreter before 
it can return.

You'd probably get better quality feedback if you'd post your code so 
we can help you check it for errors.

Regards,
Paul