[Javascript] Ajax question

Paul Novitski paul at juniperwebcraft.com
Sat Dec 30 14:47:07 CST 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 




More information about the Javascript mailing list