SV: [thelist] Parsing document server side (was Adding title withcss)

Andreas Wahlin Andreas.Wahlin at ufl.gu.se
Thu Jun 24 10:26:47 CDT 2004


<Yes, parsing the link and adding the title value before sending it to
the client.
Probably the best way to do this would be a regular expression, like
parsing <a href="(.)*.pdf"> and replacing it with <a href="\1.pdf" 
title="PDF Doc"> or the like (*note*, just an example, definitely not
tested and almost certainly won't work as is).>

I've spent a (short) while googling for information on this. Do you
actually mean that I can create this mock document

<%@Language="JavaScript"%>
<%
Parsing(<a href="(.)*.pdf">, title="pdf-link"); //THIS IS WHERE I DON'T
GET IT
%>
<html>
<body
<a href="doc.pdf">document</a>
</body>
</html>


And that the server will spit out the href as something like

<a href="doc.pdf" title="pdf-link">document</a>

In the end (when all parameters are good). So the server can get what
would be html content, and change that just as a client side script
would/could? I want some code please :) Not working code but the
functions to call if any ... Or maybe I misunderstood the technique?

Andreas


More information about the thelist mailing list