Curious Behavior While Manipulating Z-index And Visibility Of A Layer
Nov 21, 2005
I want to have a single window with 6 or so links at the top that display fixed pages for the first 4 and the final two "Brow" and "se-H" or "se-S". When you double click "Brow" a script prompt asks to enter where they want to go. The script then adds http:// to the front of it and places it as the src for an iframe in a <div></div> layer that has its visibility as hidden. "se-H"/"se-S" Hide and show the layer wich has a zindex higher than that of all other layers on the screen. The other links that just have the code strung out in the onClick action are working just fine as does the Brow link the only resultant error is the "se-H"/"se-S" links they change back and forth indicating the script is running and the outerHTML code is ok but the zindex just isn't changing nor the visibility. I am asking for any suggestions and if I have not included all necessary code please tell me as I only took the pieces I thought may be causing the trouble:
<SCRIPT>
function show()
/*show*/{
fun2.style.visibility='visible'
/*show*/}
function hide()
/*hide*/{
fun2.style.visibility='hidden'
/*hide*/}
var go_to=""
function disp_pop()
/*disp_pop */{
go_to = prompt("Where do you want to go? ","")
/*disp_pop */}
function get_there()
/*get_there */{
if(go_to !="" && go_to!=null)
fun2.outerHTML='<div id=fun2 style="position:absolute; top:55; left:10; z-index:15; overflow:scroll;"><iframe src="http://'+go_to+'" width=475 height=395></iframe></div>'
else
fun2.outerHTML='<div id=fun2 style="position:absolute; top:55; left:10; z-index:15; overflow:scroll;"><iframe src="http://google.com" width=475 height=395></iframe></div>'
fun2.style.visibility='visible'
/*Everyone else back*/
guide.style.zIndex=2;
autoguide.style.zIndex=0;
webmail.style.zIndex=1;
/*Everyone else back*/
/*get there */}
var swap_1 ='<a id=myH4 onclick="this.outerHTML=swap_2;hide();">wse-H</a>'
var swap_2 ='<a id=myH4 onclick="this.outerHTML=swap_1;show();">wse-S</a>'
</script>
The links I am using in the page are as follows
<a href="#" onclick="guide.style.zIndex=2; autoguide.style.zIndex=2; webmail.style.zIndex=3;">Mail</a>
<a href="#" onclick="guide.style.zIndex=1; autoguide.style.zIndex=3; webmail.style.zIndex=2;">TxGuide</A>
<a href="#" onclick="guide.style.zIndex=3; autoguide.style.zIndex=1; webmail.style.zIndex=2;">Guidelines</A>
<A HREF="#" onmouseover="reappear()" onmouseout="disappear()">AuxDetail</A>
<A HREF="#" ondblclick="tada()" onclick="hideit()">Fun</A>
<a onClick='toggleAddress("")'>Refresh</a>
<a id=myH3 ondblclick="disp_pop()" onclick="get_there()">Bro</a>
<a id=myH4 onclick="this.outerHTML=swap_1;show();">wse-S</a>
View 6 Replies
ADVERTISEMENT
May 1, 2010
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.
View 4 Replies
View Related
Jan 25, 2004
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.
View 4 Replies
View Related
Aug 11, 2003
if I'm using IE only I can get around just fine, but I haven't really had a lot of experience sniffing out other browsers and trying to create different code branches to create the same effect on a particular browser.
In this case I've got a series of layers that correspond to some links. When someone mouses over the link, the layer becomes visible. When someone mouses out, I want the layer to fade out. Code:
View 5 Replies
View Related
Aug 22, 2011
I 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 Related
Feb 5, 2009
I am putting together a simple edit in place script. For some reason, in order for for the editEffect function I've created to work I need to use the alert function as seen in the code below. I can't figure out the cause of the problem and I believe the root cause is also creating other problems - i.e. in the cancelEdit function the argument "targetElement" is not alerted, but it is successfully submitted as an argument to another function.
/* Edit in place javascript code */
function editLightOn(element){
element.style.backgroundColor = "#ffc";
}
function editLightOff(element){
element.style.backgroundColor = "#FFFFFF";
}
[Code]..
View 4 Replies
View Related
Apr 4, 2002
Layer writing in Netscape. This is pretty straightforward >> However I'm trying to write to a <div> layer within a <div> layer.
My div:
Code:
<div id="blah">
<div id="aight">
</div>
</div>
I'm trying to write to "aight"
How should my code look?
View 3 Replies
View Related
Jan 30, 2009
I have created a floating layer using Javascript that remains always on top of page on scrolling.Issue is,at some point while scrolling,the layer flickers continuously.
The html page is as follows:
Many common software systems, JavaScript has a history of security problems. Many of these problems could allow a person with malevolent intent to steal sensitive information from a visitor. The number and type of such holes in security vary among browsers and operating system versions. Most JavaScript security holes have been caught and fixed, but new ones are being discovered all the time. For a list of current security holes check out your browser's and operating system's Web pages. As a Web site author, it is your responsibility to keep up-to-date on the current status of known security holes in the applications you create.
Signing Scripts. In Chapter 11, I explained that JavaScript does not provide the ability to directly access files on the client computer. This can be a very large hurdle to overcome if you're trying to upload a file to a server from the client computer. Fortunately, file uploading is one of many functional enhancements that signed scripts provide. Signed scripts are specially packaged scripts that have been verified and signed to be correct and non-threatening. These scripts have additional rights on the client computer that allow a programmer to do many things that he wouldn't otherwise be able to.
With the introduction of Netscape 4.0, a new security model was put in place that would allow digitally signed scripts to bypass some of the restrictions that had previously been placed on them. A signed script can request expanded privileges from the visitor and, with the visitor's permission, gain access to restricted data. A signed script requests these additional permissions through LiveConnect, which allows your JavaScript code to communicate with the Java Capabilities API. The security model allows JavaScript to access certain classes in Java in order to extend its functionality while still maintaining tight security for the client.
A digital signature is a fingerprint of the original programmer, and it allows the security model of the browser to detect where (or from whom) it originated. A script signer can be a person or an organization. By signing a script, you acknowledge yourself as the author and accept responsibility for the program's actions. A signed script contains a cryptographic checksum, which is just a special value that ensures the signed script has not been changed. When a digital signature is detected, you are assured that the code has not been tampered with since the programmer signed it.
Once you finish writing a script, you can use the Netscape Signing Tool to digitally sign it. Signing a script does the following:
Unambiguously assigns ownership of the script to a person or organization.
Allows an HTML page to use multiple signed scripts.
Places the signed script into a Java Archive (JAR) file.
Places the source of the script in the JAR file.
Once a user confirms the origin of the script and is assured that it has not been tampered with since its signing, he or she can then decide whether to grant the privileges requested by the script based on the validated identity of the certificate owner and validated integrity of the script.
JAVASCRIPT FILE IS AS FOLLOWS:
AND CSS FILE IS AS FOLLOWS:
At some point while scrolling,the div 'movable' flickers continuously,while at some other point,it is perfectly stable.
View 11 Replies
View Related
Jan 26, 2009
I have the below array called "results". When I loop through all document elements I would like to check "field_name" against the "results" array and see if it exists and what index number it is at??
// Split the comma delimited response into an array
results = result.split("~");
//Loop through array and populate fields[code].....
View 9 Replies
View Related
Aug 25, 2010
I am trying to get the index of a li with a specific class. I know I'm selecting the right object because I can apply a CSS class to it (eg change border colour) but when I try to get the index it returns -1. But I know the object exists as I can alter it. :-s
jQuery(document).ready(function() {
var active = $("#tertiarynavigation .bordered").get(0);
var num = $("#tertiarynavigation li").index(active);
alert("Index: " + num);
[Code]......
View 1 Replies
View Related
Nov 3, 2011
I have a problem with layers. In my example there's a link inside div#msg with 'z-index:1' and a overlay with 'z-index:2'. Now when "mousedown" fires, will change the div#msg z-index value from 1 to 3 to be on Top, so the link become a clickable link.
The question is, it is possible to make the link on top and open it with just one click?
This example can do that but won't open the link!
HTML Code:
View 5 Replies
View Related
Jan 1, 2005
I created a script which loads my xml file and it also saves my xml file to a persons HD using an ActiveX plugin.
Now what I would like to do is have my script take the loaded XML file and add/remove childelements and then save it. But I want this to be done in memory that way the user doesnt have to see it. Code:
View 6 Replies
View Related
Oct 5, 2009
i want to display a downlod counter shown in another webpage in a 3rd paty site.now first i grab the page source using the below code.thats was success full.
Code:
<?php
$ch = curl_init();
[code]....
View 1 Replies
View Related
Oct 4, 2005
I'm trying to modify a form so that when a user clicks a checkbox for a
shorter version of the form, it will replace swap the default (long)
form elements with the short version of elements, so that only the
version that is selected will have its element values passed on to the
next page. Code:
View 2 Replies
View Related
Dec 18, 2005
I'm working on setting up a "Send this link to a Friend" page. The
page has a couple of inputs and a textarea. I have some default text
in the textarea that is populated at the time of page load. What I
would like to do is replace the "Dear Friend" in the textarea with the
name of the friend once it is entered in the input. Code:
View 4 Replies
View Related
Dec 6, 2006
UI Event library it is possible to poll the DOM as the
page loads for the appearance of a particular element. When that
element is found a callback function executes. In Flanagan's book he
warns that some JavaScript experts say this is bad practice because it
is not standardized. I've tried the YUI technique only a little and
like the idea for some pages to make certain parts interactive before
all pictures etc have been loaded. Does anyone here have info about
when this technique fails?
View 1 Replies
View Related
Jul 20, 2005
Supose I have 2 lists on a form, L! and L2. L1 is populated with data L2 is empty.
I want to select some options from L1 and transfer to L2. How can I do that? Is there a function from List object that helps to add dynamically....
View 1 Replies
View Related
Feb 21, 2011
I've been looking for information on how to insert content from one HTML page into another HTML page. Is it possible to do this with just HTML and JQuery? My idea was to use one index page and call in content from other pages to be inserted in the content section of the index page. The biggest issue I'm having right now is figuring out how to grab the content from the outside html page. I tried looking at ajax examples of importing content and just putting .html file instead, but it didn't work.
View 8 Replies
View Related
Sep 15, 2009
I have multiple <tr> tags following the below pattern:
<tr>
<td class=c1Top>
<table>
<tbody>
[code]....
I need to update the href attribute so it appends the html value to the href attribute e.g.
href="http://mysite/Page1.html"
href="http://mysite/Page2.html"
href="http://mysite/Page3.html"
I tried the following, but no luck. It updates the html value of all anchor tags with the value contained in the 1st tr $('td.c1Top table tbody tr td.ms-vb a').attr('href', $('td.c1Link table tbody tr td.ms-vb a').html());
View 1 Replies
View Related
Sep 11, 2002
I'm designing a web site and I designed an error page with .htaccess so that when someone types in an incorrect URL, it takes them to my customized page. Well, I used server-side programming to make it log the bad URL and check against a database if the there is a good URL matching the bad one. If so, it redirects to that page instead of giving the error. It's a good, well-written script done by me, I'll give it to anyone that requests it.
What I want to know is if JavaScript can prevent a page from being logged in the visitor's browser history.
You see, when they click the back button, the revisit the error page and it relogs the bad URL.
Is this possible in Javascript? Code:
View 4 Replies
View Related
Aug 8, 2000
I'm attempting to make a div hidden upon an image click, and it's not working.
Here's the code:
<script language="JavaScript" type="text/javascript">
function ToggleDisplay(id)
{
// alert(id);
var elem = document.getElementById(id);
if (elem)
{
if (elem.style.display != 'block')
{
elem.style.display = 'block'
elem.style.visibility = 'visible'
}
else
{
elem.style.display = 'none'
elem.style.visibility = 'hidden'
}
}
}
</script>
<style type="text/css">
.header { font-size: larger; font-weight: bold; cursor: hand; cursor:pointer;
background-color:#cccccc; font-family: Verdana; }
.details { display:none; visibility:hidden; background-color:#eeeeee;
font-family: Verdana; }
</style>
Here's the div:
<div id='div<%# DataBinder.Eval(Container.DataItem,"City").ToString() %>' class="details">
Any ideas on why this isn't working? I've tested in the JS code to make sure it was getting the right ID so that part is set.
View 7 Replies
View Related
Jul 9, 2009
I'm new to JQuery and would usually do more research before posting, but I have a demanding client that wants results, I have a dynamic CSS/JQuery menu that is part of a WordPress theme, and I would like to be able to set the menu to automatically size itself to the longest menu item or sub-menu item. The menu in question is at: [URL].. under Solutions.
[Code]...
Lets say for simplicity's sake that I will make the first menu option the longest, and the rest of the menu width will be based on that width. How would I do that? Would this even work on the fly? I already have an easy CSS solution but it involves changing the width property every time the longest item changes.
View 1 Replies
View Related
May 24, 2009
manipulate content between elements. I've found a script where I can find the content between elements, but now I've got the weirdest thing ever: i can't find a way to manipulate it. I know its very simple but I tried everything and nothing works!
What i want is to wrap a <div> around it.
Current script:
var headings = $('h3');
for(var i=0; i < headings.length; i++) {
var node = headings[i];
var group = [node];
[Code]....
So, instead of an alert() i want to wrap it with a div. However, I'll get an js error if i do that.
My link is: [URL]
View 3 Replies
View Related
Jun 27, 2010
I'm using the divSlideShow plug-in on my site; however, I want to be able to call a given "slide" within the slideshow via a button located outside the slideshow container. So instead of manipulating the slideshow via the automatically set left and right arrows, or numbers, I want to use my own buttons.
View 1 Replies
View Related
Nov 22, 2011
I need to get a some blocks of html that are contained in elements in a JSON object, remove some images and then add the updated blocks into cells in new table rows
in the JSON Object each html block is called 'htmlblock' within the html string, each img element that has to go has a class of 'imgThumb'
So far I'm here:
I get the data with $.getJSON - OK I work through the JSON object with $.each - OK I convert the text string of html to a DOM object with $.eventData=$(this.htmlblock) - OK I get rid of the images with $.eventData.remove('.imgThumb') - OK
After that I start running into problems
I have a bunch of elements from the JSON object that I have to add to the table as well - so the simplified version looks something like (#delTableBody is the tbody element that I'm adding to):
$.getJSON(eventURL, function(event){
$.each(event, function(){
$.eventData = $(this.htmlblock);
$.eventData.remove('.imgThumb');
[Code]....
View 2 Replies
View Related
Apr 20, 2010
I know I need to appendChild node somewhere but i can not figure out where to. So far i have appendChild at the table head which works to an extent. How can I make it so the new row is added above the table header but in it's own formatted little cell. Also how would you insert the row below the header but at the top of the other rows?
I have managed to move the inserted row to the top above the header but it doesn't look terribly good.
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">
<head>
[Code].....
To allow for backward compatibility with the older Simple Table Model, if no TBODY structures exist in a table, the entire set of row groupings [TR] are assumed to be a single TBODY.
</body>
</html>
View 2 Replies
View Related