Connecting Tech Pros Worldwide Help | Site Map

javacript:open

a_nona_mouse
Guest
 
Posts: n/a
#1: Jul 23 '05
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? or is it server side so not possible. 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

any ideas

ALex
Michael Winter
Guest
 
Posts: n/a
#2: Jul 23 '05

re: javacript:open


On 23 Apr 2004 03:41:02 -0700, a_nona_mouse <a_nona_mouse@hotmail.com>
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? or is it server side so not possible. Even if it is
> there must be some way as you can do it manually so.. ?[/color]

You won't be able to get direct URLs to the various sites, as they are
stored in the site's database.

You can produce links to the site's CGI script, but if you were to place
them on an another website, you'd end up leeching off of the UK Property
Shop server's bandwidth.

Mike

--
Michael Winter
M.Winter@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Thomas 'PointedEars' Lahn
Guest
 
Posts: n/a
#3: Jul 23 '05

re: javacript:open


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&amp;s=estate&amp;irp="+a_ui d,

is left (where the &amp; 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
Dr John Stockton
Guest
 
Posts: n/a
#4: Jul 23 '05

re: javacript:open


JRS: In article <4095B5AE.4020409@PointedEars.de>, seen in
news:comp.lang.javascript, Thomas 'PointedEars' Lahn
<PointedEars@web.de> posted at Mon, 3 May 2004 04:59:58 :[color=blue]
>a_nona_mouse wrote:
>[color=green]
>> 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]

You are being naive.

For a spider to find a page, it is necessary only that a chain of
spiderable links to that page exists.

That, of itself, is no argument against using some other form of link
where it is thought to be helpful to non-spiders.

There may be a good case for what you want to say; but spurious
arguments to not help.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Closed Thread