I have a drop-down menu that has many, many entries. Instead of dropping down, I want a window with a vertical scroll bar. Is there any way to accomplish this in HTML?
ty
tim
I have a drop-down menu that has many, many entries. Instead of dropping down, I want a window with a vertical scroll bar. Is there any way to accomplish this in HTML?
ty
tim
never mind, i found the answer.
Now I have another dilemma:
My form has a scroll-window and three buttons. The form action depends on which button is clicked. Is this a function for HTML or Java? I'm thinking it's going to require an 'on-click' script. Help !!???
It won't depend on Java, perhaps you mean Javascript (the two are very, very, different!)
Either way, you can do this with just HTML. Essentially, give each submit button a different value, and in your server script (I'll assume PHP because this is a PHP forum ) you just check for the value that was submitted, as only one of the submit buttons values will actually be sent to the server. Make sure you give each submit button the same name, so you can easily check for it by name.
I've searched again and again, and have not found anything that work.
Here's the latest and not so greatest try.
<form name="SystemForm" method="get">
<select name="System" size="15" multiple="multiple" style="text-align:left;">
<option value = "Alva, OK">OK - Alva</option>
....many more options...
<<option value = "FTS">FTS</option>
<option value="Shark">Shark</option>
</select>
<br />
<label>Daily Report<br /></label>
<input type="submit" value="Go" class='FormButton' name = "System" onclick=window.open('http://localhost/todaysplash.html')></form><br /><br />
<label>Weekly Report<br /></label>
<input type="submit" value="Go" class='FormButton' name = "System" onclick=window.open('http://localhost/weeklysplash.html')></form><br /><br />
<label>Monthly Report<br /></label>
<input type="submit" value="Go" class='FormButton' name = "System" onclick=window.open('http://localhost/monthlysplash.html' )></form><br /><br />
</form>
I've tried a few things, and either Sometimes the url ? works, but won't call up a new window This version opens a new window, but doesn't pass the variable. What I really need is for the script to clear the current window and go from there.
Well, I see the bit of advice I gave about making each of those submit buttons unique completely escaped you. You could try that and see what happens.
The script opens a new window because you're telling Javascript to do that when you click a submit button, and your form won't be submitting any values to it because you've not told it to. Not that it owuld matter, because those pages are HTML, not PHP.
Next, why do you have 4 form end tags? That will cause only the first submit button to ever do anything on the form, the other two aren't in a form, so they won't submit anything.
Your suggestion completely escaped because, to this neophyte, I'm not following your logic. I have tried to give the buttons a unique name, and that didn't help . You forgot to mention that the button itself transmitted a value. I'd have never figured out that without another Google search. I found the solution here: http://www.techrepublic.com/article/handling-multiple-submits-in-a-single-form-with-php/5242116
I thought it was obvious that all form elements sent values when submitted, and most examples in books/tutorials check for the existance of a form element typically called "submit" in order to determine if a form was submitted. The solution you posted is pretty much what I was telling you. I just didn't write all the code for you.