a_nona_mouse said:
got a website which I would like to be available offline
http://www.ukpropertyshop.co.uk/s/Aberdeenshire/estate_agents_Aberdeen.shtml
any of the java script links
is this possible?
It is not if one uses those nonsense links, since a spider
cannot follow them. said:
or is it server side so not possible.
No, this is client-side scripting triggering a server-side application
via HTTP GET. Would it be only server-side, there were no problem.
Even if it is there must be some way as you can do it manually so.. ?
?
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
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_uid,
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
.toString();
if (/^javascriptpenAgentSite/.test(s2))
{
s += s2.replace(
/javascriptpenAgentSite\('([^']+)'\);/,
"/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.toString();if(/^javascriptpenAgentSite/.test(s2)){s+=s2.replace(/javascriptpenAgentSite\('([^']+)'\);/,"/cgi-bin/agentframe.pl?site=UKP&s=estate&irp=$1")+"\n";}}alert(s);
Use document.write() or DOM Level 1+ methods instead of
alert() to append the URIs to a (new temporary) document.
HTH
PointedEars