Eureka!
Thanks for the help. I decoded the method Serif Web Plus uses to implement a site search. Inside the javascript it places the text from each web page into variables and it is actually these variables which are being searched. It cannot do this dynamically so the text is ‘hard-coded’ into the javascript.
I am now using this as a basis for pupils to implement their own searches and is quite an interesting exercise for them to be editing the code, copying in the text and changing the references to file names.
I hope this helps anyone else looking for a similar, serverless solution.