Hirsigate: Zoekmachientje (html/javascript)
Dr. Marc-Alexander Fluks
fluks at DDS.NL
Fri May 19 16:40:21 CEST 2006
REPLY TO: D66 at nic.surfnet.nl
Ik heb gepoogd even rap een javascriptje te schrijven waarmee met dit
topic in 1 keer uit de lijst kan lichten.
Save de onderstaand hypertekst vanaf de html tag tot de /html tag)
als een html-file en men heeft een zoekmachine. Heel nuttig... zie
bijv. Erik naar de bekende weg vragen en ingaan op mij i.p.v. op AHA.
Let erop dat lange regels *niet* gevouwen worden !
Surf naar een gesaved file (noem html bijv. hirsi.html):
Onder windows op een diskette of harde schijf: save naar de URL,
file://a:/hirsi.html
file://c:/hirsi.html
Onder linux/unix op een diskette of harde schijf: save naar de URL,
file://localhost.localdomain/mnt/floppy/hirsi.html
file://localhost.localdomain/user/[account]/hirsi.html
Enfin, voor de fijnproevers... wel javascript aanzetten want anders
doet'ie het niet en *twee* knoppen induwen (niet: 1). Dan moet'ie het
dus doen.
Marc Fluks
<html lang=en>
<script language=javascript>
document.write("<header>")
function firstform(sourceForm, targetField, urlType) {
var group = sourceForm.group.value;
var keyword = sourceForm.keyword.value;
var urltext = "";
if (group != "") {
urltext += group;
}
else {
alert("Sorry, you must fill out both fields");
sourceForm.group.focus();
return(1);
}
if (urlType == "url") {
urltext = "https://listserv.surfnet.nl/scripts/WA.EXE?S2=d66&I=1&X=-&f=" + urltext;
}
urltext = urltext+"&q=hirsi+"+keyword
targetField.value = urltext;
return(1);
}
function secondform(loc) {
var doc = loc;
window.location = doc;
}
document.write("</header>")
document.write("<body bgcolor=green>")
document.write("<div align=center><table border=0>")
document.write("<tr><td colspan=5 align=left width=150><font size=2 color=#ffff0c><b>Stap 1: Zoekterm</b></font></td></tr>")
document.write("<tr><td width=150 colspan=5 align=left valign=center>")
document.write("<form name=groupform>")
document.write("<input type=hidden name=buttonPress value=''>")
document.write("<input type=text name=keyword style=width:100%;background-color:green;font-weight:bold;font-size:15px;color:#ffff0c;border:1 value=>")
document.write("</td></tr>")
document.write("<tr><td colspan=5 align=left width=150><font size=2 color=#ffff0c><b>Stap 2: Auteur</b></font></td></tr>")
document.write("<tr><td width=150 colspan=5 align=left valign=center>")
document.write("<input type=text name=group style=width:100%;background-color:green;font-weight:bold;font-size:15px;color:#ffff0c;border:1 value=>")
document.write("</td></tr>")
document.write("<tr><td width=100 colspan=4></td><td width=050></td></tr>")
document.write("<tr><td><font size=2 color=#ffff0c><b>Zoek</b></font></td>")
document.write("<td align=center><font size=2 color=#ffff0c><b>=</b></font></td>")
</script>
<td align=center><input type=button name=CreateURL value='Stap 1' onClick="firstform(document.groupform, document.urlform.text, 'url')" style='width:36;background-color:green;font-weight:bold;font-size:10px;color:#ffff0c;border:1'></form></td>
<script language=javascript>
document.write("<td align=center><font size=2 color=#ffff0c><b>+</b></font></td>")
document.write("<td align=center><form name=urlform method=GET >")
document.write("<input type=button name=Test value='Stap 2' onClick='secondform(document.urlform.text.value)' style='width:36;background-color:green;font-weight:bold;font-size:10px;color:#ffff0c;border:1'>")
document.write("<input type=hidden name=text></form></td></tr>")
document.write("</table></div>")
</script>
</body>
</html>
**********
Dit bericht is verzonden via de informele D66 discussielijst (D66 at nic.surfnet.nl).
Aanmelden: stuur een email naar LISTSERV at nic.surfnet.nl met in het tekstveld alleen: SUBSCRIBE D66 uwvoornaam uwachternaam
Afmelden: stuur een email naar LISTSERV at nic.surfnet.nl met in het tekstveld alleen: SIGNOFF D66
Het on-line archief is te vinden op: http://listserv.surfnet.nl/archives/d66.html
**********
More information about the D66
mailing list