Okay, let's try this again.
by fiesty_01, Fri, 2002-11-08 21:01
C++
17% (1 vote)
HTML
67% (4 votes)
Java
0% (0 votes)
JavaScript
0% (0 votes)
ASP
17% (1 vote)
DHTML
0% (0 votes)
Other
0% (0 votes)
Total votes: 6
Busy posted this at 19:48 — 12th November 2002.
He has: 6,151 posts
Joined: May 2001
I just noticed the change of the change I suggested to make shouldn't of had the type="button" in it, my bad
Glad you got it sorted
Abhishek Reddy posted this at 09:17 — 12th November 2002.
He has: 3,348 posts
Joined: Jul 2001
Hey, we would have got it... eventually.
Glad you got it working.
fiesty_01 posted this at 09:13 — 12th November 2002.
He has: 173 posts
Joined: Nov 2002
Well, neither one worked. However, I finally found a code that did work at j-scripts.com. Thanks for trying, though. I appreciate it. Here is the format of the code that worked:
<script language="JavaScript">
</script>
Select a Page
Page 1
Page 2
You can check it out by clicking on the "www" link at the top of this post. Thanks again.
Abhishek Reddy posted this at 09:07 — 12th November 2002.
He has: 3,348 posts
Joined: Jul 2001
It should, but it doesn't. I tried on IE6, but it won't show.
Busy posted this at 08:35 — 12th November 2002.
He has: 6,151 posts
Joined: May 2001
add value="GO" into Abhishek's change
(no end tag, use / at the end for XHTML)
the button tag should work in most browsers, it's a valid HTML tag
Abhishek Reddy posted this at 07:48 — 12th November 2002.
He has: 3,348 posts
Joined: Jul 2001
Try changing this in Busy's code
<button type="button" name="buttonName" onclick="goPage()">GO!</button>
'to
<input type="button" name="buttonName" onclick="goPage()">GO!</input>
'fiesty_01 posted this at 07:41 — 12th November 2002.
He has: 173 posts
Joined: Nov 2002
Well, this "working script" did not work. It just created a pulldown box with the word "GO" beside it (not a "GO" button). Why did it do this? You can click the "www" at the top of this post to view the page and the source code.
fiesty_01 posted this at 17:15 — 11th November 2002.
He has: 173 posts
Joined: Nov 2002
Thanks Busy. I'll try it later today sometime after I get home from work.
Busy posted this at 09:25 — 11th November 2002.
He has: 6,151 posts
Joined: May 2001
here is a complete working script
<script language="javascript" type="text/javascript">
function jumpPage(newLoc) {
newPage = newLoc.options[newLoc.selectedIndex].value
}
function goPage() {
if (newPage != "") {
window.location = newPage
}
}
</script>
Select a Page
page 1
page 2
page 3
page 4
page 5
GO!
Busy posted this at 09:07 — 11th November 2002.
He has: 6,151 posts
Joined: May 2001
not sure where this post is up to, the error is on line 119, which is the line of code in your .html file.
onClick="jumpBox(this.form.elements[0])">
is the error line. You don't have a function called jumpBox
fiesty_01 posted this at 08:46 — 11th November 2002.
He has: 173 posts
Joined: Nov 2002
Sorry about that. The page now has the jump box on it with the "Go" button on it. Just click on the "www" link at the top of this post.
The Webmistress posted this at 08:13 — 11th November 2002.
She has: 5,586 posts
Joined: Feb 2001
I have merged these two threads again. Please don't start new threads when you have one going that's covering the same subject.
Can you post a page online that has the actual code for the jump box on it so we can see where you are going wrong with it, it's no good showing us the page after you have taken the menu off it.
Julia - if life was meant to be easy Michael Angelo would have painted the floor....
fiesty_01 posted this at 07:49 — 11th November 2002.
He has: 173 posts
Joined: Nov 2002
The jump box/"Go" button code doesn't have 115 lines in it (I think there's around 78 lines), so do you mean line 115 from the beginning? I still don't know what the error is, though.
fiesty_01 posted this at 07:44 — 11th November 2002.
He has: 173 posts
Joined: Nov 2002
I have WebTv, so I don't know exactly which line is line 115, unless you mean the line is the first line and the last line is the line. Also, what exactly is the error?
Mark Hensler posted this at 07:00 — 11th November 2002.
He has: 4,048 posts
Joined: Aug 2000
I get an object expected error on line 115. (IE6)
fiesty_01 posted this at 06:31 — 11th November 2002.
He has: 173 posts
Joined: Nov 2002
A while back I decided to use a jump box WITH a "Go" button (instead of a jump box only). However, when I click "Go", nothing happens except the "click" noise.
Here is the link to the site so you can view the source code and tell me why nothing happens when I click "Go": CLICK HERE
Thanks.
fiesty_01 posted this at 22:08 — 10th November 2002.
He has: 173 posts
Joined: Nov 2002
This is the page I tried this code on, but I had to leave the page as it was originally (without jump boxes or a "Go" button) since the code didn't work right.
CLICK HERE
I'm trying to make the large table in the middle into a jump box with a "Go" button so it will take up less space on the page.
fiesty_01 posted this at 22:03 — 10th November 2002.
He has: 173 posts
Joined: Nov 2002
Actually Julia, I did have after each tag.
Also, I've decided to just do a jump box WITH a "Go" button. However, last night I did this and it would not go anywhere when I hit the go button. Here's the format I used (please tell me if anything is wrong with it):
blah
<script language="JavaScript">
</script>
Page 1"
Page 2"
Page 3"
I thought for sure this would work, but when I selected a link and clicked on "Go" it just made a click noise and didn't go anywhere.
What's wrong with this code (also, thanks for your help).
Suzanne posted this at 16:00 — 10th November 2002.
She has: 5,507 posts
Joined: Feb 2000
You need one form for each dropdown menu because the JavaScript tells it to affect a particular form and a particular SELECT.
Have you tried one of the many free scripts for this available online (see the link I gave you earlier)?
The Webmistress posted this at 10:17 — 10th November 2002.
She has: 5,586 posts
Joined: Feb 2001
You need to finish off each option with
fiesty_01 posted this at 06:20 — 10th November 2002.
He has: 173 posts
Joined: Nov 2002
Also, I was wondering if where it says "value" should have some number in it or something, or if any of the other words are not what I would type exactly.
fiesty_01 posted this at 23:25 — 9th November 2002.
He has: 173 posts
Joined: Nov 2002
First format tried was this:
Page1
Page2
Page3
The second format tried was this:
Page1
Page2
Page3
The 3rd format tried was this:
Page1
Page2
Page3
The 4th and final time I tried looked like this, and resulted in the "Lego Blocks" going down the page:
Page1
onclick="if(options[selectedindex].value) window.location.href=(options[selectedindex].value)">
Page2
onclick="if(options[selectedindex].value) window.location.href=(options[selectedindex].value)">
Page3
As you can probably tell, I've got the code part down, but really do not know where to put it (or in what order).
The Webmistress posted this at 14:52 — 9th November 2002.
She has: 5,586 posts
Joined: Feb 2001
Can you show us the page you have done online so we can see where you might be going wrong and help you further as this does work!
fiesty_01 posted this at 09:39 — 9th November 2002.
He has: 173 posts
Joined: Nov 2002
But I hope I never have to try it again. You should have seen the strange blocks going down my site (they looked like Lego Blocks) . . . maybe I opened a new dimension or something. Oh well, I think I'll use something other than pulldown menu links to condense the site a bit. I know it's likely something I'm doing wrong, but I believe it's best left as it is for now. It almost worked once, but would only go to the top link in the pulldown menu, no matter which link I clicked on.
Thanks for trying.
fiesty_01 posted this at 06:51 — 9th November 2002.
He has: 173 posts
Joined: Nov 2002
I'll try it Megan. You know, one of the first classes I enrolled in when I started college was called "Intro to Programming Logic." I dropped it because it did not sound logical. Logical, meaning the way HTML is logical . . . you want bold, you type ; you want a table, you type ; etc.
JavaScript a bit frustrating? I think I would need a lifetime supply of antacids before fully understanding it (and I'm use the term "fully" loosely here).
Megan posted this at 03:56 — 9th November 2002.
She has: 11,421 posts
Joined: Jun 1999
Yup, that should work! I think you'll need to put the tags on at the end of those url's, but after that it'll be good to go.
A person's first foray into javascript is always going to be a bit frustruating. Actually, Javascript can always be a little bit frustruating... programming in general tends to be frustruating - it's part of the fun in trying to figure things out
Megan
Connect with us on Facebook!
fiesty_01 posted this at 03:50 — 9th November 2002.
He has: 173 posts
Joined: Nov 2002
They should rename this code to the nightmare code. Susanne Carter was correct when she said I wanted a jump box without the "go" button.
Megan, thanks again. Now, is the following the correct format for your "onClick" code, or am I still missing something?
Page1
Page2
Suzanne posted this at 03:47 — 9th November 2002.
She has: 5,507 posts
Joined: Feb 2000
Megan's exactly right -- onClick is just a different event that triggers the function. Events are things like onClick, onChange, onMouseOver, et cetera -- when the user performs an action that is tracked by the browser, do this function. If you don't want it to happen onChange, pick the event you want to have trigger the function, that's all.
Megan posted this at 03:09 — 9th November 2002.
She has: 11,421 posts
Joined: Jun 1999
The code on that page you linked to looks like this:
onclick="if(options[selectedIndex].value)
window.location.href=(options[selectedIndex].value)"
It's basically the same as what I posted, just with onclick rather than onchange - I don't think the resulting effect is much different, but you might want to try both to see what the difference is (if any). On change just means that when the selected menu item changes from one thing to another, do what's in the script. So, onchange shouldn't be much different from onclik I don't think (although I might be wrong on that....)
Megan
Connect with us on Facebook!
Suzanne posted this at 02:34 — 9th November 2002.
She has: 5,507 posts
Joined: Feb 2000
http://www.google.com/search?q=jump+box+javascript
Pick one. Some have buttons options, some don't, the theory is the same, it's just which event triggers the action.
Suzanne posted this at 02:32 — 9th November 2002.
She has: 5,507 posts
Joined: Feb 2000
HTML will not do what you are looking for.
JavaScript will. As Megan and Julia showed you. It's small, and effective and couldn't be simpler.
Server-side languages will also do the same job, but in a far more complex manner (you submit the form, the form processor says, oh, this is what you want to have happen and then makes it happen).
HTML is a language -- it's a MARKUP LANGUAGE (as in Hypertext Markup Language). It is not, however, a scripting language.
JavaScript is a client-side scripting language.
PHP, ASP, ColdFusion, JSP, Java are server-side scripting languages (as are C, C++, C sharp, COBOL, et cetera).
Client-side means that the script is visible (and therefore controllable) from the browser. Server-side means all the processing is done on the server and the user/browser only sees the result.
Anyway, semantics aside, you want a jump box (JavaScript script that means there is no "go" button to submit the form) so that when people release the form it goes to the page last selected.
fiesty_01 posted this at 00:53 — 9th November 2002.
He has: 173 posts
Joined: Nov 2002
I didn't know what else to call them, other than "scripts" perhaps.
zollet posted this at 00:33 — 9th November 2002.
He has: 1,016 posts
Joined: May 2002
Just a side note... HTML, JavaScript and DHTML aren't languages
Criper2000 posted this at 00:18 — 9th November 2002.
He has: 23 posts
Joined: Nov 2002
I think html is.
fiesty_01 posted this at 23:49 — 8th November 2002.
He has: 173 posts
Joined: Nov 2002
Hello busy. I'm just looking for the most simple, basic pulldown menu code that will allow me to put links (that actually work and go somewhere) into my pulldown menu. I am not looking for an "onChange" function (1 pulldown & 1 checkbox beside it that changes when you manipulate click something on the pulldown)... I only want the pulldown box. I believe the code I am looking for will likely end up being either JavaScript or HTML.
Check out the "Track List" pulldown boxes on this page so you will know exactly what I'm trying to do:
CLICK HERE
Busy posted this at 21:57 — 8th November 2002.
He has: 6,151 posts
Joined: May 2001
I don't understand the idea of this, do you want another code to do the drop down or want opinions on what language to do it in?
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.