a_nona_mouse wrote:
[color=blue]
> got a website which I would like to be available offline
>
http://www.ukpropertyshop.co.uk/s/Ab...Aberdeen.shtml
> any of the java script links
>
> is this possible?[/color]
It is not if one uses those nonsense links, since a spider
cannot follow them. <http://jibbering.com/faq/#FAQ4_24>
[color=blue]
> or is it server side so not possible.[/color]
No, this is client-side scripting triggering a server-side application
via HTTP GET. Would it be only server-side, there were no problem.
[color=blue]
> Even if it is there must be some way as you can do it manually so.. ?[/color]
?
[color=blue]
> I just need all the estate agents websites in Aberdeen& surrounding
> counties & don't want to have to click on them all to find out what
> the web addess is[/color]
RTSL (Read The Source, Luke ;-)). The "JavaScript links" call a method
named "openAgentSite". That method is defined within the third "script"
element of the document. Stripping information irrelevant here, only
| function openAgentSite(a_uid){
| [...]
| "/cgi-bin/agentframe.pl?site=UKP&s=estate&irp="+a_ui d,
is left (where the & are nonsense, though [script data is CDATA
in HTML, not PCDATA], and should not work). So if your UA supports
DOM scripting (DHTML), you may loop over the collection of links to
get the URIs:
var s = "";
for (var i = 0, len = document.links.length, s2; i < len; i++)
{
s2 = document.links[i].toString();
if (/^javascript
:openAgentSite/.test(s2))
{
s += s2.replace(
/javascript
:openAgentSite\('([^']+)'\);/,
"/cgi-bin/agentframe.pl?site=UKP&s=estate&irp=$1")
+ "\n";
}
}
alert(s);
The same as spaghetti code to be used in the Location Bar:
javascript
:s="";len=document.links.length;for(i=0; i<len;i++){s2=document.links[i].toString();if(/^javascript
:openAgentSite/.test(s2)){s+=s2.replace(/javascript
:openAgentSite\('([^']+)'\);/,"/cgi-bin/agentframe.pl?site=UKP&s=estate&irp=$1")+"\n";}}al ert(s);
Use document.write() or DOM Level 1+ methods instead of
alert() to append the URIs to a (new temporary) document.
HTH
PointedEars