| Webmaster Forum Rules | Posting Guide | Contact Us | Testimonials | Contributing Geek Program | Advertise on Geek/Talk |
|
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Registered User
Join Date: Jul 2000
Location: The Lonestar State
Posts: 233
|
I'm having problems getting a drop down menu script to work properly. I'm pretty new at this aspect of webdesign. http://geekvillage.com/ubb/biggrin.gif
I've tried 2 different things and gotten two problems, but I need some help figuring out what the solution is. its at http://www.profitstogo.com/test.htm Can anyone tell me what's wrong? (in idiot terms) thanks! |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Jan 2000
Location: Lkpg, SE
Posts: 562
|
Impossible to say without access to the source codes.
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Dec 2000
Location: NH
Posts: 6
|
It will work with IE, however with some versions of netscape you may need to add a 'go' or similar button afterwords for users to click on after they make a choice.
|
|
|
|
|
|
#4 |
|
Registered User
Join Date: Jan 2000
Location: Lkpg, SE
Posts: 562
|
Ah - I see you have changed the menu script from CGI to JavaScript. Works like a charm (both NS and IE), but I guess you knew that already?
|
|
|
|
|
|
#5 |
|
Registered User
Join Date: Jul 2000
Location: The Lonestar State
Posts: 233
|
I was trying something else for a moment
the reason it works is that I didn't make it myself http://geekvillage.com/ubb/biggrin.gif ok...so I switched it back to the other type I was trying...the manual one with the button.... source code? this? <body> <form method="POST" action="/cgi-bin/menujump.cgi"> <p><select size="1" name="D1"> <option selected value="Choose ONe">Choose ONe</option> <option value="Allclicks">AllClicks</option> </select><input type="submit" value="Submit" name="B1"></p> </form> </body> </html> the script I want to use is called menujump.cgi...it looks like this... #!/usr/local/bin/perl ################################################## ############# # This is straight forward script you define text file # # with the separated with the AND (@) sign # # The first part will be the link...and the second part # # would be the name # # like this # # http://www.yahoo.com@Yahoo # # |__________________| |___| # # | | | | # # The link The Name # # # # And you would call this like this: # # <!--#exec cgi="../cgi-bin/menujump.cgi" --> # # # # That is all to it. # # # # Do all you want with it.... http://geekvillage.com/ubb/wink.gif> # # # ################################################## ############# if ($ENV{'QUERY_STRING'** =~ /jump/) { &jump; ** else { &menu; ** ################################################## ############# # This is the section that reads the text file and puts # # it in the option of pull down menu # ################################################## ############# sub menu { unless (open(MYFILE, "menu.txt")) { die ("cannot open input file file1\n"); ** # if the program gets this far, the file was # opened successfully print "Content-type: text/html", "\n\n"; $line = <MYFILE>; ($link_dest, $link_name) = split ("\@", $line); print "<FORM METHOD=POST ACTION=\"http://www.profitstogo.com/cgi-bin/menujump.cgi?jump\">"; print "<select name=\"url\" size=\"1\">"; while ($line ne "") { print "<option value=\"$link_dest\"\> $link_name"; $line = <MYFILE>; ($link_dest, $link_name) = split ("\@", $line); ** print "</select><input type=\"Submit\" value=\"Take Me There\"></form>"; ** ################################################## ############# # This is the section that does the jump # # This section was borowed from the script jump.cgi that i got# # from a guy on the newsgroups....if this is you who wrote # # this script and don't want me to use it here please feel # # free to send me mail jarekg28@hotmail.com and i'll take it # # out. ################################################## ############# sub jump { # Read in all the variables set by the form &parse_form; $gotourl = $FORM{'url'**; print "Location: $gotourl\n\n"; sub parse_form { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'**); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name** = $value; ** ** ** you define the variables in a txt file called menu.txt...I have it like this so far... http://www.profitstogo.com@Choose ONe http://www.profitstogo.com/allclicks.htm@Allclicks I hope that's what you were asking for.... Also....if I can do this without the script or an easier way...that's fine with me.... http://geekvillage.com/ubb/smile.gif... |
|
|
|
|
|
#6 | ||
|
Registered User
Join Date: Jan 2000
Location: Lkpg, SE
Posts: 562
|
Yes, it was the latter code I meant... The script works fine on my server, so the problem is not in the code.
I don't think you are using the exact code you provided though. If you were, the script's output (the source code you provided first) would be: Quote:
Quote:
[This message has been edited by AK (edited 12-12-2000).] |
||
|
|
|
|
|
#7 |
|
Registered User
Join Date: Jul 2000
Location: The Lonestar State
Posts: 233
|
I'm getting the feeling I'm totally off!
Looks like I'm gonna have to break down and go do some reading... http://geekvillage.com/ubb/frown.gif Thanks for helping me AK. |
|
|
|
|
|
#8 |
|
Registered User
Join Date: Jul 2000
Location: The Lonestar State
Posts: 233
|
well...i found something that does what I want, without my needing to understnad it completely...
check out http://www.profitstogo.com/new_page_1.htm however, i now understand the importance of learning http://geekvillage.com/ubb/smile.gif....i'm gonna have to work on this stuff so it won't be a problem in the future... |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PPC MetaSearch/Tracking Script For Sale | LaNMaN | Archives of old posts from Let's Barter/Trade, Buy, & Sell | 0 | 09-05-2001 12:57 PM |
| Tell a Friend + Mailing List Script | click2mo | Web Design and Webmaster Issues | 0 | 08-17-2001 12:01 PM |
| Need someone to write me a script | rhizome | Archives of old posts from Let's Barter/Trade, Buy, & Sell | 1 | 04-20-2001 02:20 PM |
| Linking to menu script vs. including it in html | cyburrr | Web Design and Webmaster Issues | 4 | 03-06-2001 08:12 AM |
| "Make This Site your HomePage" Script? | click2mo | Web Design and Webmaster Issues | 6 | 07-13-2000 10:03 PM |
![]()