RE: JHTML: Forgot

I'm not sure if I know exactly what you mean. Can I pass data through the
url to the JavaScript-routine? And what, for example, does the routine do
with it? And is it server- or clientside? [is there something like
'serverside javaScript'?]

I tried running your script to see it work but I got some errors wich I
couldn't solve straight away.

[By the way: is asp comparable to CGI? I use that myself]

Marcel


#-----Original Message-----
#From: Pd Rippe [mailto:casper@novacentral.com]
#Sent: Thursday, May 25, 2000 10:11 PM
#To: 3x; HTML-list
#Subject: Re: JHTML: Forgot
#
#
#Totally forgot...you can do that with Javascript....wait one sec,, here it
#is:
#
#
#<script>
#<!--
#
#function GetToken(strSource,strName,cSep){
#    var strRet="";
#    var iOffset;
#    var iEnd;
#
#    if(strSource.length>0){
#  iOffset=strSource.indexOf(strName);
#        if(iOffset!=-1){
#            iOffset+=strName.length+1;
#            iEnd=strSource.indexOf(cSep,iOffset);
#            if(iEnd==-1){
#                iEnd=strSource.length;
#            }
#            strRet=strSource.substring(iOffset,iEnd);
#        }
#    }
#    return(strRet);
#}
#
#// IE4 now supports the location.search.substring property, so allow any
#// browser with a version of 4 or more to use it:
#window.focus();
#if( ( navigator.appName == "Netscape" ) ||
#parseInt( navigator.appVersion.substring( 0, 1 ) ) >= 4 ) ) {
#    q = location.search.substring(1, location.search.length);
#} else {
#    var qoffset = document.location.indexOf("?", 0);
#
#    if( qoffset == -1 ) {
# q = "";
#    }
#    q = document.location.substring(qoffset + 1, document.location.length);
#}
#
# paramID = GetToken(q, "ID" , ",");
# if ( paramID == 1)
#
#window.open("http://www.novacentral.com/dfme/downloadz/CTF_Mission_
#Pack_1_MA
#DDOG.zip",width=10,height=10); go(); }
# else if ( paramID == 2)
#
#window.open("http://www.novacentral.com/dfme/downloadz/CTF_Mission_
#Pack_2_MA
#DDOG.zip",width=10,height=10); go(); }
# else if ( paramID == 3)
#
#window.open("http://www.novacentral.com/dfme/downloadz/dfpackman121
#.exe",wid
#th=5,height=5); go(); }
# else if ( paramID == 4)
#
#window.open("http://www.novacentral.com/dfme/downloadz/dfpackman121
#.pdf",wid
#th=5,height=5); go(); }
# else {
# location.href="http://www.novacentral.com/dfme";
# }
#function go() {
#history.back()
#}
#// -->
#</script>
#
#Thats the example thats used at my site...i cut down the amount of
#dl's...but because im using ASP on the server, i could also do that like
#this:
#
#<%
#Dim filenum
#filenum = Request.QueryString("id")
#If filenum = "1" Then
#Response.Redirect("http://www.someurl.com/downloadme.zip")
#Else
#Response.Write("Bad Boy! Try again!")
#End If
#%>
#
#And you would call this like: http://www.someurl.com/download.asp?id=1
#if there were more querystrings, it would look like this:
#http://www.someurl.com/download.asp?id=1&file=downloadme.zip
#Note the "&" if there are more than one querystrings!!
#
#
#----- Original Message -----
#From: "3x" <3x@planet.nl>
#To: "HTML-list" <www-html@w3.org>
#Sent: Wednesday, May 24, 2000 5:29 PM
#Subject: JHTML
#
#
#> Somewhere on the web I came across some 'JHTML' pages.
#> Does anyone know what the abbriviation stands for and in what respect
#these
#> pages differ from regular HTML-pages?
#>
#> I also sometimes see URLs adressing an HTML-page that end with a query,
#like
#> when a CGI-script is adressed:
#>
#> www.hostname.com/example.html?x=1&y=2&z=3
#>
#> Does this mean that it's possible to pass data among HTML-pages in some
#way?
#> And what kind of data would that be?
#>
#> Thanks for your help
#> Marco
#>
#

Received on Thursday, 25 May 2000 17:50:53 UTC