I have about ten tables that I want to show/hide depending on various Radio button clicks. When the page first opens, all tables are hidden. When you click the first radio after opening it shows the correct table, however if you click on the second radio choice and then click the first choice nothing happens. If the user selects the wrong choice when they first enter the page, I want them to be able to select the correct choice without having to close and re-open. What I find odd, is if I click back and forth between the other radio buttons everything works correctly. It only fails on the first radio button. I have multiple pages with the same format of code and this happens on every page.
Code:
function CustPage(option){
document.getElementById('custtype').value = option.value;
if(document.getElementById('custtype').value == "Cust Add Sell"){
I have a javascript/html/css issue that I'm trying to solve for about 3 days now, with no luck. I'm using javascript to toggle the visibility of a certain table. I set the table's display property to none (via js) in order to hide it and to block in order to show it. However, applying block in the display property of a table seems to be having trouble with firefox.
See below what display:block does to a table in firefox: This simple html code:
<table style="display:block" border="1" width="100%"> <tr><td width="100%">test</td></tr></table> produces this result in firefox:
Notice how the td has the size of the content and does not stretch to the size of the table (although it has a width="100%")? In IE it works fine btw.
If I change my js code to apply "table" to the display property of the table in order to show it, it doesn't show up at all in IE!
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?)
<div id ="messageDiv" style="display:block;">No profile information entered yet</div> <script type="text/javascript"> function profileInfo() { var m1 = document.getElementById("marital1").innerHTML.toLowerCase(); var b1 = document.getElementById("bodytype1").innerHTML.toLowerCase(); [Code]...
The first part up to before the 'else if' works. but if the 'w1' has [URL] it still doesnt return true and display the DIV block??
I am new to JQuery. I am using Block UI in my application.In submit button onclick event, i am performing client side validations ( required fied validators )in asp.net.On clicking submit button,whole page is blocked and at the same time validation message is also displayed and page remains blocked. While performing client side validations i don't want to block the page.
I am making a form that has 4 inputs per item (item #, price, quantity, extended price). I am formatting the form in a table and I want to be able to add another row of inputs when the user clicks the button. it is working in ie but not ff. I realize that i need to change the inputs to innerHTML but nothing is appearing in ff even when i try to append the <p>
function addRow() { var row = document.createElement('p'); row.appendChild(document.createTextNode("hi"));
I have a script that allows me to highlight a row of text.
This text is in a table.
The table is long and scrolls down the page below the visiable canvas.
What I need is a method to jump to the highlighted row.
I am able to jump to my anchor as long as the anchor isn't located within the table (ie I can jump to the bottom of the table if I put the anchor just below the table). However as soon as I place it within the table...no luck.
Here is the code I am using to jump; eval ("document.location='#row" + n + "'");
Can someone explain how I can reference the table in my jump method?
I'm trying to create a dynamic table with onclick event like this but onclick event seems to do nothing:
var srcTable = this.iContext.getElementById("tbody"); var tmpRow = null; var tmpCell = null;[code]...
I found a few examples like this: tmpRow.onclick = function() { alert(this.rowIndex);};
but I need use selected data, maybe call a defined function. I already tried lines bellow but nothing works, because doSomething is not function of tmpRow object.
tmpRow.onclick = function() { doSomething(this);}; or tmpRow.onclick = doSomething(this); or
is there any way i can produce an effect in which only a certain number of table rows are displayed and rest are 'collapsed;. I tried using the expander plugin but unable to make it work . can it work on table data? after five tables i have marked the tr element with the class 'expand_hide' and then used the following code:
The code works great to hide the columns. The only issue is when you un-hide them again, it does come up correctly. I want the headings to all be on the top row and then the actual data be on the next row. If you do all of them, it stacks all the headings on top of each other and then puts the data rows in order with 8 rows etc. Code is below.
Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">[code].....
I have a <Html> Table with so Many <li> elements. SO when I export the html table to excel the cells are incrementing when ever it encounters <li> I want them to increment only when they encounter <th><td> Here is my jquery
Does anyone know why this isn't working? The toggle function works perfectly fine with PHP loops, but when I insert the table td tr tags, it does not hide the loop when the page first loads...It just shows the results in the div which it shouldn't be doing.
Here's what my code looks like...
JS
Code: <script type="text/javascript"> function toggle(element) { if (document.getElementById(element).style.display == "none") {
I need to block a URL from printing at the bottom of the page from a website. Is there any code that can do that? I know I can make it into a PDF on the fly and that will elminate alot of hassle, but is there any easier way?
Is there a more concise way to do something like the the desired code below?
The gripe is with the try-catch syntax. It takes *way* too many lines of code to evaluate a conditional expression when zero or more parts of the conditional expression may trigger an error. In this case, the trigger is a call to a non-defined (null) object.
In other words, how can you do a more simple 'try' statement that simply spits out true or false, depending on whether the 'tried' code threw an error or not?
Defining a function don't seem to work because you can't pass the 'try' code as an argument. Extending the 'Global' constructor is not an option, so now what? Code:
is there a way using .htaccess or some other means that we can block certain websites from appearing when we do a google search of my wife's name? We contacted google and they denied our request to have these websites blocked. My wife has her own website she uses for her business. There was an .htaccess editor website that I visited that created the code after I specified the url of the websites we wanted blocked. Will this work and if so, after creating the .htaccess file what do I do with it, that is where do I attach it/post it? (this is the first time i've ever posted anything on a website. my wife and I are technophobes.)
I got a problem with the code below. When I run through all cookies, only the first one's gets tested by that if-block. The others seem to just pass it, no matter if they'd pass that if test or not. It always reaches the "AFTER IF-BLOCK" part. Anybody know why every iteration except the first skips the if-block, no matter what?
Code JavaScript: var cookies = document.cookie.split(";"); var cookies_tmp = []; for (var i=0;i < (cookies.length-1);i++) {[code]].........
How can you block some or all links on a website?For example, when a visitor lands on the homepage and see a link to another page on the homepage.. How can you block the link to another page and make a popup appear with links and text...?To elaborate my question, here is an example:visitor come on a homepage of a website..he sees a link to a wonderful article.. when he clicks it, the link is blocked and a popup appears asking him to checkout a free offer and once you enter your email address, the link will become accessible
I have a windows media file that I want to play on a webpage but the stupid activex content blocker keeps on poping up. I have heard that there is a way of getting around this or to preload the content. Does anyone know how to do this?
i have a javascript file on my server and i am looking for a script i can use to make it so that a user can not just type the address of the javascript file in the address bar and see it.
is it possible to make it so the file can't be viewed alone. i know that can be done with css.