Function Not Working With Pull Down Menu?
Mar 28, 2010I have an function that shoud be activated when the pull down menu in triggerd, the if functions is corresponding to the same menu overig_eenh[]
[Code]...
I have an function that shoud be activated when the pull down menu in triggerd, the if functions is corresponding to the same menu overig_eenh[]
[Code]...
The options in one of my pull down menus link to other sections of the same
page. I've noticed that selecting one of these links opens a new instance of
the entire page instead of just scrolling down to the appropriate section.
How can I make the menu do what I want?
<form name="f1">
<select name="s1" class="hnhjumpbox">
<option value="#">See our Policies...</option>
<option value="#">----------</option>
<option value="#service">Service</option>
<option value="#payment">Payment</option>
<option value="#packing">Packing</option>
<option value="#shipping">Shipping</option>
<option value="#returns">Returns</option>
</select> <input type="button" name="test" class="hnhjumpboxbutton"
value="Go" title="Select a link from the drop-down menu first!"
onClick="location=document.f1.s1.options[document.f1.s1.selectedIndex].value
;"></form>
For instance, I have an anchor at the Payment section. When I select the
Payment link from the pull down menu, a new instance of the page opens and
then jumps down to the Payment section. I want it to jump down to the
payment section without opening a new page.
I am creating a simple/static web site where i need to create pull down menu.
I am wondering how i can achieve it.
I am new to Javascript and I am having problems with loading a pull
down menu.
I get this error:
javax.servlet.ServletException: No data found
It will list the items just fine if I just list the items without
using the select & option tags. I would like to know why I am getting
an error with the following statement:
<select size="1" name="org">
<% while (rs.next()) { %>
<option value="<%=rs.getString("ORG_CODE")%>">
<%=rs.getString("ORG_CODE")%>
</option>
<% } %>
</select>
I have a client who requires a dynamic pull down menu (chained Select Menu) and also requires that it does a basic price estimation based on the selected options from the menus. I have been toying around with Xin Yang Chained Select Menu(Sample A1) as well as a randomly found javascript calculator(sample A2) I found through google search. When trying to combine the two the calculator becomes broken.
Sample A1
Code:
Sample A2
<html>
<head>
<title>Calculate Amount</title>
<script language="JavaScript">
function calcAmount(){
var oprice = parseFloat(document.getElementById("oprice").value );
var sprices = document.getElementById("sprice");
var sprice = parseFloat(sprices[sprices.selectedIndex].value);
var qties = document.getElementById("qty");
var qty = parseInt(qties[qties.selectedIndex].value);
var tot = document.getElementById("tot");
tot.value = (oprice + sprice) * qty;
}
</script>
</head>
<body>
<h3>Total Amount = (OpenPrice + SetPrice) * Quantity</h3>
<table border="0" cellpadding="2" cellspacing="2">
<tr>
<td>Open Price:</td>
<td><input style="width:100;text-align:right" type="text" id="oprice" value="0">$</td>
</tr><tr>
<td>Set Price:</td>
<td><select style="width:100" id="sprice">
<option value="100">100 </option>
<option value="200">200</option>
<option value="300">300</option>
<option value="400">400</option>
</select>$
</td></tr><tr>
<td>Quantity:</td>
<td><select style="width:100" id="qty">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="10">10</option>
<option value="20">20</option>
<option value="100">100</option>
</select>
</td></tr><tr>
<td colspan="2"><hr></td>
</tr><tr>
<td><input type="button" value="Total Amount" onclick="calcAmount()"></td>
<td><input style="width:100;text-align:right" type="text" value="0" id="tot">$</td>
</tr>
</table>
</body>
</html>
Anybody has any idea on how to fire onchange event of a pulldown menu
with script.
I need to trigger it so it when i select a certain option from script,the event handler is executed.
I've managed to use a few pieces (Fancybox, Active Tabs)
I've been tasked with creating a pull down menu that modifies a search box. Very similar actually to the type of search you see on the top left of the jQuery Plugins page:
[URL]
So I need a pull down menu with multiple options that restrict the search box to only to search the selected option.
I don't understand the relation between the two boxes and how to pass the first option to the search box. Is there an existing plugin for this? Or a tutorial that someone can point me to? Or if the answer is, "Go read this book first" I'm happy to read that book.
I've been asked to create a site for my younger sister and she's requested a horizontal pull-down menu using graphics for the links instead of simply text. This is my first time trying to code such a menu (topic not covered in class) and I'm having some difficulty getting it to work completely.
Right now it's partially working. The various sub menus do show up when clicking or rolling over the previous menu item. However all menu items past the one clicked jump down one line when expanding instead of simply showing the sub menu under the main line up. The rollover also has issues but mostly because I haven't finished coding the onmouseout part, so it doesn't go away. I'm trying to get the main pull down working before tackling that part. Below is the JavaScript function I'm trying to use as well as a part of the menu. I've already spent months trying to get this working and am not making much headway.
[Code]...
I am a newbee and with the help of you all and google reseach and w3schools I have made the below jQuery Ajax method work fine with my data in xml (all the chapters of a childrens book). Now I am constructing a new page, just sample chapters, and I want to use json and 'get' it the same way as I did with xml. 1. I am hung up a little, firstly, this code below is not getting anything from the chap_0.json which
is in the same directory so not a path problem file, 2. and secondly I am not sure just how different the code below needs to be to use the data from the .json file vs the xml file. If someone can atleast help me get the .json data to come in (problem 1) , I have been struggling with it for several hours now. Here is the working xml code:
[Code]...
I am trying to pull a value being stored in a php function (it works fine) which is echoed into an html element, and use it in a javascript function. my HTML:
<img id="menu_image" src="<?php echo get_php_value(); ?>" width="356" />
my javascript:
function get_large_image(){
var image = document.getElementById('menu_image').src;
alert(image);
}
right now the alert is giving me flie path to the current page, I need a file path to the image. When I had javascript pull a value from an input tag using the id to reference and stored the php function in the value attribute, I got this: "object HtmlElement" The final purpose of all this is to modify dynamically and HTML <a>'s href and class attribute based on a certain condition being true.
I have a poorly designed third-party API that I'm working with, and I need to, essentially, pull the anonymous function assigned to an onClick event and put it into another function where I can then add its body, another function call, and then reassign the onClick. I've found toSource on MDC , which looked promising, but it doesn't seem to work correctly or, more likely, I'm not using it right. But, also, it's labeled as non-standard, which isn't where I'd like to go, as this is for a public, production site.
View 4 Replies View RelatedI'm very new to jQuery, only picked it up yesterday, so there is very little I understand at the moment. I have a website on which I would like to display a real time, time-series chart displaying results from a database that is constantly updated. how to pull live data from my database and display it in an alert box on my sight. One of the replies said I should use jquery to achieve this.
[Code]...
i m devlpoping a site it has 2 drop dowm menu evrything working with letest browser but in 1e6 first menu is working but second is not
[Code]...
Anyone know why my jQuery IE8 menu isn't working? Works in FF:
HTML:
<html>
<head>
<link href="stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" />
[Code].....
I have a drop down menu on this web site: [URL] the drop down is at the bottom I got the drop down from this site: [URL]
The drop down works in every browser on Mac and PC platforms except for IE.
I was hired a while back to maintain an existing site at (http:url]...). I believe the site was originally designed with Dreamweaver several years back, including the menus.The pop-up menus have worked fine until recently. They seem to be working fine in every browser (Firefox, Safari, Chrome) expect IE. I have spent several hours trying to determine the problem, with no luck.My knowledge of Javascript is limited (which is part of the problem).I have made no changes to the menu code recently, so I don't know how to track down the problem. IE says there is an error "Object Expected" in this line:
<script language="Javascript1.2" type="text/javaScript">mmLoadMenus();</script>
<script type="text/JavaScript">
<!-- Hide from old browsers[code]....
I have a DHTML menu that I created on a site that shows a submenu when you hover over the main navigation.
Everything seems to work fine except when you view the site in I.E. on a Mac. The subnavigation does not show up. Does anyone have any ideas?
In addition to an accordion-related problem in IE (see http://forum.jquery.com/topic/jquery-accordion-click-not-working-in-ie#14737000002219027), I'm having a headache regarding drop down menus. Again, this is only in IE (version 8) - every other browser in the known galaxy responds well to the JS and the HTML setup. The idea is there's a horizontal nav bar of five 'blocks', each with a heading. Hover over the heading and the 'block' (actually an <li>) extends to accommodate a small sentence underneath with a link. Hover off, and the block shrinks back to its original form, with the link hidden. All good in FF, Opera, Safari, Chrome. In IE, though, the <li> block doesn't extend - the link is shown beneath it, but it's outside its frame and looks awful.
[Code]...
I'd love to ignore this but I don't know how to tell my client "It's all good, just don't use Internet Explorer".
It's just a simple jquery pricing calculator. The problem is the original code given was for checkboxes only I suppose. I am wanting to use list/menu as well. The list menu works and adds the values fine in FF, but not in IE
[Code]...
I just started with jquery because I need a solution for a website that doesn't involve flash. I found this tutorial [URL]and I tried to modify the code without realy knowing what I'm doing, needless to say, it's not working at all.
Basically I have the same idea for my menu but it looks a bit different, instead of using a line underneath the links I want the scroller-image to tween on the x-axis with the white line stopping in the middle of each button. I made the image to fill the whole page so that it covers the scroller-line image underneath, I want the effect of a line expanding and contracting and this is the only way I could figure to do it.
css:
.nav-scroller-container
{
width:900px;
height:75px;
[Code].....
If I use jQuery 1.2.6 it work, but if I use last version 1.6 it stop working.
$(document).ready(function() {
$('div.menu:eq()> div.subnav').hide();
$('div.menu:eq()> div.navhead').click(function() {
$(this).next().slideToggle('fast');
});
I'm was working on show and hide drop down menu and this works fine on IE, Google Chrome, Safari but not firefox.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title></title>
[Code]....
I am using a javascript on a DotNetNuke CMS site to allow the user to choose text/background colour, basically it changes stylesheets. Here is the code that I have used:ttp://www.dynamicdrive.com/dynamici...etswitcher.htm and here is my example: http://lrptintranet.com.dnnmax.com/ - you can see the colour image buttons top right under the main menu. The style sheet changer seems to work on the top menu level items but as soon as you choose a submenu the javascript doesn't seem to work. I don't know anything at all about javascript - can anyone offer any advice how I can get this working on the sub menu pages?
View 1 Replies View RelatedI have created a very simple popup menu with 4 links using Dreamweaver 8 behaviors function, works great in Mozilla and Netscape but in IE7 when I hover the mouse over the trigger text the drop down menu appears minus the text. Move the cursor to the pop up boxes and the text appears, a minor but very annoying problem.Also sometimes the top menu box from the pop up doesn't retain its text while the other 3 boxes do i.e. put cursor in any of the pop up menu boxes and the 3 lower boxes display text but the first (top) menu box only displays text if the cursor is actually in the box, makes the menu look very disjointed.You can see images of the problem on Picasa (URL...)I could have added the code for the file (mm_menu.js) but because it is Dreamweaver generated it's 764 lines and a bit large.[code]
View 1 Replies View RelatedI am new to javascript and am eager to learn. I know I could probably just use jQuery to make this cross-browser but I would like to learn the ins and outs of javascript before abstracting them away. Our website currently has a navbar that is coded in HTML on every single webpage so changing it means changing every single webpage. So I want to make this more dynamic (and animated) by using javascript.
The problem is that IE is not cooperating. Specifically, IE loads everything alright but does not slide. It just loads the whole submenu instantaneously after a user clicks. Firefox works perfectly. At the top of my test page is a doc type statement inherited from the real index
[Code]...
I followed a tutorial on here about Expanding Sliding Menu's or Accordion Menu's.Here is the script:
$(document).ready(function(){
$(".Left #SideCategoryList ul#parent-cats ul:not(:first)").hide();
$(".Left #SideCategoryList ul#parent-cats ul:visible").hide();
[code]....