[thelist] Window Popup Problem

Chris at globet.com Chris at globet.com
Fri Feb 17 12:10:19 CST 2006


John

> Thanks for your help with this. In reference to using the javascript..
> I'm not worried about users who don't have javascript... this 
> is a controlled environment and everyone will be using 
> javascript enabled browsers.

What if the system grows, and javascript errors are introduced? This
would prevent the window from opening at all. As the method that I
outlined would have (as far as I can see) no impact at all on the way
that your system works when functionaing as planned and a negligeable
outlay to implement - perhaps the question to consider is "Why not?"
rather than "Why?".

> The reason why there is a # in the href, and I'm using the 
> onclick event is because I have about 50+ href links on this 
> page and each of them call the same form, carrying a 
> variable. I'm not too knowledgeable about Javascript, but I 
> got this to work.

What does your form do with the variable value? Are you
over-complicating things? How do you verify that the URI that is being
supplied is a valid URI for the system to use? Are you positive that
your system is not vulnerable to an XSS attack?
http://www.cgisecurity.com/articles/xss-faq.shtml

In addition, (IMHO) if you have more than one javascript statement to be
executed within an event handler, you should be writing a function and
calling the function in the event handler.

> So, I guess, to Chris's point, I need a way of targeting the 
> new window "_blank" instead of itself "#". 

Set the 'target' attribute of the form to '_blank'.

Chris Marsh
Web Developer
http://www.globet.com/
Tel: +44 20 8246 4804 Ext 828
Fax: +44 20 8246 4808

Any opinions expressed in this email are those of the individual and not
necessarily the Company. This message is intended for the use of the
individual or entity to which it is addressed and may contain
information that is confidential and privileged and exempt from
disclosure under applicable law. If the reader of this message is not
the intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this communication is strictly prohibited.
If you have received this communication in error, please contact the
sender immediately and delete it from your system. 



More information about the thelist mailing list