Implementing Opacity Script
Jul 12, 2007I've just had a look at your fading opacity script. As I'm new to
programming and I'm amazed by the script could I ask for some hints
how to implement it in a site with a mouseover, mouseout events?
I've just had a look at your fading opacity script. As I'm new to
programming and I'm amazed by the script could I ask for some hints
how to implement it in a site with a mouseover, mouseout events?
What i want is this div to expand:
<div id="info"><a onclick="Effect.toggle('toggle','Blind')" href="javascript:void(0)">More Info</a>
and show the rest of the content, for example it will say "More Info" when the user clicks it will toogle down and reveal the rest of the content which for example sake can be "Heres more info".
[URL] however i want to impliment this into my form. if false I want it to return an alert saying postcode not valid and then stop the form submitting, else i want it to just allow the form to submit.
View 5 Replies View RelatedI would like to know if anyone has some javascript code that reads an
external, arbitrary, XML feed, and can display the 2 or 3 latest
submissions based on the XML src.
Is such a task even possible with just client-side javascript?
I need to implement a next to last selector for our project. I came up with the following code:
jQuery.expr[':'].next_to_last = function(obj, index, m){
var $this = jQuery(obj);
return $this.find(m[3]).last().prev();
};
Is there any problem with this implementation?
Im having trouble implementing a countdown clock from within a php page. I am using the countdown clock from dynamic drive. It works well if I have the javascript in the php page, but when I move it to an external js file clock.js it gives an 'invalid date'. Does it have something to do with the php tags inside the function ? below is the code.
callclock.php
<script src="clock.js" language="javascript" type="text/javascript">
</script>
[code]....
I'm making a project which creates tabs with a class. I don't really know how to explain it better but this is how it works:
<a href="#" id="tbs_tabs">Create</a>
<script type="text/javascript">
var tbs = new Tabs('tbs_tabs');
tbs.theme = 'classic'
tbs.create_option('abc','#');
tbs.create_option('abz','#');
tbs.create_option('abf','#');
tbs.create();
</script>
It first creates the new class and tells it the id, then it creates as many options as you want and creates it.
My problem is with this line:
for(i=0;i<this.option_values.length;i++)
{
li = document.createElement("LI");
li.appendChild(document.createTextNode(this.option_values[i]));
addEvent(li,"click",function(){oThis.select_option(i); return false;};
ul.appendChild(li);
}
What I was trying to do here is add an event to the LI element that refers to the current tab class but doesn't use the CURRENT i value but the value that was when the event was first created.
For example.. If my i value is currently 2 and I add the function, then I want that when I call the function, the value will still be 2 and not the current i value. What happens now is when I call the function the value is something like 5 or 6.
She's wanting an array that will store points awarded and then calculate the average. It will also then show the distribution of the allocated grades (that I'm not having trouble with - just pulling the averages from the array data).
This is my code so far:
<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http:www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http:www.w3.org/1999/xhtml">
<head>
[Code]....
I've tried different ways, most ending in the 'average' variable being undefined or when the button is pressed and the function 'ReturnAverage' called it doesn't do anything. I'm using Eclipse as my IDE to work on this and check syntax.
I have a Login Page whrere all Functionalities such as validations are
Done in Client Side...
I have to Implement Remember My Mail Id and PAss Word Functionality
also in Client side..
When Remember PAssWord Check Box is Checked.....
The User and Mail Id Should be Remembered Duriing The Next Login...
How could i do this in Client Side.
I have a grid of items that when clicked lead to a new page. I would like to implement a function so that if a user clicks on an item and holds for at least 1000ms, a menu will be shown next to the item and they will not be taken to the next page.
However, all of my current attempts either lead to the menu not being shown, or it is shown and the user is redirected to the next page anyways.
Here's my current code:
jQuery(document).ready(function(){
var mousehold;
jQuery('.item').mousedown(function(){
[Code].....
Let's put it this way.I have the following repeating DIVs:
<asp:TextBox ID="txtInsertComments" AutoPostBack="false" CssClass="expanding" runat="server" Width="400px" Text='<%# Bind("comments") %>' TextMode="MultiLine" />
<div id="commands" style="display: none;">
<table cellpadding="0" cellspacing="0" width="400px" id="tblCommands">
[Code].....
How do I use jQuery to determine which textbox control is being clicked and then show the div that relates to that TextBox? Again, both the textbox along with the div=command are all repeating. It could repeat more than just twice as showing in the example above. I need the jQuery to only show the div=command that the user has clicked on the TextBox for commenting.
I'm trying to do what they are saying at this link: [URL]. First, they tell me to do what is listed under the "Scripting Disabled" section:
<a href="file.htm" onclick="window.open('file.htm'); <br>
return false;" target="newWin">
Then, down in the page in the "The Perfect Pop-Up Script" section it has a large script for me to use. I'm wanting to use it at my page [URL]. I want to make each of my images pop up windows like at this site: [URL] So, are they telling me to use the html in both sections? Where would I put the html in the top section vs. the script in the lower section?
Do I have to make another webpage and just paste the script in there and then call it, like they say below: "To call the function you would use the following code:"
<a href="my-pop-up-window.htm" <br>
onclick="popUp(this.href,'console',400,200);return false;" <br>
target="_blank">This is my link</a>
I'm a bit confused where I am supposed to inserting the page name for the popup that I want to pop up vs inserting the pagename for the script page that I guess I have to make. So what are the steps that I would take to do all of this?
I want to implement infinite scrolling in DataTables and data will be added to the table dynamically on table scroll. Initially all data are loaded in DataTables and display a sub-set of the data and when I start scroll in table its display normally. I am using normal SQL query to load all data available in my database table. How we write SQL query to get sub-set of data on scroll event and added in DataTables dynamically. I am using ASP.net (C#).
View 1 Replies View Relatedimplement 2 instances of superfish menus on one page? I would like to place a primary navigation menu above the header, and a secondary nav-menu below the header. I've "kind of" managed to do it with the help of Google and by reading quite a few blogs, but I think I'm doing it the wrong way by just duplicating the whole JS folder and renaming things.
Plus, I don't know how to style the menus. So, how would YOU implement 2 Superfish JavaScript menus on ONE page?
I have some ajax tabs using the jquery-ui-tabs features. Within these tabs are tables with links. There are name links I am trying to load
with an ajax style thickbox modal window.Then linked within tabs, the thickbox will not initialize.When a static page with no tabs, the same code fires off the thickbox perfectly fine.
I've implemented Orbit slider [URL] and everything works great, BUT when I also implement Video lightbox [URL] the orbit slider broke. So it seems jquery-1.4.4.min.js for orbit and jquery.tools.min.js for video lightbox don't like to play together. Which ever one is loaded in first does not work, this is a problem as you can see on the page I am building: [URL] The first image box is the orbit which is loaded second and works fine, the second box is the video lightbox which does not work. I emailed the lightbox ppl and they suggested there was a conflict with another module and to load lightbox last, great advice to get lightbox working not so great for the orbit slider.
View 6 Replies View RelatedI am implementing Captcha security check on the register page and seem that I am unable to find the Captcha image/picture. Does anyone know where can i download such images?
CAD
PS: I am currently doing a project on security of the site and i hope that all the threads started by me will benefit people in this forum. ;)
Im developing a site for my company that will contain relevant information on sites we serve (such as login details, passwords, addresses etc). It is available locally on our intranet due to the fact we have login details and such.
Anyway on the sidebar of my site (which is run on Wordpress), I have all the sections for the sites.
When a user clicks item #1, it expands and shows all the sites in that area.
The one problem is that when the sections are clicked on, they just expand in a very plain boring way.
I need it so that there is some sort of smooth transition between opening and closing the <div> sections.
Here is the current code I have now (I tried to edit as much of the comments as possible so it will make sense):
<script>
I found it on google, and modified it without having to change anything on the sidebar itself, just a simple paste to the head section.
This code also hides other currently open sections, so that only one may stay open at a time.
I'm trying to create a small javascript menu.I have 4 images which serves as menuitems.
<div class="myMenuButton"><img goes here />
<div class="myMenuContent">
Random content1 here <br />
is there a simple way of implementing a slider function to the images to toggle slide up/down the contents belong to this button? And if another image is clicked then all OTHER open slides should be closed while opening this one etc
I've been trying to get opacity reporting working in IE 5.5 but the
Microsoft documentation does seem to work as I interpret it even though
this documentation page seems have been written for IE 5.5
<URL: http://msdn.microsoft.com/workshop/author/filter/filters.asp>
In the html page listed below I see an error "Library not registered"
in IE 5.5. In IE 6 I see an alert that says "50" as expected.
Some of microsoft's demos on the above page also show the "Library not
registered" error in IE 5.5 but work in IE 6.
Has anyone else experienced these problems with filters? Any idea why
IE 5.5 doesn't work as advertised? Code:
How to implementing a "google custom search" feature in a jquery code. I am hoping someone could help me out, as the code is pretty short.
I've been trying for a while but it doesn't work.
The HTML of the page is -
The Jquery script of the website is (this is where I need to implement my custom search code somehow) -
The small arrow that marks the active search icon:
This is my Google custom search code, which I need to implement in the above.
I only need the custom search, I don't really care about the "internal search" or the general (where google searches anywhere) google search. I really need this.
In IE I have a routine that dynamically assigns objects' opacity. This works
fine for some elements but not for others.
It works for buttons and inputs but not for img, span and select.
This is the line that sets opacity from a loop through all elements:
document.forms[0].elements[i].style.filter =
"progid:DXImageTransform.Microsoft.Alpha(opacity=" + FadeOpacity + ")";
I would like to set opacity of some element to 0 through JavaScript, using GetElementById function. This is my short code inside body of HTML:
<script>
document.getElementById("element").style.opacity="0";
</script>
<div id="element">
noopacity
</div>
It doesn't seem to work, what am I doing wrong?
I want to amke something fade out, if and only if it is already set at 100% opacity.
I need to make a function that will allow me to do this.
Here is my current code:
//Time=millisecond Start and End = Amount of Opac to start with. Id = which div to affect
function opacity(id, Start, End, time) {
//frame speed here
var speed = Math.round(time / 100);
var timer = 0;
//
if(Start > End) {
for(i = Start; i >= End; i--) {
setTimeout("Opac(" + i + ",'" + id + "')",(timer * speed));
timer++;
}
} else if(Start < End) {
for(i = Start; i <= End; i++)
{
setTimeout("Opac(" + i + ",'" + id + "')",(timer * speed));
timer++;
}
}
}
function Opac(opacity, id) {
var obj = document.getElementById(id).style;
obj.opacity = (opacity / 100);
obj.MozOpacity = (opacity / 100);
obj.KhtmlOpacity = (opacity / 100);
obj.filter = "alpha(opacity=" + opacity + ")";
}
How would I write a function that would allow me to fade out if opacity was already 100, otherwise it does nothing?
I've got two problems with these functions:[code]The first is that they fade in and out as expected, unless I mouse over any of the text in the div. Then the fadein and fadeout functions seem to compete with each other.The second is that showcount keeps getting set to undefined, so it never gets to 4, where upon fadeout should return without fading the div into the background.I should say that I believe the first problem has to do with mouseover seeing the html as a separate entity from the div, but that seems odd because it's a child of the div!
View 4 Replies View RelatedIn Mozilla FireFox I can set the opacity of text/images with
document.getElementById(飓').style.MozOpacity = 0.1;
But with IE, I can only set the opacity of images and not text. Any ideas how to do it?