Forum OpenACS Development: MSIE redirection problem when using anchors

Hi all,

I've got a weird problem. When I ad_returnredirect to a page with a query variable and an anchor symbol, the anchor symbol gets appended to the value of the query variable. Only in MSIE6/Win. I'm posting to see if anyone else can reproduce this and to see what's the best fix, if it is reproducible.

File contents:

# /www/vktest.tcl
set id 1
ad_returnredirect vktest2?id=$id#blah


# /www/vktest2.tcl ad_page_contract { } { id } ns_return 200 text/plain "id=$id"
If you directly load http://kurup.org/vktest2?id=1#blah, that works. It's something about the redirect that causes MSIE6 to do the wrong thing.

I've found other posts about the subject: http://drupal.org/node/64437#comment-122226

Our equivalent of their solution would be to strip off the anchor in ad_page_contract.

Collapse
Posted by Dave Bauer on
Try putting a & before the #, this should do the trick.

Survey and assessment use this format with query vars and anchors in the URL

ie:

id=1&#blah

Collapse
Posted by Vinod Kurup on
Thanks Dave,

That's a much simpler fix.