Scrolling The Content Of An Overflowing Layer

May 21, 2002

I have this script running:

<html><head>
<script language="JavaScript" type="text/JavaScript">
var i=0;
function showcontent(){
    document.all.myLayer.innerHTML+='Line '+i+'<br>'
    i++;
    setTimeout("showcontent()",200);
}
</script>
</head>
<body >
<div id="myLayer" style="position:absolute; left:20px; top:20px; width:300px; height:150px; z-index:1; overflow: auto;"></div>
</body></html>

As the function loops a new line is added to the contents of the layer. When the content is more than the height of the layer the scroll bars appear. This is fine, but what i want to be able to do is get the function to automatically scroll to the bottom of the content so the last line is always visible. Any ideas how i could do this?

View 2 Replies


ADVERTISEMENT

Floating Layer - While Scrolling - The Layer Flickers Continuously

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

Scrolling Layer...

Apr 2, 2005

I want a scrolling JS layer (not CSS) am trying to fit it into an already existing site design which the client doesn't want to change. It works fine when i try it on a new page but the moment I put it into my actual page where it has to fit into a particular are (I used the overflow: hidden it doesn't behave!!

View 13 Replies View Related

Scrolling Text Within A Layer

Nov 29, 2005

I want to have some text inside a layer scroll up or down when the mouse moves over a certain image.

I tried this:

View 1 Replies View Related

JQuery :: Scrolling Browser Window - Two Demos Of Scrolling Page Content

Feb 17, 2011

jQuery - Scrolling browser Window. I have two demos of scrolling page content with jQuery.

This one - [url] is scrolling the contents inside a container and it works as I wanted on Mac/PC

Code:

I need the same effect as above but I need to scroll the whole browser window.

I have a demo here - [url]

Code:

Problem here is on the Mac the transition are jumpy and it seems to flash the first yellow div before sliding up or down. Testing on a PC it will slide down but won't slide up. How can I get the whole browser window to slide up and down with a smooth transition.

View 1 Replies View Related

Changing The Content Of A Layer

Jul 23, 2005

I've got a web page which uses lots of divs to position the content of the
page and I'm using a nice javascript to alter the css of a table of links.
The thing is I don't want the table of links to point to an external site
but to calla function which will replace the content of a layer... perhaps
it's be better if I showed you the code:

View 2 Replies View Related

Re-Write A Layer's Content With Javascript

Mar 26, 2003

This forum thread discusses the SitePoint article 'Re-Write a Layer's Content with Javascript' by Peter Todorov.

"How can you can replace the content of a Web page without additional requests to the server? The answer uses layers in JavaScript - Peter explains all."

View 17 Replies View Related

Netscape Layer Writing (layer Within Layer)??

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

Editable DIV Shown As Page View - Overflowing Text Should Be Flow To Another Div

Jun 15, 2011

I've a div that is editable (contentEditable = true). The div has a fixed size like a letter page. When the user has written so much text that the text overflows I want add a new div above and let flow the overflown text in the other div. (it's the some behavior like MS Word in page view, but now it is in the web)

It is possible to do something like this in the web?

One way to implement this is to check if the text of the div overflows (I've found java script examples in the web which do that). And than I need the text that overflows to move it to the next div. But I have not found a function that do this. Is there such a function?

Another way is to insert a gap at that position a new page begins and use an background image that looks like a page border. With this solution, the whole text is in one div but it looks like floating to another page. But therefore, I have to add a gap between to lines at a specific position (the page border/margin and the gab between the pages). Does anyone have an idea how to realize this?

View 4 Replies View Related

Scrolling DIV Code For Rendering Dynamic HTML Content

Jan 7, 2010

This is what i need to do: I have a single <DIV> </DIV> for rendering dynamic HTML content. it already has a scrollbar in it when it overflows with text. I want to be able to prevent the user from selecting text on the DIV, and at the same time, when they click on the DIV and drag the mouse up or down , the HTML document will be scrolled proportionally to the dragging.

View 5 Replies View Related

JQuery :: Prevent .load Scrolling Back To Top Of Page When Loading New Content Into Div?

Jun 24, 2011

I've gotten .load to load content into a div but if the window is not at the top of the page it scrolls back to the top each time the new content is loaded but I wanted to avoid any sort of change on the page other than the content in the div. It seems pointless if the user has to scroll back down to the div where the content is each time? code...

Is there a way to keep the window in the same position? Also while I'm at it - is there a more efficient way to write this considering I have 9 pages or should I just write this code out for each instance?

View 2 Replies View Related

JQuery :: Scrolling Text - Cut And Scrolling From Start To End

Aug 6, 2010

im searching for a plugin/code example for text scrolling. I got some text in a <div> if text is longer than for example 300px it gets cut and is scrolling from start to end, stops for a second and then scrolls back, stops and all over, and if its not long enough than 300px then just displays normaly. Something similar to the Song name scrolling inin anyMP3 player.

View 2 Replies View Related

Fading A Layer. Is This Possible?

Jul 23, 2005

I am trying to make a banner the size of the with of my screeen, in
a layer.

BUt I also want to fade it to a complete transperency to reveal the contents
of what's behind it (my page ofcourse) and possible close or hide the faded
layer.

I've seen stuff like that happen in a flash everonment. I was thinking about
using a transition at first to go from one page to another with an
introductory page.

But I rather have everything on one page and just fade the introdutory layer
into the page. Is that too much work for jscript?

View 2 Replies View Related

Onmouseout + Layer

Jul 23, 2005

I have a strange behaviour when applying onmouseout to a layer. it is
not trigged when the pointer goes out of the _layer_ but when it goes
off the _text within_ the layer.

View 1 Replies View Related

Layer At Bottom

Jul 23, 2005

I want to create a layer that 100% wide, 200 px high and stays at the
bottom of the screen, even when the page is scrolled, how do I do this?
I have seen it on websites but can't find any example code ...

View 28 Replies View Related

Layer Print

Jul 19, 2006

Can someone please tell me how to print a single layer?

View 3 Replies View Related

NN 4.0+ I/layer Self-awareness

Jul 20, 2005

I have written a javascript routine that populates a parent document
with a series of <iframe>s. Each <iframe> receives its contents from a
series of separate smaller HTML files. Of course my NN 4.8 browser
doesn't deal well with the <iframe> so I wrapped the code that generates
the <iframe> in <ilayer> tags. NN now recognizes the contents.

However within each of the 'content' files I have another javascript
routine that basically displays the file name (via document.URL &
document.write) of the content file. My IE 5.5 & Mozilla 1.5
understands this perfectly. However my NN responds to the document.URL
with the wrapper/parent document's URL, not it's own unique file name.

I've named/ID'd the iframes & ilayers. If the document.URL fails I can
still make use of the ilayer ID but I need to know the index into the
layers array. I can hard-code a index value into the
document.layers[x].name but given that the position of the particular
content file is dynamic within the parent, the index is going to be
wrong 9 out of 10 times. There doesn't seem to any way for an i/layer
to know who it is Code:

View 1 Replies View Related

Refering Layer In New Window

Jul 23, 2005

I am using javascript to open a new window like this:

printpreview=window.open('printview.php','printpre v','width=600,height=600');

The new window has a layer called preview:

<div id="preview"></div>

I am now trying to write to that layer using innerHTML = "blah bla";

How do I refer to that layer?

View 6 Replies View Related

Layer Transparent In Web Page

Sep 27, 2005

I have an image on a web page within a css layer:

<DIV ID=MyLayer
STYLE = "position: absolute;top:68px; left:563px;
width:640px;height:480px;">
<IMG src="ReportImageBox_12.54.52.png" width=640 height=480></IMG>
</DIV>

I need that the parts of this layer which have a certain color
(for instance "white") be rendered transparent.

My question. Is it possible to have a simple javascript function
to incorporate in the web page which does this?

View 16 Replies View Related

Layer Ontop Of Frames

Feb 21, 2006

I was wondering if it was possible (and if so how) to put a layer ontop
of frames. What I mean is that I would be able to put anything,
including tables ontop of frames so that it could go ontop of two
frames at once, independent of everything else.

Also if it is possible, how would I make it stay still, evenwhen the
page is scrolled... like so that it doesn't even giggle or anything it
stays fixed..

Also, on another subject how would i make it appear next to the top
right hand corner of a cell in a table?

View 2 Replies View Related

Need Javascript To Show A Layer

Jul 20, 2005

Can someone help me figure out how to show a hidden layer *ONLY* if the
browser is IE for windows? I want it to remain hidden for everything else,
Netscape, Opera, Mozilla and anything for Mac. I'm not having much luck
out here.

View 4 Replies View Related

Populating A Dymanic DIV Layer?

Mar 31, 2009

this is driving me nuts. I'm not new to programming, except that I've been avoiding Javascript for long time and now it's biting me back.

I have form in which I have among other element a series of checkboxes. These have different id, and values but same name attributes. These attributes are populated with good old ASP spaghetti code.

When I check the box, I want a Div tag called "floatleyer" to populate with a duplicate checkbox and it's value ( a string). So now we have pair of check boxes one the page and a matching one in the div area. If you un-check either box of the matching pair the other member of the given pair gets un-checked as well. In addition, the box and value string from the floatleyer is completely removed.

[Code]...

View 1 Replies View Related

Css Visibility - Second Layer To Appear When Hover Over The First

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

Populating Layer With Function?

Dec 23, 2009

I need to populate a layer with multi line text. My code below works ok on the document. write to the layer when the function is fired.

<script type="text/javascript">
function insertText(){
var mytext = "The Text to be shown in layer1!

[Code]....

View 2 Replies View Related

Dynamic Drive Layer Pop Up

Jul 12, 2009

Does anyone know this frame layer pop up because I found it the other day but forgot the google keywords I used to find it. Now I cannot find it anymore to save my life but need it

View 3 Replies View Related

Printing A Specific Layer?

Dec 28, 2004

i have a layer based website where one layer is holding all the copy and images... depending on the length a div based scrollbar appears and the user can move the content layer up/down...

now i was wondering if it would be possible to include a print button which would ONLY print out the content within the content layer.

View 2 Replies View Related







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