/    Sign up×
Community /Pin to ProfileBookmark

Search function questions

I’ve recently been appointed as webmaster for my company’s SharePoint webpage and I find that I hate SharePoint. Personal opinion aside, although I prefer to write my HTML by hand I’m still a relative newb with very little (read absolutely no) understanding of JavaScript and I have a couple of questions regarding the search function found at:

[URL=”http://javascript.internet.com/miscellaneous/site-search.html”]http://javascript.internet.com/miscellaneous/site-search.html[/URL]

Question 1
Can someone explain the below portion of the code to me? Specifically, can I put the full URL in place of the “Page Name” section and if that page is a document library will it return the link to the document or just a link to the page?

[code=html]<!– Begin
var item = new Array();

/* Here is where all the magic happens.
Just enter as many additional pages that
that you want to search, then fill in the
additional listings for each page.
*/

// “Page Name”,”path”,”Page Title”,”Many,Key,Words”,”Descriptive Comments”

c=0; item[c]=new Array(“index.html”,””,”DemoSite”,”index,main,start,home,front”,”Demonstration search engine data about an imagined but probable internet site.”);
c++; item[c]=new Array(“about.htm”,””,”About Me”,”about,author,contact,email,who”,”Contact details and general information about the creator of the site and what the site is about.”);
c++; item[c]=new Array(“links.htm”,””,”Links page”,”links,more,where,similar,friends”,”Links to my favourite sites which I find interesting. Other friends sites which have similar interests to my own.”);
c++; item[c]=new Array(“main.htm”,”main/”,”Main Page”,”content,main,focus”,”The main part of my site which contains what you have come to see. Lots of stuff like that and more great things. All in a sub directory.”);
c++; item[c]=new Array(“logo.jpg”,”main/images/”,”Link Logo”,”link,image,logo,graphic”,”The logo.jpg is just a small image which you can place on your site as a link to me. It’s in a second level subdirectory.”);
[/code]

Question 2
Does anyone know how this script will affect the stability of the SharePoint server?

Thank you very much in advance for any and all help!

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @Akiva spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...