you might want to modify ./index.php … to /index.php ….
Where is that text located? I tried it on this:
liveSearchReq.open("GET", "./index.php/livesearch/" + document.forms.searchform.s.value+"/");
…in LiveSearch.js, but that produced URL not found errors. I don’t yet see it in the LiveSearch template, or in the LiveSearch form code that gets added to the web page.
Thanks in advance for the info!
paul, if you get a chance - he implemented keyboard navigation
http://blog.bitflux.ch/p1736.html
and I redownloaded the js and added the bit to the body as per the wiki instructions - but it’s not doing itl. Are you able to get that part to work at all on your dev blog? I think that I must be doing something wrong.
Thanks =)
You had what in your /exp directory. the index.php file or the javascript file? You have to make the link work according to the page loading the javascript.
I have been interested into looking into keyboard navigation since Gmail started up and used it. His idea is worth a look but not tonight.
I had the LiveSearch.js file in the exp directory. I’ve now moved it back to the exp directory, to be in the same folder with index.php, as you indicated.
As described in this thread, the LiveSearch.js file now has been edited to:
> liveSearchReq.open(“GET”, “./index.php/livesearch/” + document.forms.searchform.s.value+”/”);
It appears that all that’s left is the link.
> You have to make the link work according to the page loading the javascript.
Okay, I now have LiveSearch working again for my site’s home page. What should the link be for, e.g., the monthly_archives template?
> http://www.luxeword.com/exp/index.php/weblog/monthly_archives/2004/04/
I’ve tried it like this:
<script type=”text/javascript” src=”/livesearch.js”><script>
and like this:
<script type=”text/javascript” src=”./livesearch.js”><script>
With the help of everyone on this thread, I got it working!
Here’s how I have the line in the LiveSearch.js file:
liveSearchReq.open("GET", "/exp/index.php/livesearch/" + document.forms.searchform.s.value+"/");
I tried that and it worked on my home page, but not on, for example, my monthly_archives page. But it gave me the clue. I got it working on the archive pages by changing the Script Type call to:
<script type="text/javascript" src="/exp/livesearch.js"><script>
This is such a cool feature. Thanks to everyone here for your help on this.
An aside… On a couple of sites I manage, 20-25% of the visitors have Javascript disabled (probably a Windows security or popup ad thing). So, I would prefer that any feature that “requires” Javascript be a plugin or optional. I never use Javascript for something that is critical to using my sites 😊
Well, if this is used on a form, and the form still submits, then anyone with JavaScript disabled will just not have the search appear while typing. Simple as that. Any site administrator should judge for themselves what they wish to add to their site considering their needs and the limits of their users.
And as LisaJill mentioned this is a plugin request, and we have never made plugins required.
Ooops…I meant… 😊 If it degrades gracefully, that’s a good thing.
>> Any site administrator should judge for themselves what they wish to add to their site considering their needs and the limits of their users. << I agree 100%. I have found however, that many aren’t aware of what percentage of their visitors disable Javascript. It’s not a spec that’s readily available in normal server logs (that I’m aware of). It’s more common on Windows since IE doesn’t have popup blocking.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.