Change The Visibility??
Dec 5, 2001Im trying to change the visibility of a div from hidden to visible "onMouseOver" .. Code:
View 7 RepliesIm trying to change the visibility of a div from hidden to visible "onMouseOver" .. Code:
View 7 RepliesI have two text inputs. The second input is "visibility hidden".
I need to have it visible when the first input value is changed to something that is > 1.
I'm back from a web dev hiatus. I'm writing a new site but have found myself a bit rusty. I'm trying to change the visibility of an element with no luck. nothing happens. I'll supply the code. Don't lick the kitten.
View 9 Replies View RelatedI m using the below code...it is working fine...
Just i want change the visibility of that div....here by default div is visible...but i want default div should be hidden.....look into the below code..
I have a script that when you click a link it changes a layer visibility. IE: one layer becomes visible while another hidden.
It works great in NS and IE but when I try it in mozilla(firebird) it won't work. Any have a code I could use or know of a resource where I can get one.
How to change the visibility of a html control using jquery
View 2 Replies View RelatedI know this will have been covered but search isn't working for me at the moment. Easy one for people who know JS anyway, I'm sure: I have a SELECT box that precedes a text input, however, when a particular option is selected (the value of which is "BETWEEN") I need a hidden SPAN to become visible. It is hidden as default with "visibility:hidden;" so I need to just change it to "visibility:visible;" if memory serves. Anyway, likewise, if it is already visible, I need it to be both hidden and have the input in that span have an empty value. Any tips? I need to apply this to many rows in a table, so a function that I can call with the span and input IDs would be best I reckon.
View 9 Replies View RelatedI am using CSS text-shadow but of course IE doesn't like it. I've looked into some methods for achieving the same effect in IE, but it's not at all the same so I've opted for another method..I'm going to have two layers. In layer1, it will be standard text, shadowed with CSS. I then screenshotted that and will use the resulting jpeg for layer2.I was then planning to find a script that:1. Detects if browser is IE2. If IE, layer2 is visible, layer1 is invisible3. If not IE, layer1 is visible, layer2 is invisibleThe problem is that I can't find a simple script to detect if the browser's IE or not. I can find loads of scripts that check what version of IE someone's using. The version isn't important!
View 5 Replies View RelatedI was wondering if there is anyway to capture an event for when the scroll bar would appear while rendering a page with dymanic results driven questions. Such that answer to q1 would lead to another question, need to know what would be the last question before the scroll bar would appear.
View 1 Replies View RelatedI am trying to set up a page where there are a couple of checkboxes, and
based on the selected checkbox, certain input fields are required. For the
required fields, I want to display a red asterick as an image (
required.jpg ) next to the field iteslf. Thus, I am trying to write a
JavaScript function that will get called via the "onchange" action for each
checkbox.... this function willl either set the visibility to "visible" or
"hidden" for the red asterick ( required.jpg ) next to each input ( name,
address, email, etc... ). I am able to get this working in Netscape (
7.02 ), however I can't seem to get it to work for Internet Explorer (
6.02 ).
Here is a trimmed down, working ( at least in Netscape ) sample of what I am
trying to do. Any idea on what I need to do differently to get this to work
in IE? Code:
I would like to change the visibility of the contents of a DIV by clicking a button or link. If possible, I'd like the button to toggle the visibility on/off. If not, I'll just have two buttons, one to make it visible, the other to hide it.
Also, I'd like the page content under the DIV to move up/down as the DIV is hidden/visible (as if the text inside the DIV did not exist when the it was hidden).
The code I tried before posting was this:
function visibility(id){
document.getElementById(id).style.visibility=hidden;
}
I couldn't find any documentation on the Visibility property, so I didn't know how to use it correctly. Also if there is a better way to achieve the effect I want than using style.visibility, please post it.
I want to add a caption to certain images on a website I'm building when the user moves their mouse over it, along the lines of "Click to Enlarge". The HTML code I've got is as follows:
<div class="overlay">
<a href="#"><img src="image/example-4.jpg" alt="Example Image" /></a>
<div><p>Click to enlarge image</p></div>
</div>
The DIV with the caption is set in the CSS to display:none; and I have the following JavaScript code which is supposed to change this property to block on hover:
window.onload = function(){
var overlay = document.getElementsByTagName('div');
for(var i=0; i<overlay.length; i++){
if(overlay[i].className == 'overlay') {
overlay[i].onmouseover = function() { this.getElementsByTagName('div').style.display = 'block' }
} } }
But this gives this error:
Error: this.getElementsByTagName("div").style has no properties
Any idea what I've done wrong?
I have a web page that has javascript running an html5 page where as the embedded movie plays, the captions play below the movie. What I'd like to do is to have a button that turns the captions' visibility on and off, but I can't seem to get it to work. Probably easier to just show you the web page so you can see the files and view source: [URL] Click the test.html file and hit the play button for the movies to see the captions. I think it might have something to do with the captions being within the media div, but I'm not sure how to address the caption id other than the way I have.
View 3 Replies View RelatedI'm trying to figure out which elements of a document are visible as the user scrolls the Firefox browser. I haven't written the code yet but I think I should be able to do it by keeping track of the current display using the following properties:
window.content.scrollX, window.content.scrollY,
window.content.innerWidth, window.content.innerHeight. -- with these 4
I can determine which part of the document is visible.
Then for each element I can figure out its display position using, offsetWidth, offsetHeight, offsetTop, offsetLeft. This would entail traversing the DOM and perculating the offset values down to all the children.
While this would likely work, it seems inefficient. Do you know of any other ways to determine which elements are actually on the screen?
This is my code:
Now i want the second layer to appear when i hover over the first, which it does. however i want it so that when i move my cursor away from the second layer it dissapears but the problem is it doesn't seem to work.
I am creating a website as part of a university project. as part of this i am trying to make a menu in the top right. after looking around i have found javascript top be the best way to do this. how would i go about making it so that when i click on one div (called map) a separate div (called mapMenu) visibility is toggled.
View 3 Replies View RelatedI've got a script that toggles the visibility of a div on "dashboard.html":
$(document).ready(function(){
$("#add_networks_wrapper, .remove_box").hide();
$(".toggle_add_networks").show();
$('.toggle_add_networks').click(function(){
$("#add_networks_wrapper, .remove_box").slideToggle();
});
});
On "dashboard.html" it works great. The div "add_networks_wrapper" is hidden until I click the link that toggles it. What I need is a link from a different html page (say "account.html" or whatever) to open "dashboard.html" with the hidden div's visible.
I am trying to loop through the ID's from the DIV's to toggle visibility on and off. The first time through my loop the visibility property returns null. Is there a known issue with Javascript and the visibility property?
The code is like this:
for(i = 1; i <= 3; i++)
{
if (document.getElementById('t' + i).style.visibility == 'visible')
{
document.getElementById('t' + i).style.visibility = 'hidden'
}
<STYLE TYPE="text/css">
<!--
#t1
{
position: absolute;left: 100px; top: 80px; height: 400px; width: 100px; z-index:1; visibility:visible; }
#t2
{
position: absolute;left: 100px; top: 80px; height: 400px; width: 100px; z-index:2; visibility:hidden; }
#t3
{
position: absolute;left: 100px; top: 80px; height: 400px; width: 100px; z-index:3; visibility:hidden; }
-->
</STYLE>
</head>
<body>
<form>
<div id="t1">Testimonial 1</div>
<div id="t2">Testimonial 2</div>
<div id="t3">Testimonial 3</div>
I've got a script that toggles the visibility of a div on "dashboard.html":
On "dashboard.html" it works great. The div "add_networks_wrapper" is hidden until I click the link that toggles it.
What I need is a link from a different html page (say "account.html" or whatever) to open "dashboard.html" with the hidden div's visible.
I'd like to be able to toggle the existence of a DIV using the onclick attribute.
HTML Code:
<input type="radio" value="1" checked="checked"
onclick="document.getElementById('div').style.visibility='hidden';"> 1
[code]....
I am trying to achieve an effect similar to this: Our Recent Work | StudeoYou'll notice that if you click on any of the 'filters', the items below are sorted shown/hidden accordingly.
View 4 Replies View RelatedI've got a script that toggles the visibility of a div on "dashboard.html":
Code:
On "dashboard.html" it works great. The div "add_networks_wrapper" is hidden until I click the link that toggles it.
What I need is a link from a different html page (say "account.html" or whatever) to open "dashboard.html" with the hidden div's visible.
Was wondering how to accomplish this.I have several table rows that I would like to hide all with the push of a button.For instance:
Code:
<tr id="objects_row1"><table class="apples">
<tr id="apples_row1"><td>asdf</td></tr>
[code].....
Opera seems to have different ideas about the visibility of Javascript
functions than other browsers. For example, if I have this code:
if (1==2) {
function invisible() {
alert("invisible() called");
}
}
then most browsers will consider invisible() to be undefined. But in
Opera you can call it! You can try this online here: Code:
I have a strange problem using Internet Explorer.
My page has a table included in a <DIV>
I have a checkbox that shows the div when checked
and hides it when unchecked.
var division = document.getElementById("passport") ;
Then I use
division.style.visibility = "visible" ;
or
division.style.visibility = "hidden" ;
Everything works perfectly under FireFox or Safari showing or
hidding the table.
BUT, in IExplorer 6 or 7, just checking the checkbox doesn't
change anything. You have to first click on the actual division
position to make it appear. Same for unchecking: click on the
displayed table and it will disappear. Code:
jquery i have a problem like
$(document).ready(function(){
$("dd:not(:first)").hide();
$("dt a").click(function(){
[code]...
my code always call when i click "dt a" but i dont want like this. i want like that if i click element visible don't do anything. my code call when i click element "dt a" unvisible.