Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
search textpattern sites - javascript help needed
I am experimenting with some javascript hacked from various sources which will allow users to search various txp, wiki and punBB installs using one search field and a pull down menu.
I am developing this for my sites but I hope that there will be interest.
the current state can be found on http://www.neme.org/search.html
the form in its current state (semi)works but I have still to solve the following problems
- Validation: Even in its most simple form I just can’t validate it: http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.neme.org%2Fsearch.html
- When the enter or the return key is pressed I get no results.
Any help from more experienced javascript users out there will be appreciated
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: search textpattern sites - javascript help needed
To search for main site use http://textpattern.com/search?q=case
instead of http://textpattern.com/?q=case
;)
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: search textpattern sites - javascript help needed
thanks victor
the problem of the validation and the return key still remains
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: search textpattern sites - javascript help needed
I think validation errors are because of doctype. try to play with setting doctype to different values
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: search textpattern sites - javascript help needed
Or better: fix the validation errors.
lowercase onload
:
<body onload="addOptions()">
javascript in CDATA tag:
<script type="text/javascript">
/* <![CDATA[ */
// content of your Javascript goes here
/* ]]> */
</script>
And in URLs, replace all raw &
with &
Offline
Re: search textpattern sites - javascript help needed
Thanks ruud
The little engine is getting there:)
Unfortunately I cannot replace the raw &
with &
as the punbb forums do not recognise it.
I have uploaded the latest version within which I included the ‘correctly’ encoded punBB search url so as to demonstrate.
As the url resides in the javascript though, the validator does not seem to pick it up as an error.
At the moment there’s just one problem which is that I just can’t make the keys to work. That is, if a word is typed and then either the ‘enter’ or the ‘return’ key is hit, the form is just not parsed properly.
Any suggestions?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: search textpattern sites - javascript help needed
anyone?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: search textpattern sites - javascript help needed
Hello Yiannis
I came across this thread which looks like it might be useful for your amp problem:
…what you want is %26, which is the URL-encoded hexadecimal escaped value for the ampersand; not &, which is the HTML named, character entity…
Offline