Dual Dropdown Doesn't Refresh?
Apr 14, 2009
I have this code that I use to display and grab data from 2 tables in mysql into 2 dropdown menus.
When I select in dropdown menu 1 an item (with ID in database, the first table has fields: ProgrammaID, Programma).
Then in de second dropdown menu the particulair item with this same ID as the selected one in menu 1 need to be shown. The second table has fields: ProjectID, ProgrammaID, Project.
The ProgrammaID from table1 is also in table2 (designed by our previous designer).
Now I can select an item from dropdown menu 1 but the second dropdown menu isn't shown the items as should be.
Here is the code I use:
[Code]....
View 5 Replies
ADVERTISEMENT
Oct 16, 2011
<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 StrictEN"
"http:www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
[code]....
View 3 Replies
View Related
Apr 15, 2009
I have this script I want to use. I have 2 dropdown lists (which are both connected to mysql database). The second dropdown list is depending on the first dropdown list in order to show items from the database. I can select an item from the first dropdown, but the second remains on its default setting (kies project).Somehow the page doesn't refresh so the second dropdown list will never show items (according to the selection of the first dropdown list).
In this code there is in the option a "onSelect" part but I'm not sure if this should be there, I think it should be an onChange feature, but cant get it right.
View 6 Replies
View Related
Sep 7, 2011
I'm trying to achieve a notification feature which you see on facebook, myspace and so on. Here the trick that I use:I've pulled a number of data that a user has not been read (where active ='0') from a database to display on a notification icon on the menubar -- the exact notification icon you will see on facebook and myspace -- says 2 unread messages in bright red.As the user click on the notification button to open up a dropdown menu and read their unread messages I process the script and update the active = '0' to active = '1' and refresh the page.The problem is when the page is refreshed, the dropdown menu and the notification both disappeared.How do I remove only that number in red and keep the dropdown menu open, I know that both facebook and myspace didn't even refresh a page.In this case, I don't even know whether I use javascript or ajax. I've stolen (borrowed) the feature from twitter.
View 1 Replies
View Related
Apr 8, 2010
FF, Safari, Opera all execute this javascript code to refresh the page properly, but in IE version 8.0.6001.18904 the page doesn't seem to refresh on click of orange_refresh button. I have checked out a different version of IE8, don't recall exact version, but it did seem to work fine in that one, whatever version it was probably the latest now that I think of it. Check out code below any sug.'s could be helpful, though its probably a bug..
<a href="javascript:document.location.reload();"
onmouseover="window.status='Refresh'; return true"
onmouseout="window.status='Page Refreshed'"><img src="image/orange_refresh.png"
width="30" height="30" border="0" /></a>
View 5 Replies
View Related
Oct 11, 2007
I am building a HTML file with a listbox/menu with 4 values in it. The page works fine on the first run and each time the list is clicked it displays the option selected. However it works the first time i click each of the four values and the second time i click an option it displays something else in the list. Can you figure out if the problem lies within my switch statement..??
function checkVal4(Val)
{
switch (Val)
............
View 1 Replies
View Related
Mar 25, 2010
Most of the Javascript I see has some sort of time limit on page reload and is not really what I am trying to accomplish:
<meta http-equiv="Refresh"
content="10; URL=http://coffeeandtealtd.com/buynow.html" />
I am trying to make our buy page reload after clicking the Paypal "continue shopping" button in Paypal Website Standards. The pop up Paypal shopping cart window closes after clicking the button but our buy page doesn't reload. It doesn't reload in Safari although it seems to be fine in FF and IE. how to make the page reload in this specific instance only.
View 2 Replies
View Related
Jul 8, 2011
i have to txt <inputs> on a php web page, which use the jquery datepicker. however when i do an ajax refresh of one of the spans on the page, the datepicker wont pop up any more unless i do a reload of the whole page?
View 1 Replies
View Related
Jul 27, 2009
I'm using an xmlhttp request to get information from a database. Everything works fine in Firefox, and it works in IE until you try to refresh the page. If a news post (thats what it is getting from the database) is deleted it will continue to show the same information. I can't really post all of the script because it (along with the html and php) are spread out through many different pages:
[Code]...
View 8 Replies
View Related
Jan 10, 2011
I have this PHP code which calls several dropdown menus. These menus are nearly identical except each menu queries a sql database with the paramters set by all the previous (Make, Model, Year, Size) down the line. This code works in Chrome and FF, but in IE the default drop down (Make) is there, and the first dropdown (Model) gets called- but the subsequent dropdowns (Year and Size) do not.
I read somewhere that Microsoft acknowledged some error in how Ajax responds to select menus but has no intention of rectifying it or providing a workaround?
The Page code for calling the Functions:
function ajaxFunction1(fld, val){
//document.getElementById('details').innerHTML="";
var ajaxRequest;
try{
[Code]....
View 1 Replies
View Related
May 9, 2011
why my simple javascript to refresh the parent window doesn't work in IE8? When the child window closed, it reopen another new window for the page I want the parent window to refresh and nothing happened on the parent window.How can I make it load the page from parent window instead of a new window ??? it works perfectly in other browsers but not IE.
Code:
<script language="JavaScript">
<!--
function rent() {[code].....
View 1 Replies
View Related
Apr 16, 2009
I have 2 dropdown lists which are connected to a mysql database. When I select an item from the first dropdown list the second dropdown list should show item which are linked to the item from the first list. But the thing is I can select an item from the first one, but the second isn't showing anything.
In the mysql database I have 2 tables: hesk_programma and hesk_projecten. In table hesk_programma there are a ProgrammaID and Programma column. In table hesk_projecten there are a ProgrammaID, a ProjectNumber and a Project column.
ProgrammaID from the two tables are connected to each other, so when I select an item from the first dropdown list with the ProgrammaID AK, the second dropdownlist should only display the items with the ProgammaID AK from the hesk_projecten.
Here is the code I use:
PHP Code:
<?php
mysql_connect("localhost", "root", "");
mysql_select_db("bestellingen");
$query = "SELECT * FROM hesk_programma ";
[Code]....
By the way, one more thing. The ProjectNumber from the hesk_projecten table should be displayed (when selecting an item in the second dropdownlist) in a input text field.
View 1 Replies
View Related
Jul 20, 2005
Is there a way of controlling (i.e., using windows.open ) which screen
new windows are to appear in, when I have multiple screens ?
Is that a programming issue, or does it have to do with the OS?
View 4 Replies
View Related
Oct 21, 2010
I'm after a drop down script that basically you press categories and down it drops with say one side products by category the left side and say product by price the right side.[url]... do it when you click on one of the top links I'm just not sure of the name and the most easiest to implement?
View 2 Replies
View Related
Sep 13, 2002
I have seen this quesion asked in various forms but the general idea of the question is "How do I make a rollover image clickable". Usually the asker wants to have the image stay on when clicked. Here is a little script that will do that and more..
This is the main code that goes in the HEAD section of your document.
<script type="text/javascript">
<!--
/**
* Dual/Tri/Quad state rollovers from www.javascript-fx.com
* posted at and available from www.codingforums.com
* You may use this code on any website but please
* leave this comment intact.
*/
var img= new Array();
var di= document.images;
var currOn= null;
function Rollover(imgName, imgOut, imgOver, imgClick, imgClickOut)
{
if(imgClick == null)imgClick = imgOver;
if(imgClickOut == null)imgClickOut= imgClick;
var roll = new Object;
roll.out= imgOut;
roll.over= new Image();
roll.over.src= imgOver;
roll.click= new Image();
roll.click.src= imgClick;
roll.click_out= new Image();
roll.click_out.src = imgClickOut;
img[imgName] = roll;
}
function mOver(imgName)
{
di[imgName].src = (imgName != currOn) ? img[imgName].over.src : img[imgName].click.src;
}
function mOut(imgName)
{
di[imgName].src = (imgName != currOn) ? img[imgName].out : img[imgName].click_out.src;
}
function mClick(imgName)
{
if(currOn != null) di[currOn].src = img[currOn].out;
currOn = imgName;
di[currOn].src = img[currOn].click.src;
}
function mSelect(imgName)
{
mClick(imgName);
mOut(imgName);
}
/*** End the rollover code ***/
//-->
</script>
This is the code to define rollovers and is also placed in the HEAD of your document
<script type="text/javascript">
<!--
Rollover("home", "images/home_off.gif", "images/home_on.gif");
Rollover("email", "images/email_off.gif", "images/email_on.gif");
Rollover("script", "images/script_off.gif", "images/script_on.gif");
Rollover("links", "images/links_off.gif", "images/links_on.gif");
Rollover("special","images/special_off.gif","images/special_on.gif");
//-->
</script>
Where the syntax is
Rollover(Name, offImage, onImage);
Then to use the code in a rollover image the HTML in the BODY of your page should look like this
<A HREF="#"
onClick="mClick('home');"
onMouseOver="mOver('home');"
onMouseOut="mOut('home');"><img name="home"
src="images/home_off.gif" border=0></A><br>
NOTE: The name if the image must match the Rollover name
--- <img name="home"
--- Rollover("home", "images/home_off.gif", "images/home_on.gif");
If you use the script in this form you will get something like this demo
Dual State Rollovers (http://www.javascript-fx.com/post/codeforums/quadroll/QuadState2img.html)
------------------------------------------------------------------------
If you want the clicked image to be a third image you define the rollovers as follows :-
<script type="text/javascript">
<!--
Rollover("home", "images/home_off.gif", "images/home_on.gif", "images/home_clk.gif");
Rollover("email", "images/email_off.gif", "images/email_on.gif", "images/email_clk.gif");
Rollover("script", "images/script_off.gif", "images/script_on.gif", "images/script_clk.gif");
Rollover("links", "images/links_off.gif", "images/links_on.gif", "images/links_clk.gif");
Rollover("special","images/special_off.gif","images/special_on.gif","images/special_clk.gif");
//-->
</script>
Where the syntax is
Rollover(Name, offImage, onImage, clickedImage)
Which results in this demo
Tri State Rollovers (http://www.javascript-fx.com/post/codeforums/quadroll/QuadState3img.html)
------------------------------------------------------------------------------------
If you want to have a clicked image and have that clicked image also have a (different) rollover effect you define the rollovers as follows :-
<script type="text/javascript">
<!--
Rollover("home", "images/home_off.gif", "images/home_on.gif", "images/home_clk.gif", "images/home_clk_off.gif");
Rollover("email", "images/email_off.gif", "images/email_on.gif", "images/email_clk.gif", "images/email_clk_off.gif");
Rollover("script", "images/script_off.gif", "images/script_on.gif", "images/script_clk.gif", "images/script_clk_off.gif");
Rollover("links", "images/links_off.gif", "images/links_on.gif", "images/links_clk.gif", "images/links_clk_off.gif");
Rollover("special","images/special_off.gif","images/special_on.gif","images/special_clk.gif","images/special_clk_off.gif");
//-->
</script>
Where the syntax is:
View 2 Replies
View Related
Sep 8, 2009
I am needing a dual thirty minute countdown timer. They would appear side-by-side and there would be a start button. Once the first one is finished it would automatically initiate the second.
View 1 Replies
View Related
Jul 5, 2010
I'm inexperienced with JS and I'm hoping that someone will knowCallback2)What I'm trying to achieve is for variables which come from PHP to be added to the map automatically. So far I have determined that variations on the theme of.Can someone tell me where I am going wrong? Hopefully someone looking at this is chuckling at the triviality of it!
View 5 Replies
View Related
Dec 3, 2009
I have a Javascript function that toggles a 'show/hide' table row:
//CONTROL
Code:
<a href="#" onclick="toggle('ROW 1, this)"><img src="../../Images/plus.gif" border="0" /></a>
//JAVASCRIPT
Code:
function toggle(id, obj) {
var matchingElements = new Array();
if (document.getElementsByClassName) {
[code]....
Which works fine, but what I need is something like this:
Control 1:
Toggle - ROW 1 (+ Close ROW 2 (if visible))
Control 2:
Toggle - ROW 2
View 2 Replies
View Related
May 3, 2011
I have an unique requirement that needs to be able to click and move between two lists.Each list is compose of an outer <div> and several inner <div>s. When user click on one of the inner div item, it will move from one list to another. To make more sense:
<div id="LeftSelect">
<div>Item 1<div>
<div>Item 2<div>
[code]....
View 4 Replies
View Related
Jan 3, 2010
I finally got the below script working in Firefox and was really pumped about it until I realized it didn't load in Google chrome or Safari. What this script does is its a dual onclick event which makes a hidden div appear and loads an iframe within the now visible div. Here is the code, how to make this work in other browsers.
Here is the header code:
<SCRIPT type="text/javascript">
<!--
var state = 'none';
function showhide(layer_ref) {
if (state == 'block') {
state = 'none';
} else {
state = 'block';
} if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( "document.all." + layer_ref + ".style.display = state");
} .....
Here is the code on the page where a link click shows the hidden div and loads the iframe contained.
<p><a href="#" onclick="showhide('div1');return loadIframe('ifrm1', '[URL]');
">show/hide me</a></p></td></tr>
<div id="div1" style="display: none; position: fixed; z-index:4;
width: 1010px; height: 500px; left: 5%; top: 15%; background-color: #f0f0f0;
border: 1px solid #000; padding: 10px;"><iframe name="ifrm1"
id="ifrm1" width="100%" height="90%" scrolling="yes" frameborder="0">
Sorry, your browser doesnt support iframes.
</iframe><p><a href="#" onclick="showhide('div1')">close</a></div>';
View 4 Replies
View Related
Jul 4, 2009
I got this problem with live() event.I have used it as follows.
$(".addressDiv span").live("mouseover", function(){
//clickable function here......
------------------------
});
I have used the live() event to trigger the function on mouseover in the dynamically added elements. But the problem i got is that once the live event is called it takes the class of the element and stores. And when the class of that particular element is changed dynamically the live() event does not detect the new classed added dynamically, instead it takes the former class. Live() event does not update the class.
View 3 Replies
View Related
May 11, 2010
Before, I had an iframe, and when I moused over a link outside the iframe, it would load a page into the iframe. Background image was part of the page loaded, as well as the text and what not. The problem was, the image took too long to load. I've been learning how to do javascript and I came across some code for preloading an image before the mouseover so there was zero wait time. For the past few days I've been trying to figure out how to have the preload image appear BENEATH the iframe (now with no background image or color) with the allowtransparency attribute set to true.
I've figured out the code to do both individually, i.e. I have the code so that when the link is moused over, the new image will appear; AND I have the code so that when the link is moused over, the page with load into the iframe. Both work, both do what is expected, but they don't do it together.Below is the script. Here's where it's confusing. If I have the "setupImgRollover..." first inside the if statement: the page loads into the iframe, but there is no image. If I have the "setupImgRollover..." after the "document.link..." commands in the if statement: the image appears but the page does not load into the iframe.
HTML Code:
window.onload = rolloverInit;
function rolloverInit() {
for (var i=0; i<document.links.length; i++) {
var linkObj = document.links[i];
[code]....
View 2 Replies
View Related
Jan 2, 2009
I have this code in a page that appears in my iframe if requested from parent:
<script type="text/javascript">
parent.rrr();
</script>
The parent code is:
function rrr() {
javascript:location.reload(true);
}
So, the person clicks a link from the parent, it does a php process in a hidden iframe, which then tells the parent page to refresh. The only problem is that it puts Firefox in a constant loop of refreshing. IE and Chrome work fine. They refresh once and stop.
Though the src code opens the iframe like so: <iframe src="" style="display:none; height:1px;" name="hdplus" id="hdplus"></iframe> Firefox seems to refresh the page with the memory of the child page being in the iframe, constantly looping the child request to refresh the parent.
Why won't Firefox just accept that no page should load in the iframe, as stated in the code? I need to stop this loop, which means I need to get firefox to reset the iframe as it reloads the page.
View 2 Replies
View Related
Aug 11, 2009
How to refresh DIV , without refresh entire page,Am having four DIV ,
DIV1,DIV2,DIV3,DIV4
I want to refresh only DIV! without affecting the DIV3,DIV4 ,
View 8 Replies
View Related
Apr 13, 2011
I have the below code:
<script type="text/javascript">
function loadQuickMessageCheck(File,ID){
var xmlhttp;
[code]....
View 2 Replies
View Related
Dec 3, 2011
I want to use a drop down menu and found a horizontal example from John Resig. But I want to turn it into a vertical menu. How can I do that?
View 2 Replies
View Related