PDA

View Full Version : Indexing javascript links


paulx82
01-15-2004, 03:33 PM
Hi all.

From the manual, I read:
Links can be in an AreaMap or frames. PhpDig supports relocations. Any syntax of HREF attribute is followed by Phpdig. Simple javascript links like window.open() or window.location() are followed too.

Ok, that is cool, but I just want to check something. I am currently using links, such as below, which change the documents held in two different frames of my web site. Of course, they are not being indexed, so I would like to know what the syntax is for converting them to links that PhpDig can index.

<a href="#" title=" ActiveX " onmouseover="window.status=' ActiveX '; return true" onmouseout="window.status=' '; return true" onclick="parent.frames[1].location='content_sb.php'; parent.frames[2].location='content.php;">ActiveX</a>

Is parent.frame[n].location accepted as well as window.location is?

What about changing two or more documents in different frames, like above, does PhpDig handle that or can it only index links which change the document in only one window?

Will the title attribute or the other javascript events cause problems? Do the events have to come in a particular order?

Could you please convert the link code above to code that PhpDig will accept, as an example?

Thankyou very muchly.

Charter
01-18-2004, 09:43 AM
Hi. In robot_functions.php is the following line:

while (eregi("(<frame[^>]*src[[:blank:]]*=|href[[:blank:]]*=|http-equiv=['\"]refresh['\"] *content=['\"][0-9]+;url[[:blank:]]*=|window[.]location[[:blank:]]*=|window[.]open[[:blank:]]*[(])[[:blank:]]*[\'\"]?((([[a-z]{3,5}://)+(([.a-zA-Z0-9-])+(:[0-9]+)*))*([:%/?=&;\\,._a-zA-Z0-9\|+-]*))(#[.a-zA-Z0-9-]*)?[\'\" ]?",$eval,$regs)) {

Not tested, but you might try adding something like the following into that line:

parent[.]frames[[][0-9]+[]][.]location[[:blank:]]*=