David Halliday wrote: > > > Hello, > > I have this link that, when clicked, oppens a popup window. I need to > pass an "id" to the new window so that the php script could process the > page. I dont really want a form and a hidden field. > > The popup window .. which is a php page .. opens alright, but the id > value is not passed. What is wrong? > > The link is like : > > <A HREF='#' onClick='check(); return false;'>click here</A> > > function check() { > window.open('?id=123456789', 'name', 'toolbar=0, titlebar = 0, > status=0, scrollbars=0, menubar=0, resizable=0, width =360, > height=250,left=220,top=175'); > } > It is the id value in the URL that I want to pass on to the popup window. > > The point is that if I use a normal link like so: > <a target="_blank" href="?id=123456789">click here</a> > > The script works fine. > > Any idea? > > _______
Ideally, you won't want "#" links. Users with no JS (and bots/search engines) can't follow those links. The best way to do it is a catch all. <a href="page.php?id=123" onclick="openpop(this.href); return false">Click</a> If js is enabled, it will open the pop, then return flase to stop the click event of the <a> from taking place.