I need to create two drop-down boxes and a GO button for navigation. In one drop-down box the user will choose a city and the other drop-down box will require the user to choose a location. When the user hits the GO button they will go to a Web page based on their choices. Here is the code I am using:
So if the user selects "LA" in the first drop-down menu and then "Airport" in the second drop-down menu and then hits GO, they will be taken to a page that has airport information for LA. Can this be done with JS? If so, how? Remember I'm a newbie at JS and still learning (we all have to start somewhere I guess).
I am trying to make a form where the user is only able to select an option from one of the drop down menus and if they click both then submit an error should pop up telling them to select just one. Now I have found this code:
<SCRIPT LANGUAGE="JavaScript"'> <!-- function validateForm(){[code]....
the first problem is that my menu must be named "id[2]2" which causes a problem due to the bracketed 2 and the 2 after. Is there any way around that?the second problem I forsee is that this will only work with 1 drop down box being unselected. I need a code that will give the warning if nothing is selected OR if something is selected in both drop downs.
I have an image that uses an image map for navigation. We would like a pull-down menu to appear when the user mouses over the link. The pull-down menu is another image that was created to retain the look of the site and would use another image map for it's links....
thinking about implementing some accordion menus. Want to use the latest code. Is this modern code on this site [URL] also, anyone have a link to any modern code for onmouseover instead of onclick navigation through accordion menus?
I'm having problems with a Javascript 'Lookup' function.
Basically, I have a select menu 'Customer' which triggers a 3 JS functions, to populate 2 extra select menus.
Using IE Developer Tools, during debugging, I get this error: Expected ';' Error
This relates to either: eval(ajax_CustContact[index].response); OR eval(ajax_CostCentreContact[index].response); (it's a bit random, as sometimes it works, sometimes it doesn't)
I have tried changing the 'custid' to 'custname' to check whether it was an integer causing the problem, but had the same problem.
The following script generates three SELECT menu's... one for days one for months and one for years. Each time a new year or a month is selected the menu's are updated to allow only valid dates. Its only just been finished and could probably use commenting more, but im always open to suggestions, advice and criticism.
I have 9 select menus that are populated by a php for loop. Each has a numeric value that is displayed base on the selection (which I have working).I can not figure out how to sum all of these values and display them in a <div> tag.what I have thus far:
// Part of a function that creates drop down boxes <select name="$name" onchange="document.getElementById('cost_$name').firstChild.nodeValue = this.options[this.selectedIndex].getAttribute('cost_$name')">
The intention is that when you select a site from the list, the banner underneath changes. However, I can only get it to do this once, then it simply refuses to let you select anything else. This is the code I am using to change it:
function defineimage() { if (document.forms[0].gourl.value = "http://jeff.zhomg.com") { document.images.linkimage.src = '/images/exchange/jeff.gif' } else if (document.forms[0].gourl.value = "http://www.strangedrawingsartgallery.com") { [Code]...
I created this script because <select> form menus in IE on Windows appear on TOP of my DHTML layer navigation menus = client NOT happy and blames YOU. To avoid this crappy situation you can use my script to hide a certain number of the <select> menus when your DHTML layer nav menus are active.
Place this JavaScript in the <head> somewhere.
<script type="text/javascript">
// code to hide/show form menu drop downs ie/win courtesy of www.dreamingdigital.ca // function should take in the parameter "visible" or "hidden" (the_action)
function dd_hide_show_selects(the_action) { var dom = (document.getElementById) ? true : false; var windows = (navigator.userAgent.toLowerCase().indexOf("windows")>-1) ? true : false; var ie5 = ((navigator.userAgent.toLowerCase().indexOf("msie")>-1) && dom) ? true : false; var cp_selects = document.getElementsByTagName("select"); var number_to_hide = 0; var number_needed_hidden = 4; // 4 was the number of selects I needed to hide
<a href="somewhere.html" title="Some text to describe the link." onMouseOver="dd_hide_show_selects('hidden');" onMouseOut="dd_hide_show_selects('visible');">Something</a>
I am building a jurisdiction calculator for issues on/off Indian reservations. I'd like the user to select 3 variables (radio buttons would also work) - whether the victim is Indian/Non, the perpetrator is Indian/Non, and whether the crime occurred On/Off a reservation and have a div that displays the possible jurisdiction outcomes based on the selections.For instance, if the user selects Victim: Non-Indian, Perp: Indian, Location: On reservation, the possible jurisdiction results would appear.
I'm trying to implement a minimal navigation bar using jQuery's toggleClass() function but can't seem to get it working.
It's the .img_selector div at the bottom of the page:[url]
I want to toggle the 'active' class for each <a> when it's selected, to indicate which image is showing, so after calling jQuery, in the <head> I've got:
Then the links, which also include the showPic function:
I am not terribly familiar with Javascript but i am looking forward to learning, and currently the problem I am facing is this:I have an a file being included to an .shtml document, that serves as my navigation, the code is like this:
<div> </div><div>I did some navigation menu and sub menu using jquery ,</div><div> </div><div>like ;</div><div> </div><div>Menu1 </div><div> Sub menu1(some.php)</div><div> Sub menu2(some1.php)</div><div>
I've seen a variety of implementations around that enable selecting all or no checkboxes by using a checkbox to toggle that choice. However, I'm trying to find a way like this: I have two text links on my page: Select All, and Select None. How can I get those links to call a jquery function to select all or select no checkboxes in my form? As a little food for thought:
<head> $(function() { //function for selecting all or none...is there a way to make a single function that passes in a parameter to differentiate between selecting all or selecting none, or do I need a separate function for both?[code]....
I'm trying my hand at developing a new website for my professional career, and am trying to implement a simple Rollover > Pop-out Menu system, and am finding the javascript confusing to do. I am using Photoshop and Dreamweaver/Fireworks, and have all of my normal and over button graphics finished, and created one simple pop-out in Fireworks.
My problem is getting both the swap image in javascript onMouseOver event, and the menu event to run at the same time. How is this usually done? Can you add two functions to one java event?
I have a little problem with drop down menus. I have a PHP page in which I extract some categories (from a database). I put those categories in a drop down menu without problems. I would like that when a category is chosen, the entire page should be reloaded without the pression of any "submit" button, and should appear a new drop down menu. The main problem is the reloading of the page as it appears not to work if, after OPTION VALUE, I put the name of the same page in which there is the forum (entrate_in.php). Infact it say "page not found" while it works perfectly if I put the name of a different php page... how to resolve this problem? Code:
I'm trying to make two drop down lists. The first will be a list of regions, such as USA and Canada. The second will contain cities within those regions, such as Washington or Ottawa. The second's content will be conditional upon the user's selection of the region. I have this so far: Code:
I am trying to use an SSinclude to insert my menu information (not the .js file) in the head section. Again, this is so I don't have to update every page.
However I get an error at the body tag, where I need to do OnLoad="init()"
If I copy and paste the contents of the include into the html it works fine. Theoretically, this is all that the SSI is doing and so it should work.
I have the following code. When the user clicks on one of the links (Bookies Quick Search, Bingo Quick Search or Casino Quick Search), the submenus will appear underneath. This code works fine, however the only problem im having with this is that i cannot seem to get rid of the break inbetween each one. Code:
If you look on this page, on the right hand side if you click on 'Share with Friends!' or 'Report this App', you'll notice the sliding effect I'm after. Now I'm no guru when it comes to JavaScript so trying to look through the source just baffles me.
Does anyone know of a tutorial or script I can take a look at to try and figure it out? A pretty barebone version would be nice.
What I need to be able to do is have the user presented with a single dropdown menu within a form using HTML <SELECT> and <OPTION>. Once they choose a particular option I then want another dropdown to appear alongside it with a list of options that are dependent on what was selected in the first dropdown. Then I want the same thing to happen a third time, i.e when the user selects an option from the second dropdown a third one appears on the screen to the right of it and then whatever the user chooses from this final dropdown is used in the form submission.
Because I am a complete beginner it would be really useful to have an actual code example that I could then modify with my own options.
I'm having a hard time with the use of my DHTML menu and video on my site. The video is served using Windows Media Player. Short of hiding it, I can't seem to get my DHTML menu to appear above the video. Unfortunately, I have noticed that hiding the video caused the browser to flash several times. Does anyone know of anything I can implement that would minimize the client side impact and also allow my menu to appear on top of the video?