Hiding And Displaying 2 HTML Tables In The Same Place With DHTML

Jul 23, 2005

I would like to be able to display either one or the other HTML table
in the same place. I.e., there are 2 buttons on the screen. When the
user clicks one button, the table A is displayed below. When the user
clicks the other button, the table A disappears and the table B appears
in the same place.

When I use the classic div tags followed by table code, they are
displayed sequentially on the page, rather than in the same place.

View 1 Replies


ADVERTISEMENT

Hiding Tables At Page Load

Jul 23, 2005

I'm trying to hide tables in the code below, but it is not working.
Could someone take a look at my code?

View 1 Replies View Related

Showing/hiding Tables W/ Javascript

Nov 4, 2006

I finally found code that actually works. I click on the button, and the table disappears. I click on the button again, and it reappears. Like magic! I have two problems still.

(1) When I click on the table, it disappears, but the space that it was in is still empty. When it retracts, I want the rest of the text to retract with it (not disappearing text--i.e. have the text occupy the space where the table was, and move back when the table reappears. note: the text is directly below the table); otherwise, what is the point of a show/hide button? It's meant to save some space.

(2) I want the text of the show/hide button to change to "Show" when the table is not present. Code:

View 5 Replies View Related

JQuery :: Sliding Panes Not Displaying DHTML?

Jul 26, 2009

I really like the following code example from Scott Robbin, allowing me to slide pages in and out of the screen, however I wanted to slide in some DHTML from here:[URl].. ...but, at best, only the images show. Well they don't, I've even tried hard linking to them. I know the links are valid because opening the page on its own they all show up, so there's an incompatibility somewhere.

[Code]..

View 1 Replies View Related

Displaying An Error Message, Then Hiding It Again

Jul 17, 2007

Ive got a form that is made of <feildsets>'s that when the user clicks submit it will validate the form before submitting it properly.

If an error is encountered it will display an error image and a user friendly error message. This code works fine However, theres a restet button, that when the user clicks it, it should wipe the form, and hide the error message. Code:

View 2 Replies View Related

JQuery :: Displaying And Hiding A Specific Row In The Table?

Jul 23, 2011

When you click the text "info" in the column "comments", a row should be displayed below with text information that is related to the "comments". Need also to click the text "Info" again to hide the text information of comments. Problem: I don't know how to display the row when you click one of the comments with the text "info". When clicking one of the link the remaining rows with the text "info" should not be affected. In order words, the part should be independent Need also some help hiding the text information of comments.

There are some things that you also need to take account to: - The amount of data that will be displayed in the table will be changed from day to day. The data is taken from a xml file.- Would like the sourcode to be written in jQuery.- Only html, css and javascript is allowed in this context.- html code in tr and td will be generated by javscript code.The class "firstDataRow" is the added in the tr row that has the text information of commentsPlease remember that the text hide and show is only for temporary.

// Fullmetalboy
<table border="1" SUMMARY="aaa" id="tblProject">
<thead>

[code]....

View 4 Replies View Related

JQuery :: Displaying/Hiding Multiple DIVs?

Jan 29, 2011

Getting myself back into jQuery and have an issue which I didn't previously fix, and was wondering if anyone would be able to assist me. I have multiple DIVs (up to 50 on one page) that I wish to individually be able to hide and close an extra DIV once pressing the 'Details' to show, and 'Hide' to hide the extra hidden DIV.

[Code]...

View 2 Replies View Related

JQuery :: Safari Displaying/hiding Content?

Sep 28, 2010

I have enabled a hover() event on a DIV that includes an H2 element that is always displayed and a child DIV that needs to be shown/hidden. This code works wonderfully on Firefox and IE. However, it's not working in Safari (I have not tested Opera or Chrome yet)Here's my (very simple) code:

jQuery("div.category-text").css("display","none");
jQuery("div.category-item").hover(
function() {

[code].....

View 1 Replies View Related

IE - Menu With A Div Displaying Onmouseover - Hiding Onmouseout

Jun 23, 2011

I have a menu with a div displaying onmouseover, and hiding onmouseout, it works great except in IE if I click on the <select> tag, it triggers the mouseout event, interestingly enough the same does not happen when I click on a text field..

Code Example:

This is obviously not the real code, it's just to give you an idea, I don't think I can post the real code, cuz it's really long and complicated...

I'm using the prototype framework, and I'd like to keep it that way if possible...

View 4 Replies View Related

Hiding And Displaying Forms Based On Selection

Dec 30, 2010

I am trying to display three different types of forms of the same page. One of the three will appear based on the selection. Right now my code has everything shown when you first reload the page and then when you select something it all disappears and nothing comes back. I am trying to use divs because the forms will perform the same action just with different parameters. It is a lot of code but the forms are the same thing just wrapped in a different div and I know they work. hopefully this will cut down on the amount of time you have to look at it.

Below is what I have so far:
Code:
<html>
<head>
<script type="text/javascript" language="javascript">
function choose()
{
document.getElementById('notes').style.display = 'none';
document.getElementById('tests').style.display = 'none';
document.getElementById('homework').style.display = 'none'; .....

View 2 Replies View Related

JQuery :: Displaying A Child Whilst Hiding A Parent?

May 11, 2010

I have a div (representing a form) with a number of images positioned absolutely within it. The images represent buttons and what I'd like to do is click on one of the images/buttons and the whole form to fade out with the exception of the selected button which merely changes it's opacity from 1 to 0.5 (to remind the user it was clicked). Here's the code I'm using:

$(this).parent().fadeOut("fast");
$(this).stop().css("opacity", 0.5).fadeIn("fast");

However, despite referencing the elements in a number of ways (they have unique id's), every time I run this, $(this) won't show - the opacity is being set but it seems to remain steadfastly invisible whilst the parent div is invisible/hidden - am I barking up completely the wrong tree here ?

View 10 Replies View Related

Retrieving Values From Html Tables?

Nov 24, 2009

I have populated data in html table. Now I have to retrieve the value from this table, row-wise. How can i do this.

View 1 Replies View Related

JQuery :: How To Add HTML To Current Place

Apr 4, 2011

I have the following code:
'<div class="Comment">' +
$.each(post.Comments, function (i, comment) {
document.write(comment.Description);
}) + '</div>'
);
The document.write() is not working, it erase all the content of my page in fact. What I want is just write the HTML contained in 'comment.Description' for each iteration (comment.Description contains a DIV with multiple elements in it!)

View 5 Replies View Related

HTML - Lock Images In Place?

Aug 3, 2011

I was wondering: You know how you're able to left-click and hold the mouse-button down on a image and then drag it around? Everybody must know that; Is there a way to "lock" the picture, so that isn't possible? I'm not talking about removing the right-click features, like saving the picture, etc. I just want the users not to be able to drag it all over the place - like a background for example. In HTML, of course

View 14 Replies View Related

JQuery :: Find Current Table ID In HTML / Where Have Multiple Tables

May 27, 2010

I have been using JQuery in the past 6 months and I really got in love with it!Finally,I've come to an issue that (probably) have better solution than the one Im trying to do with.I have multiple tables in a HTML [code]all of these tables are some kind of gridviews filled with data using JSon and JQuery.The problem is:Before filling with data, only this part in the DOM is created <table id="myTableId"> <tbody> !so, before going forward with filling the table with data and creating <tr>'s and <td>'s, I would like to find the current (not filled one) table ID.The algorithm would be:

1. <table id="mytableId"> is generated
2. right after #1, find table ID.
3. Depending of the table ID, generated data accordingly. (Continue with creating tr's and td's)

I have tried using closest('table'), also using find(), parent(), parents() and some other methods with which I've been working previously, but still no success.I can find the table by uing var tId = $(TABLE['id*='myTable']").attr('id');, but this finds all tables with 'myTable' and I want to find only the one that is created at that moment and waits for filling with data.

View 1 Replies View Related

Place Cursor In Last Row / First Column Of Html Table

Oct 24, 2009

I want to place cursor in the last row, first column of a html table using javascript. Here is what I have tried but is not working.

View 7 Replies View Related

Parse Dynamic XML Content Into Html Tables Nicely With 1 Second REFRESH Rate?

Apr 14, 2011

I have been playing with JavaScript few days now. I have a php script that returns data in XML. I want my Dashboard (html) page to show the response back from my php file. Since this is going to be a Dashboard hence it needs to refresh the content every second hence using JavaScript.

I want to get some guides, tutorials, or how-to for this. Any help would be much appreciated.

Here is what I get from my .php file if I do a POST method to it and define variable "extension=9999" to it code...

How can above be nicely presented in an HTML using JavaScript and how would this query be refreshed and re-POSTED every 1 second?

P.S. Amount of XML data coming back to me is dynamic. So, I don't know how much data I get back. Sometime nothing. Sometime 4 childs. Sometime 10 childs in the XML.

View 6 Replies View Related

Excel Like Navigation In HTML Tables - Override/intercept Combo Box Keyboard Inputs

Sep 28, 2010

An existing JSP is generating the HTML page and table. I have retro-fitted it so that it adds to each input field a 'trigger' to the onkeyup event.

The purpose of this trigger is check for the the cursor keys being pressed (UP, DOWN, LEFT, RIGHT) and then if it is a logically valid move, shift to the next cell in that direction.

Now, the function it calls, doOnKeyUp, for the most part is working fine... when the input field in the table cells are a textbox or textarea, my method can re-focus the fields appropriately.

HOWEVER, I am having a huge headache when the input field is a combo box. Basically, the value of the combo box is changed with the cursor keys (which is default combo box behaviour (I think)), instead of moving to the next editable cell in that chosen direction.

Problem #1: My question: Is there a way to intercept/override the various onKey events or similar for the combo boxes. For the combo boxes, I want to continue to move between table cells UNLESS a do something specific, like press the spacebar to entire an update/modification mode for the current cell. Everything I have done so far does not prevent the combo box events from triggering.

Problem #2: Also, I tried a nasty hack to try and get it to work, by trying to switch the combo box's value back 1 spot (if it appeared to be needed) by changing the <combo box>.selected value. However, that change never appears to be taking hold, so it is staying at whatever the original selected value was. For this one, I am just curious as to the correct way to have javascript change the selected value in a combo box and make it "stick" and make it applied to the view/UI?

Code example:

You can probably tell by the code that I had been trying various things to change the combo box's selection via javascript, but none has worked for me.

View 3 Replies View Related

Hiding HTML Content ?

Jun 15, 2006

I have a webpage where on the left side have a menu and on clicking the
different rows in the menu, different content needs to show up on the
right side. This all has to in a single web page. I suppose this can be
done using name anchors but would like to hide the rest of the content
and only show what is relevant depending on the row clicked.

View 2 Replies View Related

Hiding (X)HTML While Transforming It With JS

Mar 30, 2007

If I have some XHTML that I want to transform into something else through JS (say I have a list of links to images and I want to transform it into a fancy JS-based slide-show), and I do this by calling some JS code in window.onload (in an external .js file).

The page starts loading, then the list is displayed, then once the whole page has been loaded the JS is processed, and the list is then turned into the fancy JS slide-show. The problem is, it's not very nice to *first* see the list, and then see it disappear and be substituted by something else by the JS. What would be the best way to hide the list?

I don't want to hide it with CSS because it should be visible for non JS but CSS capable agents. I came up with:

<ul id='foo'>
<script>
document.getElementById('foo').style.display = "none";
</script>

... the rest of the list follows
But I hate that script block. Any ideas?

View 16 Replies View Related

Hiding HTML Elements Without Using Javascript

Jan 17, 2006

Here's my situation:

1. I have a web browser component that does not support Javascript
(well it does, but we've disabled it)
2. I have to display some HTML in it, where the user has a link titled
"Hide|Show Options" that can hide/show a particular section of the
HTML.

I have not found a way to achieve it without using Javascript or any
other scripting language.

Is it possible to do this using pure plain HTML?

View 3 Replies View Related

Place A Text At Fixed Place On A Picture With Script?

Jan 19, 2011

Isn't it possible to place a text at a fixed place on a picture with javascript ?

The text will be AJAX updated...

View 5 Replies View Related

Displaying A Table With Inner HTML

May 5, 2007

My program builds several tables using inner HTML. All the tables are displayed only when the program terminates. How can I make it display one table at a time and then wait for a click before displaying the next table?

View 9 Replies View Related

Displaying An Image In HTML

Jul 10, 2011

I'm having problems displaying images on a site. Basically I have a to change an image each time a button is pressed on a piece of hardware. This is the code to detect a button press

// Check Button
tstileo = new Image();
tstilec = new Image();
tstileo.src = '/images/1.jpg';
tstilec.src = '/images/2.jpg';
document.getElementById('btn0').innerHTML = (getXMLValue(xmlData, 'btn0') == 'up') ? document.Image=(tstileo): document.Image=(tstilec);

So when the button is pressed/unpressed it should display tstileo and tstilec What format should my HTML code be to display the image ? This is whats there at the moment

<span id="btn0">?</span></p>

When running all I get is text saying [OBJECT HTMLImageElement] This site is being hosted on a microchip, btn0 is a press button switch on the board. The idea is to use this as a remote monitoring system. It runs Javascript XML HTML and CSS. I have spent hours searching for a way to do this ( simple ? ) task but haven't got any further than this. :confused:

View 3 Replies View Related

HTML Not Displaying In New Window

Jul 14, 2010

I'm writing a webpage that uses JS to copy the tag elements STYLE and a table into a new window that is not displaying content from using .cloneNode(). I've used alerts to verify that the command is getting all the HTML but in the new window, the table is not being displayed but the last bit is. Since I'm using only one strings to handle the entire HTML of the new page, I'm missing why only part of the string is sent to the new window. It's a real pain to debug since because the new window is generated entirely with JS, there is no source for me to see exactly what is happening.

Here's the code for what I'm talking about:
PHP Code:
printPIM = function() {
w = window.open("about:blank", "printWP", "scrollbars=no,directories=no,resize=no,width=1020,height=700,toolbar=no,menubar=yes,copyhistory=no");
w.focus(); // Makes sure the new page isn't hidden
style = pimStyle.cloneNode(true);
p = pimTable.cloneNode(true);
wt = "<html><head><title>" + PIMName + '</title><style type="text/css" media="print, screen">' + style.innerHTML + '</style></head><body>';
wt += "<table id='pimTable'>" + p.innerHTML + "</table>"; // Adds the PIM table
wt += '<div style="text-align: center;"><h1>Total Distance: ' + parseFloat(TotalDistance).toFixed(precision) + 'nm</h1></div>';
wt += '</body></html>';
wt.replace("<tbody></tbody>",""); // Remove extra tbody element
w.document.writeln(wt);
return false;
}
The only thing displayed is the contents of the DIV element.

View 5 Replies View Related

Displaying Text From One Html Form To Another?

Jul 13, 2011

how to display the texts form my main html form to another html form?....since i didnt know how to hide the textboxes and select list for printing the html form... my plan is that

im gonna pass all the displayed data from my main html form to another html form which has a print button there.. so that when i print only the text (the html elements like buttons and txtbox will "not" be included)..

a clearer explanation ( i have a textbox on my main html form then i displayed it on the other page)

[this is a textbox]-----------------> this is a textbox <---im gonna print this w/o the box

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved