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();
});
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:
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).
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);"/> .....
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.
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.
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)
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?
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?)
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:
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?
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 ...
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...
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
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.
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 ...
What I want to do which I can't achieve is that I want the functionality of the Option Type, Number of Answers and Answer buttons within each row to match the functionality on top. The problem is that under the "Answer" column within the new row it does not allow the user to select a button and the textbox under the "Number of Answers" button doesn't do anything but just display a number within the textbox.
Step 1: Open the fiddle and you see an options and answers section on top. Open the grid and select option 8. Buttons A to H would appear.
Step 2: Type in 2 in the Number of Answers Textbox.
Step 3: Select buttons A and D, you will find out that those buttons would turn green to show they are selected. Now as you entered in 2 in the Number of answers textbox (step 2), it won't let you select more than 2 buttons, if you do an alert would apear stating you are beyond limit please deselect a button to choose another button.
Step 4. Click "Add Question", a new row is added in the table.
Step 5: In the new row you just created, lets say that oh no I made a mistake, there should be 4 answers not 2 answers and within the table row you just added you changed the number of answers textbox from 2 to 4. My question is how can I get it so that it allows the user to select the buttons (turn buttons green) and deselect (turn buttons white) under the "Answer" column within in the row and that if the user has selected 4 buttons but tries to select a 5th button, it will come up with same error as in Step 3?
I am trying to hide/show table when hide/show button is pressed
Problem: The code works fine when I remove 'slow' from line 10. But with 'slow' in line 10 content of toggleButton doesnt change from Hide to Show when pressed.
i'm creating a ASP page, which is going to have a form in it that needs filling out. part of the form will be a table with a header row, then the next rows will have text boxes that need filling out. is there a way of putting in a dropdown box that contatins numbers that will dynamically show the rows. for example if i select 5, then five rows of text boxes will appear. if i select 14 then 14 appear.
How can I use jquery to cycle through all the table rows I have in a table, and hide the rows that contain a specific HTML value that I pass to jquery?For instance, I have a table full of students, and courses each student is taking. If I want to hide all the rows where the course is Chemistry (regardless of student), how would I do that?I already have captured the HTML value, what I mainly need help with is how to tell jquery to hide ALL of the rows with that HTML value, rather than just the row I click on.
Basically i have a form with jqueryui implemented (autocompletes) and I need the form to display the number of current results as the user fills the form, i.e. once the user has finishedinputtingdata into one field, the form will query the database with the current form details and return just the number of results ($mysql_num_rows)
I have my own library for web-design building - active forms, lists. I am going to build tabbing component. The complexity in this process is that all web forms uniformed and are built as TABLEs, where each field is TR. Tabs have to show/hide some of table rows.
I don't know how TR's properties must be changed in order to hide them all. I tried make HTML code like <TR>...</TR> .... <DIV id=tab1> <TR>...</TR> .... </DIV> <TR>...</TR> ....
And tried to change visibility of a DIV, but this doesn't work. How can I change visibility of set of TRs?
Seems to work fine in Firefox/Mozilla and IE, IE doesn't work with style.display = 'table-row' but Mozilla/Firefox display the row wrong without so it detects and fixes that also. Code:
I try to group several rows in a table into a div and show/hide them by click on a button somewhere with a javascript link. When clicked, the link will toggle the style of the div section's style between BLOCK and NONE.
This technique works on normal text fine, but it doesn't work on part of the table, is there a solution that I can achieve the goal of turning on/off several rows all together?