My link to google doesn't work in IE

hi all, i have this:

window.location=‘http://google.com#q=testquery

works in opera / firefox / chrome / safari, but doesnt work in IE. does anyone have a fix or solution or hack around this problem?
ps: the script is just to demonstrate my problem

That works in Internet Explorer too. It will be some other issue that’s causing your problem.

We can help you get it working on Internet Explorer too, but we need to know more about what you’re doing.

A test web page that you can link us to will be most useful.

my test site is at www.JuzCode.com

it doesn’t work in my IE. my ie takes [B]http://google.com#q=testquer[/B] and translates it into [B]http://google.com#[/B] which obviously is not what i want.

I do not see why that is happening… but I would be interested in finding out.

Ill keep looking and thinking and let you know i I find anything, but pmw57 will porbably beat me to it.

However, it works for me.
Is the only problem that it is going to Google’s home and not the query you want it to?

Yes basically IE ignores everything after the # symbol… which is definitely not ok at least for my situation now,

i don’t mind a hack, i just need it to work

Quick idea, could it be that you need an escape character?
I have to run but I dont think javascript requires one for the # sign, but trying /# wouldn’t hurt would it.

Hack-wise, I got nothing that is the only way I have ever known how to have a link open a search :frowning: sorry.

When I come back, Ill do some research and get back to you.

well its nothing to do with javascript… if i open the IE browser and type manually [B]http://google.com#q=test[/B] it gives me only http://google.com whereas all the other browsers give me what i’ve typed, that is http://google.com#q=test

When you visit google.com there is a permanently moved redirect (response code: 301 Moved Permanently) to www.google.com, during which for some strange reason Internet Exporer loses the fragment identifier.

Try your luck on www.google.com instead of google.com, and let us know if you have any better results.

I.E. sends exactly the same string but Google seems to have a reason to reject it for I.E. and also Opera.
I got your code to work substituting /search?q= for /#?= . Is there any reason you can’t use that format?

heys cool, i wasn’t aware of that link thx!