href targets and Javascript functions

Dave Higton dave at
Sun Sep 27 17:10:14 BST 2015

I was just looking around some simple Javascript examples, and I
saw some more basic stuff that isn't there yet.

There were two lines with links calling Javascript functions that
had been defined:

<a href="javascript:confirmLeave('jsindex.htm')">Link text</a>
<a href="javascript:calcVAT()">Link text</a>

Clicking the first line's link text changes the window to a 404
complaining that "jsindex.htm" (prepended with the full local path,
of course) is missing.

Clicking the second line's link text opens a "Warning from NetSurf"
box with "BadType", which presumably starts off as the same wrong
action but fails differently because the "file name" is null.

This means that no Javascript function or command can be called
from an HTML href link.

I searched for "href" in the source code, hoping to find where
its arguments are parsed, but there are many references.

So can anyone give me any quick start on this:

1) Am I trying to jump to functionality that is much to far away
to be implemented now?

2) If it is within reach, where should I be looking for code that
should be parsing for link targets that begin with "javascript:"?


FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at

More information about the netsurf-dev mailing list