Internal Scrolling Using Javascript ?
Aug 3, 2004
I'm doing a site and want to have a scrollable menu area so that more links can be added at a later date. I need to know how to do this without resorting to flash as its a HTML only site. The whole thing needs to look as close as possible to the attached GIF.
View 2 Replies
ADVERTISEMENT
Dec 14, 2006
Does anyone have a reputable reference about internal string storage in
JavaScript? (for some particular implementation I mean).
Say having 1,048,576 characters long string from the geometric
progression:
function generateLargeString() {
var s = 'a'
for (var i=1; i<21; ++i) {
s = s.concat(s);
}
return s;
}
- the internal size should be 2 mebibytes and not 1 (?) if strings are
indeed stored as Unicode 16-bit. From the other hand it would be
tempting for an engine developer do not spend extra bytes on ASCII
chars...
So does anyone know of any documented engine optimizations on the
matter? Would be expected on some engine to have the string from above
twice smaller than say
function generateLargeString() {
// 1200 ETHIOPIC SYLLABLE HA
var s = String.fromCharCode(0x1200);
for (var i=1; i<21; ++i) {
s = s.concat(s);
}
return s;
}
View 2 Replies
View Related
Jul 18, 2007
Can any tell me whether you can change the speed of the scroll at all?
View 1 Replies
View Related
Jul 21, 2007
When I trying to do:
this.ctrl.style.display = 'block'
Firefox scroll area to the top, but IE not. I think that's bug. Maybe
anyone knows how I can fix that?
View 4 Replies
View Related
Feb 28, 2006
I came across this javascript scrolling text. My problem is :- I need to have a huge big long message/ messages, but after a certain point the scroller stops scrolling and goes back to the beginning so doesnt show every message that I want. I have tried to take out the <nobr> tags but that doesnt work. Is there anyone out there that can have a look at the code below and see if it can be modified to allow multiple lines of messages. Many thanks
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT LANGUAGE="JavaScript1.2">
<!-- Begin
var l1 = 0; // left of ticker in pixel, or 0 to position relative
var t1 = 0; // top of ticker in pixel, or 0 to position relative
var w1 = 780; // width of ticker in pixel
var ie = document.all ? true : false;
var first = true;
var l2 = l1 + w1;
var l3 = l1 - l2;
var l = l2;
function tickinit() {
if (ie) {
if (l1 == 0 && t1 == 0) {
pos = document.all['tickpos'];
l1 = getLeft(pos);
t1 = getTop(pos);
}
ticktext.style.posTop = t1;
}
else {
if (l1 == 0 && t1 == 0) {
pos = document.anchors['tickpos'];
l1 = pos.x;
t1 = pos.y;
}
document.ticktext.pageY = t1;
}
l2 = l1 + w1;
l3 = l1 - l2;
l = l2;
setInterval('tick()', 10);
}
function getLeft(ll) {
if (ll.offsetParent)
return (ll.offsetLeft + getLeft(ll.offsetParent));
else
return (ll.offsetLeft);
}
function getTop(ll) {
if (ll.offsetParent)
return (ll.offsetTop + getTop(ll.offsetParent));
else
return (ll.offsetTop);
}
function tick() {
l = l - 1;
if (l < l3) l = l2;
cl = l1 - l;
cr = l2 - l;
if (ie) {
ticktext.style.posLeft = l;
ticktext.style.posTop = t1;
ticktext.style.clip = "rect(auto "+cr+"px auto "+cl+"px)";
if (first) ticktext.style.visibility = "visible";
}
else {
document.ticktext.pageX = l;
document.ticktext.clip.left = cl;
document.ticktext.clip.right = cr;
if (first) document.ticktext.visibility = "show";
}
first = false;
}
// End -->
</script>
</head>
<body OnLoad="tickinit()"> .....
View 6 Replies
View Related
Jun 28, 2002
This is my second attempt at code to allow the user to view a table by navigating through a page using customised buttons. Although all buttons work on the 'MouseDown', event, the 'MouseUp' is not working. Any ideas? Code:
View 1 Replies
View Related
May 19, 2003
I'm trying to place a javascript pulldown menu in a layer at the top of my page.
Everything seemed to work great until I noticed the menu always stays visible as you scroll down the page.
How can I make this menu stay put exactly in the layer (yellow bar) and not scrolldown? Code:
View 5 Replies
View Related
Jun 24, 2002
I am looking at a client’s site that has a scrolling text bar at the bottom of the page for latest news. I have been asked to recommend whether they keep the scrolling text as a java applet or whether they make it dhtml with Javascript to make it scroll.
To be honest, I’m not sure whether there really is an important difference, in terms of download time, likelihood of working (if client browsers are better enabled for one verses the other), or whether there are any other reasons one should be used over the other.
View 2 Replies
View Related
Mar 21, 2006
Does anyone know a simple cross-broswers vertical scrolling javascript
that can call up its scrolling contents off an external html page/file?
View 1 Replies
View Related
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
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
Oct 20, 2009
I am new to Javascript and I downloaded JSE internal search engine v 1.0a from CodingForums. It works fine in all browsers other than ie6 and ie7. Have confirmed that other javascripts are working in these browsers so it is not my browser settings.
View 1 Replies
View Related
Dec 19, 2005
I like having scripts external, but I wonder about the security of internal anyway. Someone could save and change the HTML, right? But is that possible with an external script? I always thought not (unless there was an error), until a person on this forum was able to grab the script I was working with at the time. No problem with that, but it brings up the question in my mind about security in general surrounding java-script.
View 8 Replies
View Related
Apr 1, 2009
I've been doing this for a while and I cannot get the "Contact Us" link to work from this page. It works in the Home page. I'm probably missing something stupid but I can't see it.
[Code]...
View 1 Replies
View Related
Sep 27, 2005
Not sure if this is the best place to post this, but can I set the internal color of a radio button? Basically the background color inside the circle.
View 3 Replies
View Related
Jun 30, 2009
I have never done this before and I need some help. Can someone tell me how can I create a search engine within my website to search through the text on a certain page? This is the site I am talking about:http://www.21stcenturyworld.com/community.html
View 9 Replies
View Related
Apr 1, 2011
I am fairly familiar with the concept of Objects and their properties and methods, but javascript being object based as opposed to object oriented has me stumped on how to access an object's properties from an onclick event handler created for another object created within the original object.
In the example below, I have a constructor function called anyObj. to which I pass an object reference to an element.
anyObj has 3 properties and one function increaseWidth()
increaseWidth() creates a new button with an onclick event handler and this is where I have a problem.
The onclick function needs to increase the value of anyObj's this.width property. I originally had a line this.width += 10; in the onclick but quickly realised why this wasn't working because the this in the onclick function refers to the new button object and not the this.width property of anyObj.
The workaround I have used, and it works, is to make a copy of all the this.xxxxx properties. eg. width = this.width; and use the width variable in the onclick as you can see below. This "workaround" works fine but doesn't feel ideal to me.
So is there a better way to access the anyObj()'s properties from within the onclick function than the way I have done it? Obviously I would prefer to not have to make copies of all the anyObj() properties like I have to make them accessible to the onclick function.
function anyObj(divObj){
this.elem = divObj;
this.width = 50;
this.height = 50;
[Code]....
View 5 Replies
View Related
Sep 22, 2011
I'm trying to add an internal site search to my website, and it only work for some search items, not for everything. For example, if I search for Bud Light, Budweiser, Bud Light Lime, it finds them. But if I search for Stella Artois, Paulaner, or Hoegaarden, it doesn't find anything. I'm thinking there's something wrong with the javascript code, I'm just not sure how to fix it.Here's the code in the head region:
[<script type="text/javascript">
// Google Internal Site Search script- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
[code]....
View 1 Replies
View Related
Jan 5, 2011
My company uses a software to manage and collect data for equipment. They have a dedicated server to host the software and an internal website that shows all of this data. Though it is an internal website, it can be accessed externally. The website displays data by taking a snapshot of the data from the software and displaying it as a jpeg. It refreshes itself every 30 seconds or so. Here's the problem: When viewing the website externally, the jpeg that shows the data doesn't show because for some reason the webpage thinks you are viewing the site internally, therefore it is trying to pull the image from an internal directory, I think. Now I am familiar with HTML but not with javascript, and the site uses javascript to pull the snapshot image on to the webpage everytime it refreshes.
[Code]...
View 2 Replies
View Related
Jan 23, 2002
My company has 2 email apps. One for external (MS Outlook) and one for internal (GroupWise). On my Intranet, I need to connect the mailto tags to the internal system. Does anyone know how to do this? I can't make GroupWise everyone's default email program because many people use both frequently. I would greatly appreciate any help or direction.
View 1 Replies
View Related
Mar 31, 2011
I am fairly familiar with the concept of Objects and their properties and methods, but javascript being object based as opposed to object oriented has me stumped on how to access an object's properties from an onclick event handler created for another object created within the original object.In the example below, I have a constructor function called anyObj. to which I pass an object reference to an element.
anyObj has 3 properties and one function increaseWidth()
increaseWidth() creates a new button with an onclick event handler and this is where I have a problem.The onclick function needs to increase the value of anyObj's this.width property. I originally had a line this.width += 10; in the onclick but quickly realised why this wasn't working because the this in the onclick function refers to the new button object and not the this.width property of anyObj.
The workaround I have used, and it works, is to make a copy of all the this.xxxxx properties. eg. width = this.width; and use the width variable in the onclick as you can see below. This "workaround" works fine but doesn't feel ideal to me.So, what I am asking advice on is, is there a better way to access the anyObj()'s properties from within the onclick function than the way I have done it? Obviously I would prefer to not have to make copies of all the anyObj() properties like I have to make them accessible to the onclick function.
Code:
function anyObj(divObj){
this.elem = divObj;
this.width = 50;
[code]....
View 2 Replies
View Related
Jul 8, 2011
I have code to make a popup via javascript and it works fine, but what actually pops up is an external file that i select (in my case test.html). i want all of the code of test.html to be in my index.html and when i call the popup it doesn't call an external file but instead calls the html code in the internal file (index.html)? possible?
Code:
What's in test.html? it's a form
Why? i need the code of test.html to access some global javascript variables in index.html.
View 14 Replies
View Related
Dec 8, 2011
I should write a script which should distinguish internal and external links with JS. The links can be absolute or relative. I thought the best guess would be to first check if it is a relative link by checking the first character of the string is a /. (but how do you do this?) Then it will be always an internal link.
Then I thought to check if the URL (this.href) starts with the current protocol + location.host . If YES, it is an internal URL, else it is an external URL.
So does anybody know how to check if a URL starts with '/' or '[URL]
View 1 Replies
View Related
Nov 24, 2011
I've previously written an image carousel with lightbox and to be honest forgot about it for quite a long time. I've just been tasked with making a few modifications (I wrote this code about 6 months ago)
Now, the problem I have is that I now need to call the internal method from the ligthbox plugin.
I've tried setting a reference to this like this but it just won't play ball. I can see that the ajax feed gets called but unfortunately I can't then access it.
[Code]...
View 3 Replies
View Related
Sep 15, 2009
I'd like to expose some of the functions defined within a plugin. The plugin I'm using us asmselect [URL], and the structure of the code is:
[Code]...
I'd like to be able to call addListItem() from another javascript function. What's a good way to expose that function to the outside world?
View 2 Replies
View Related
Apr 13, 2011
Firstoff: I know I ask about using a plugin, and I wasn't so sure where to put my question in, decided though the general jQuery-Forum would be better as my problem is more connected to jQuery than the plugin itself. First off, I'm using this plugin and modified it myself a bit, adding new functions: [URL] You'll find the underlying .js for the component here: [URL] Now, scroll to the end of the file, you'll find some "internal functions" like _registerRemoveEvents
[Code]...
View 1 Replies
View Related