Show / Hide Multiple Rows For Event Categories?
Aug 11, 2011
Trying to display events on my website based on what my clients want to view. I have 3 checkboxes setup to toggle the connected events, but I can't seem to make the onclick handle more than 1 event at a time.
Basically, I want to know
1) how to display more than one tr row'd event with the selection of any given checkbox.
2) how to have all boxes checked on the page load (checked=true only checks the box with no info showing)
3) AND/OR how to create a CHECK ALL option
4) and, lastly, how to give it a scroll in case I have many events code...
View 2 Replies
ADVERTISEMENT
Jun 14, 2011
I have a table that contains many rows, some in italian with code <td nome='riga_i'>. and some in english with code <td name='row_e'>. I have created two buttons with different background flags: italy and uk, so when one pushes the button with flag uk, the html page will be reloaded with only english rows, and when one pushes the button with flag it, the same page is reloaded containing only italian rows. All the code posted here works well, but I think that the code can be better because to reach this result I had to dupplicate the same function and I don' t like this.
Here the code:
To better the code I have tried in this way but without success ...
View 2 Replies
View Related
Jan 7, 2010
I want to hide/show table rows with an onclick event. Here are the relevant snippets of code I have:
Script:
$(document).ready(function() {
$("#plan1-title").click(function() {
$("#plan1").toggle();
[code]....
It works in all browsers (Firefox, Safari, Chrome, and Opera), however not a single version of IE 6-8 will toggle the table row.
View 2 Replies
View Related
Jun 13, 2011
I have a table that contains many rows, some in italian with code <td nome='riga_i'> and some in english with code <td name='row_e'>. I have created two buttons with different background flags: italy and uk, so when one pushes the button with flag uk, the html page will be reloaded with only english rows, and when one pushes the button with flag it, the same page is reloaded containing only italian rows. All the code posted here works well, but I think that the code can be better because to reach this result I had to dupplicate the same function and I don' t like this.
Here the code:
To better the code I have tried in this way but without success ...
View 1 Replies
View Related
Mar 15, 2011
I ahve this table as code shown below with buttons Up and down above and below the table respectively now whgat i want to do is that as I have ten enteries in the table.I want to show only 6 of them at one go on a page and the rest 4 should be hidden and when I cliock the "down" button the next four should be displayed and vice versa when I click "up" button the first 6 should be displayed.
Code:
<div >
<input type="button" id="up" value="up"/>[code]....
View 2 Replies
View Related
May 4, 2011
I have a table that is set up to look like a menu and would like to show/hide certain rows, the problem is that the rows do not have id's...basically, it looks like this:
<table class="mainTable">
<tbody>
<tr><td class="Level1 Selected"><a href="page1.aspx">Page 1</a></td></tr>[code]....
Ultimately, what I would like to do is: show all Level1 rows.hideadditionallevels below Level1 (which could be any number deep)
and finally, if row is selected then show additional levels below (td class will change to "Selected" when on the page) and above (ie. if Level2 is selected).
View 4 Replies
View Related
Aug 16, 2010
I have a query regarding the hide/show of the cells in a table.The first column is 'Yes and No' options using combo box, 2nd option is 'input field', 3rd column is also 'Yes and No' option using combo box, and 4th option is also 'input field'.What I want is to make a table using JAVASCRIPT, in which if i select 'No' from the first row first column, i want to hide the remaining 3 cells of the first row. Otherwise if i select 'yes' from the first row first column i want to show all the 3 other options of the first row. Also in between if I select 'No' from the first row third column i want to hide the first row fourth column cell. Selecting 'yes' from the first row third column will show the first row fourth column.I want apply the same setting of hide and show cells into the remaining columns also.
By selecting 'no' from first column -> hide other corresponding cells of the row by selecting 'yes' from the first column -> show other corresponding cells of the row
AND ALSO
By selecting 'no' from third column -> hide fourth cell of the corresponding/same row by selecting 'yes' from the third column -> show fourth cell of the corresponding/same row
I have posted this question in the tablular form, but it is now showing in the proper format. Anyone in the forum please help me to make this table using JAVASCRIPT. I need this table within a day or two.
View 3 Replies
View Related
Sep 2, 2010
I've got a table that I want to be able to show/hide rows based on what check box is checked. By default, I don't want anything displayed, then if you check a or some of the check boxes you'll see the data.Here is what I have, which has some effect in FF but does not work at all in IE.This is my script (which is part mine, part web-found)
<style type="text/css">
.this {
display: none;[code]......
View 3 Replies
View Related
Apr 5, 2011
I have a script that prints out a lot of <tr>'s, each has a different id, let's say it's a number. What i am trying to get is when a user enters numbers in a certain textfield, named #idtext for example, it shows only those <tr>'s whose id numbers matches the entered value and hides the rest. For example, user enters 23 in the text field, rows with id numbers 123, 23, 231 are shown, the rest are hidden, etc.
Atm i have smoething like this, not working:
$("#idtext").change(function(){
var val = $("#idtext").val();
$('tr[id^<>'+val+']').hide();
$('tr[id^='+val+']').show();
});
View 4 Replies
View Related
May 4, 2009
I am generated some HTML / Javascript through the use of some XSLT, and what I aim to do is generate a table with many rows where we always have the 1st row showing (which has a +/- image there for users to click so that they can expand/collapse the rest of the rows in that table). I am having trouble with the Javascript on assigning the relevant class to the rows so that they get hidden or shown.So far my XSL is outputting the following...
HTML Code:
<table class="InfoBlock" cellspacing="0" cellpadding="0">
<col class="report_column_headings">[code]...
I know I am violating HTML here by having many tags with the same ID, but I am just looking for ways to get this to work.what I place in my 'ShowHide()' javascript method?
View 1 Replies
View Related
May 27, 2009
is it possible to have several rows in a table with the same id so i can show/hide them in a block?I have also tried adding a span around the block of rows but that doesn't work ( I seem to remember you cant hava a span around TR tags?)
View 4 Replies
View Related
Jan 6, 2006
I've tried some methods mentioned in other topics here, but I can't seem to get any of them to work for this specific problem I have. I'm not very experienced in javascript so I haven't been able to modify any of the other examples to work the way I need it to.
I hope the code gives you some idea of what I need even though it's a bit messy, I think most of it should be pretty self explanatory? Code:
View 4 Replies
View Related
Nov 11, 2007
I use JS to show/hide a <tr> row but, when I do that, the content show or hide but there still have the space they use to took while visible. In short, the table did not update himself.
Any one have already got this problem or know the solution?
View 1 Replies
View Related
Dec 28, 2010
wrote me jvascript code for show/hide table rows.The situation is:
<table 1>
row 1
row 2
row 3[code]...
row 1 and row 4 are in one looping
row 2, row 3 ,row 5 and row 6 are in another one looping.The picture is like this:
1.when page load..
2.only row 1 and row 4 display
3.when row 1 is clicked row 2 and 3 will display
4.when row 4 is clicked row 5 and 6 will display
View 2 Replies
View Related
Feb 22, 2009
I'm trying to make a table that will hide multiple rows in single js functions... now I put together a way to do it, but it requires multiple id declarations in the functions, is there any way to do it with classes instead of IDs, so that I can have a blanket class that I can use?See:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">[code]......
View 8 Replies
View Related
Jul 20, 2005
I'm trying to get the following script to work, but I'm getting an error saying "rowID is undefined".
function showhide(rowId) {
var showRow = "Edit_" + rowID
var hideRow = "View_" + rowID
document.getElementById(showRow).style.display ="block";
document.getElementById(hideRow).style.display = "none";
}
I'm building the html using an xsl stylesheet, so I'm passing a
dynamic name attribute as the rowID parameter. When I look at the HTML
source, it looks fine. Please tell me where I'm going wrong...I'm sure
it's simple, just not to me! Thanks, Kathy
Here is a sample of the row source:
<tr id="View_Label" bgcolor="red" valign="middle"
style="display:block">
<td width="70%"><h3>1.*Label</h3></td>
<td width="30%">
<input type="button" name="Edit" value="Edit"
</tr>
....then another row with ="Edit_Label" is used for the input boxes,etc.
View 2 Replies
View Related
Oct 21, 2011
Say, for example, I have a table with an undefined number of rows. Row 1 contains number 1 to 10, row 2 contains 11 to 20... you get the picture. The table is autogenerated and id's are made unique by the system (GUID's plus id). I am able to add a 'name'attribute to'img''sthat are in the td's and add a groupname i.e. '11to20'. Using this i want to test showing/hiding grouprows. Now I have a dropdownlist on the page where the user selects the groupname from
i.e."11to20". I would like to be able to hide the rows not having the selected groupname
and show the rows that do. I've constructed a query that would hide the selected groupname but it hides all tr's.
$(obj).attr('name', obj.options[obj.selectedIndex].value).parents('tr').siblings().fadeOut('fast');
Here's the (simplified) sample html I constructed by hand for this message:
<fieldset class="my-form"><div>
<div class="NumberSelector"">
<label for="ChooseNumber">Choose a number</label>
<table id="ChooseNumber" cellspacing="10" border="0" style="width:542px;">
<tr><td><label for="ChooseNumber_1">
<img name="1To10" src="/images/number1.jpg" alt="number1" onclick="ImagePopup(this);"/> .....
View 3 Replies
View Related
Feb 15, 2006
I am maintaining a site which is written in ASP. Now i have to create
some new pages.
In one page we have a table with many rows. Now, I want to enable or
disable(showing and hiding also) 2 rows of this table depending upon
the value selected by the user from a drop down list.
View 4 Replies
View Related
Sep 27, 2010
I am using jquery with the cookie plugin and I have multiple image buttons that can hide/show multiple elements. My question is how can I add a cookie to this code to remember whether each separate element is opened or closed?
The code,
$(document).ready(function() {
// choose text for the show/hide link - can contain HTML (e.g. an image)
var showText='<div class="expanddown"></div>';
var hideText='<div class="expandup"></div>';
// initialise the visibility check
var is_visible = false;
// append show/hide links to the element directly preceding the element with a class of "toggle"
$('.toggle').prev().append('<a href="#" class="togglelink">'+hideText+'</a>');
// capture clicks on the toggle links
$('a.togglelink').click(function() {
// switch visibility
is_visible = !is_visible;
// change the link depending on whether the element is shown or hidden
$(this).html( (!is_visible) ? hideText : showText);
// toggle the display - uncomment the next line for a basic "accordion" style
//$('.toggle').hide();$('a.toggleLink').html(showText);
$(this).parent().next('.toggle').slideToggle('fast');
// return false so any link destination is not followed
return false;
});
});
HTML,
<a class="togglelink" href="#"></a>
<div class="toggle">
Content
</div>
View 6 Replies
View Related
Jun 22, 2010
Let me start by saying I'm a noob to JavaScript. What I'm trying to do for my website is have a select menu that shows the number of div's that's selected. I found a JS that I could do that with, but it only toggles, not change specifically what's selected. So if you click the wrong one, it doesn't work right.
[Code]...
View 2 Replies
View Related
Sep 27, 2011
I have a page that has 26 divides one for each letter A-Z.
I have the script written so that when you click on the link for one letter it shows that divide and hides the rest. However, I think there has got to be an easier way to do this because the code is so long! It works great but takes forever to write! reduce the size of this code?
Javascript: (Short and simple code)
function showstuff(divID){
document.getElementById(divID).style.visibility="visible";
document.getElementById(divID).style.display="block";
window.location.hash="names";
[Code]....
So I have 26 functions being called for each click! There must be a simpler way to do this. Perhaps I can write a function that calls all 25 hidestuff() functions and then I can add the one showstuf().
View 13 Replies
View Related
May 28, 2006
Does someone knows how i can show/hide multible divs at one click?
View 2 Replies
View Related
Oct 24, 2010
On the homepage of my site, I would like to have some nav links that toggle between a few divs that are below in the content The divs in the content should display one at a time. For example, if you click nav1, the user would see div1. If nav2 is then clicked, div1 would hide and div2 would display.
I have some code that will do this, but for some reason it is hiding any divs that are within the toggled div. I'm very basic with JS and could use some help here. Here is my code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<script type="text/javascript">
function toggleID(IDS) {
var area = document.getElementById('secondContent');
var sel = area.getElementsByTagName('div');
[Code]...
View 1 Replies
View Related
Dec 5, 2010
So I am trying to hide content and show it when selected with a select box. The first select box works fine no problems.
However I added a second one with two options, and it will not work at all. If I use the same name it messes up, and if I make a new name, it does nothing at all.
ShowNext function is the new one I added that doesn't work.
<script type="text/javascript">
function ShowReg(op) {
document.getElementById('public').style.display='none';
document.getElementById('alliance').style.display='none';
[Code]....
View 13 Replies
View Related
Jul 6, 2011
I found the following script online to show/hide a login div.
<script language="JavaScript" type="text/javascript">
function login(showhide){
if(showhide == "show"){
document.getElementById('popupbox').style.visibility="visible";
}else if(showhide == "hide"){
[Code]...
It works really well but I have other div I would also like to show/hide. Is it possible to have a variable in the function that I could pass the name of the div to show/hide.
I have a ul list that I am using for a navigation menu and I would like to be able to click on items in the list to show different div's. I assume this is possible, so could someone please give me an indication of how to do it as I have been trying for a few days now and no joy.
View 5 Replies
View Related
Oct 31, 2011
im trying to do a single html page with multiple checkboxes to hide/show text when checked/unchecked. I'm really bad at html but so far I have got this: The problem I have is I dont know how to add more checkboxes.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>101st</title>
[Code]....
View 2 Replies
View Related