OT Drop Down Scripts

D

Davmagic .Com

From: (e-mail address removed) (Steve Pugh)
First thing to check: does your server
support PHP?

Yes it does...
Not possible. The form must be submitted
to the serve in order for a server side
script to handle it. This requires either
JavaScript (pointless if the server side
script is a fallback for when JS is
disabled) or a submit button.

OK I understand that now... a submit button _must_ be used with a server
side script...

My test page: http://davmagic.com/testindex.html

Web Design, Magic, Painting, Junking, More
http://www.davmagic.com
Paint A House
http://www.paintahouse.com
NOTE: This emailbox is CLOSED do NOT reply!!!
 
T

Toby Inkster

Davmagic said:

Hmm... strange error message. Never seen that one before. There are a
couple of typos in my original message, but nothing that would cause that.

I've put up an example working system here:
http://examples.tobyinkster.co.uk/magicdave/
The JS that I am using now, uses the "onchange" event for the select tag
to submit the form, here's the URL: http://davmagic.com/index.html
Why can't this be done with another non-JS script?

In what scripting language? If JS is disabled, we should assume that all
client side scripting is disabled. Which means that onchange, onclick,
onfoobar, etc will not work.

You can add an onchance event if you like, but you'll need to leave the
button for those people without JS.

A nifty trick though:

Do your button like this:

<input type="submit" id="foo">

Then use some Javascript to hide the button:

document.getElementById('foo').style.display="none";

That way, people with JS enabled will not see the button, and can use the
onchange; and people without JS will see the button and can use it.
 
D

Don And Sis

This script is in my cgi-bin dir. and I use it in my drop down in y sig.

Don

#!/usr/local/bin/perl
use CGI qw(param);
$url = param(url);
print "Location: $url\n\n"; exit;
 
E

Edwin van der Vaart

Don said:
This script is in my cgi-bin dir. and I use it in my drop down in y sig.
Please, don't send an attechment to the usenet.
There a lot of people who can't read your reply.
 
D

Don And Sis

I guess I am out of my league here. I don't know squat about scripts I
just C&P them.
what ever you didn't like about my post wont happen again. This is the
last one.
 
E

Edwin van der Vaart

Don said:
I guess I am out of my league here. I don't know squat about scripts I
just C&P them.
what ever you didn't like about my post wont happen again. This is the
last one.
You can always send a reply in this NG.
When it's a code, use the message body instead of an attachment ;-)
 
B

Beauregard T. Shagnasty

Don said:
What the hell attachment did I use. I put the ode in the body

Since your WebTV thingy apparently doesn't show it, I'll paste in your
source so you can see what you sent. Scroll down to the HTML part.
Apologies to everyone else.

Path:
twister.nyroc.rr.com!news-rtr.nyroc.rr.com!news.maxwell.syr.edu!news.moat.net!newsfeed-3001.bay.webtv.net!newssorter-3001.bay.webtv.net!not-for-mail
From: (e-mail address removed) (Don And Sis)
Newsgroups: alt.html
Subject: Re: OT Drop Down Scripts
Date: Sat, 16 Oct 2004 23:07:32 -0400
Organization: WebTV Subscriber
Lines: 55
Message-ID: <[email protected]>
References: <[email protected]>
NNTP-Posting-Host: localhost.webtv.net
Mime-Version: 1.0 (WebTV)
Content-Type: Multipart/Mixed; Boundary=WebTV-Mail-12001-8694
Content-Transfer-Encoding: 7Bit
X-WebTV-Signature: 1
ETAuAhUAxIRh/WKExqhRiZukRgOwfQm8zawCFQC3mV7inYpi9JUcVdx47IowZ8Nuog==
Content-Disposition: Inline
X-WebTV-Stationery: Standard; BGColor=#000000; TextColor=#ffffff
Xref: news-rtr.nyroc.rr.com alt.html:1463249


--WebTV-Mail-12001-8694
Content-Type: Text/Plain; Charset=US-ASCII
Content-Transfer-Encoding: 7Bit

This script is in my cgi-bin dir. and I use it in my drop down in y sig.

Don

#!/usr/local/bin/perl
use CGI qw(param);
$url = param(url);
print "Location: $url\n\n"; exit;


--WebTV-Mail-12001-8694
Content-Description: signature
Content-Disposition: Inline
Content-Type: Text/HTML; Charset=US-ASCII
Content-Transfer-Encoding: 7Bit

<html><body bgcolor="#000000" text="#ffffff">
<center>
<form name=x
action="http://members.tripod.com/dirt129/cgi-bin/redirect.pl"
method=post><select name=url>
<option>Popcorns Help
<option
value=http://community-2.webtv.net/dmsmm/transloader5/>Transloader
Source Viewer
<option value=http://www.html46.com/ftptools.htm>Directory Mover
<option
value=http://community-2.webtv.net/dmsmm/Popcornstools1/>Popcorn's Tools
<option value=http://uk.geocities.com/murphy_dn/help/helpmenu.html
Webtv How To
<option value=URL>Link Title
<option value=URL>Link Title

</select>
<input type=submit value=Go></form>
</center>
</html></table></tr></td></table></tr></td><center>

<embed src="http://members.tripod.com/dirt129/cgi-bin/
randomlep.pl"></embed>
<embed
src="http://members.tripod.com/dirt129/cgi-bin/random.pl"autostart="true"
</embed></html>





--WebTV-Mail-12001-8694--
 
D

Davmagic .Com

From: (e-mail address removed) (Don And Sis)
I should have taken my sig code off like
this post

That's what I keep telling you (all webtv'ers).... but nobody listens to
me "back there"...

Save your damn HTML for webpage building, which it was created for in
the first place, and always post and email in _plain text_ ...

Stated clearly on my Design News Group Page:
http://davmagic.com/PAGES68.html

Web Design, Magic, Painting, Junking, More
http://www.davmagic.com
Paint A House
http://www.paintahouse.com
NOTE: This emailbox is CLOSED do NOT reply!!!
 
D

Davmagic .Com

From: (e-mail address removed)
(Davmagic .Com)
That's what I keep telling you (all
webtv'ers).... but nobody listens to
me "back there"...
<snip>

In addition you (WebTv'ers) should _always_ Quote the previous replys
and Smallify them (as I am doing here) so USENET readers will not get
confused and will be more able to understand what the message is
about...

USENET readers: WebTv news reader software does NOT quote and indent or
smallify the previous messages... the posters must "manually" do this
themselves (or not do it as many are in the poor habit of not doing)...

WebTv'ers: To learn how to Quote and Smallify... see Copy and Paste on
the Menu(s) on this page: http://davmagic.com/PAGES38.html and follow
the links...

Web Design, Magic, Painting, Junking, More
http://www.davmagic.com
Paint A House
http://www.paintahouse.com
NOTE: This emailbox is CLOSED do NOT reply!!!
 
E

Edwin van der Vaart

Beauregard said:
Since your WebTV thingy apparently doesn't show it, I'll paste in your
source so you can see what you sent. Scroll down to the HTML part.
Apologies to everyone else.
Apologies accepted.
 
A

aa

Toby Inkster said:
If I were you, I'd use a combination Javascript and PHP solution. This
will use Javascript for those who can, and fall back to PHP for the rest:

The OP's objective is to "eliminate the 11% (or so) who have JS disabled on
their browsers..."
Using both Javascript and PHP hardly serves this purpose.
Just complicates the code. Even does not save a trip to the server as the JS
function redirect() goes to the server.
 
A

aa

OK I understand that now... a submit button _must_ be used with a server
side script...

So does it work now?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top