从jscript返回使用php anchor get href

This is a php situation, just to mention that first. I have an anchor to redirect the page with some get key, value pairs. The gets will then get processed using some php function calls that I already have before redisplaying the new page with appropriate changes. I want to ask the customer a question before doing the full page refresh in case the page refresh is not required. It is a sort of 'are you sure' style warning but with more influence on what happens next than that - there are three possible outcomes to handle.

This is the sort of thing I have to make. Just to be clear, I want to use the value from the jquery as part of the redirect.

$myhtml = "<a href='#?display=".$display"."&reply=".$replyfromonclick." onclick='return onclickwindow(".$avariable.")'><img src='abc.gif'></a>"

Is it possible please?

I can imagine that the alternative is to get the jquery to do the redirect as well as the alert window, but I'm not too comfortable with how to do that. Then there is possibly an ajax solution, but again that is not within my repertoire quite yet.