PDA

View Full Version : JS window.open link followed, though it's in a function


blueyed
09-24-2004, 05:05 AM
Hi.

We have a JS function like this, which gets written into the header of some pages:

function popupURL(url_to_open, w, h) {
var options = "toolbar=no,";
[...
window.open(url_to_open, "popup", options);
}


This results in PhpDig trying to get this uris:
/path/url_to_open,%20
/path/url_to_open,%20/

I think the search for links in JS should check if it's inside a function..

vinyl-junkie
09-24-2004, 05:27 PM
Here's what the documentation (http://www.phpdig.net/navigation.php?action=doc#toc3) says about that:Any syntax of HREF attribute is followed by Phpdig. Simple javascript links like window.open() or window.location() are followed too.
However, phpdig does not follow every single flavor of javascript link. That's why you get those seemingly weird messages.

blueyed
10-08-2004, 01:29 AM
Yes, I understood that. The point was just that phpdig should detect that this is a window.open() in a function and _ignore_ it.

Charter
12-04-2004, 06:54 PM
True, but there are people who want PhpDig to crawl various links, such as those with JavaScript, spaces, or quotes, so an overall general rule is hard to come by to please all, but feel free to pose a "general" rule. :) Otherwise, set SILENCE_404S to true in the config file.