PDA

View Full Version : problem in opening a URL using window.open


aavin
04-06-2010, 03:33 PM
hi!!!

Actually i want to open an URL which is stored in a variable.For that i used window.open method,but what i get in the address bar of the window is with a

prefix.. http://localhost/http://...(sitename)
the code line i used is
[ICODE]window.open ("<?php echo $urltouse ?>", "mywindow","location=1,status=1,scrollbars=1,width=100,height=100");

how should i remove the prefix so that i get to open the correct URL?
Please correct me if i am wrong any where.

Stooshie
04-07-2010, 11:57 AM
The javascript looks fine.

I suspect it may be to do with the way the php variable $urltouse is formed.

Do you have http:// on your initial URL?

aavin
04-08-2010, 10:38 AM
thank you stooshie for ur reply,

the variable is working for URL other than .aspx.
This point i realized after posting, can you help me out with this