have a small div above (hover) a big one.I assign onmouseover and onmouseout events to the wrapper div.For image caption roll-over animation.The problem is when the mouse is above the caption itself, causing an unwanted result(probably event bubbling).
And another problem: sometimes when you move mouse from outside to container you get a a triple debug sequence: (it should be just 2): -I am over- -I am out- -I am over-(firebug console)How to make it work? (no jquery)must work on all browsers.[URL]The wanted result:When mouse moved over the image, only mouseover event should be raised once!When mouse moved out from the image, only the mouseout event should be raised.when mouse is over the captionm it should be treated as if the mouse is still on the image. (no flickering)
I wanted a small calendar for a web page that is created for the current month and highlights the current day and a date passed in. I also added a variable to show text when the cursor is over the highlighted dates. It's nothing special, but I like it and thought I'd share it. Here is the code and it is attached for downloading as well.
var month = ["January","February","March","April","May","June","July","August","September","October","November","December"]; var moDays= [31,28,31,30,31,30,31,31,30,31,30,31];
function display(d,txt) {
var highlightDate = new Date(Date.parse(d)); var flag = false;
var startDate = new Date(); startDate.setDate(1);
if (new Date(startDate.getFullYear(),1,29).getDate() == 29) moDays[1] = 29;
var endDate = new Date(); endDate.setDate(moDays[endDate.getMonth()]);
if (highlightDate >= startDate && highlightDate <= endDate) flag = true; if (!txt) txt = "";
var start = 0 - startDate.getDay(); var end = endDate.getDate() + (7 - endDate.getDay());
var r = document.getElementById('calendar').insertRow(0);
for (i = start; i < end; i++) { if ((i - start - 1) % 7 == 0 && i != start) { r = document.getElementById('calendar').insertRow(-1); r.className = 'newRow' }
var c = r.insertCell(-1); if (i > 0 && i <= endDate.getDate()) { c.innerHTML = i; if (i == new Date().getDate()) { c.title = 'Today' c.className = 'selectedCell' } else { c.className = 'newCell' } if (flag && i == highlightDate.getDate()) { c.title = txt; c.className += ' highlightedCell' } } else { c.innerHTML = ' ' c.className = 'hiddenCell' } } var title = document.getElementById('calendar').rows[0].cells[0]; title.innerHTML = month[startDate.getMonth()] + ' ' + startDate.getFullYear(); title.colSpan = 7; title.className = 'title' }
I'm very new to JQ, I was looking for a solution to expand a div on mouse hover from its center to display some dynamic text wrapped in a code tag, I found and tried to fit to my needs this little piece of code, however is not exactly what I'm trying to do.
Can someone tell me why the image isn't zoomed all the way to its max when clicked on? You have to click on the zoomed image to get it to its max dimensions. Why does it do this and how do I fix it so it will max out in a separate window when you click on the thumb? Code:
I have this website here [URL] If I use PC, I can drag and change volume on top left just fine. But if I use Mac OSX, either Safari or Firefox, I cannot drag the volume in the Flash, although I can see the mouse turn into pointer.
I would like to find a small calendar that I can use to allow people to choose a date. I am planning on placing a small icon to the right of my date fields to allow people to choose the date from a calendar. It doesn't need to be full sized. I'm using ASP for scripting, but a control is an option (com or activex).
What I am kooking for is not really a pop-up but more like a tool-tip. I was not sure what else to call it. What I need is a small little area with a different background color and perhaps a border to open next to a word when the symbol next to it is clicked on. This word or phrase would be in a sentence that would require some further explanation or definition.
I guess this would be similar to how someone like iStock Photo does with their thumbnails only it will require a click as opposed to a rollover and it will not be an image, just some text.
I have an "image gallery". I have four links that go to external pages, not defined yet, and one main image. When rolling over each link, the main image should change to the corresponding one. When I take the javascript and meat of the html out of context it works. When I use it on this page where it is supposed to be used, it does not work. The error console tells me my functions (switch_One() etc.) are not defined. Code:
What i am trying to do is the following: I read a tutorial on objects and thought i would try it out. The tutorial taught me how to make a function calculating the areal and circumspherence of the circle where the user input would be the radius.
To sum up: I want to make it possible for the user to write, say, "2" in the form text field and click "Calculate" and then the text will appear w/o reloading the page. I could easily do this by removing the objects but as i am training my object skills i would like to know if it is possible to do this with objects?
The problem is that i dont know how to take the user input. I know that in PHP it is "$_POST["name"]" but what is it in JS? And is it possible to jump into PHP and use $_POST inside the JS script or how can this be done?
This is my code so far (It prolly looks strange but i really dont know how to get it to work).
<script type="text/javascript"> function Circle(radius){ this.radius = radius; this.getArea = function(){
[Code]....
As you can see i have a predefined object: bigCircle. What i want to do is change the new Circle(100) to new Circle(USER INPUT HERE).
i made this javascript using the new "screen.width" property, which would make it easy to center content in a webpage no matter what the screen resolution is. Here it goes:
<html> <head> <script type="text/javascript"> function pos_center() { var content = document.getElementById("carrier") var width = screen.width var contentwidth = content.offsetWidth value = parseFloat((width - contentwidth)/2) content.style.marginLeft = value } </script> </head> <body <div class="body" id="carrier"> </div> </body> </html>
The "body onload" makes the page first load all the way to the left, and then after completely loading switches the content to the center, that is dynamically gross. Now, instead of using the "body onload", is there any other way that i can make the content appear. Seeing that there is no "onbeforeload", there must be another way to solve this.
Hoping someone could solve this small problem of mine. I have numerous regions on a page that can be hidden/shown, the problem is i get a 'Line 8 Character 30 'id' is not defined' javascript browser error, but it works!
here is the code the error appears in:
PHP Code: <script language="javascript" type="text/javascript"> /* This goes in the head section */ window.onload = function() { document.getElementById(id).style.display = 'none' }
function toggle(link, id) { var div = document.getElementById(id); if (div.style.display == 'none') { div.style.display = 'block' link.innerHTML = 'Hide Forms' } else { div.style.display = 'none' link.innerHTML = 'Show Forms' } } </script>
I want to capture the text to the clipbroad when i use the mouse left clicking on such text.. ( i want to simplify the step of "Highlight Text" > "Mouse Right Click" > "Copy") Can i use javascript to do this?
In slideshow running on xp_pro/ie8, after the last slide is displayed, a small white rectangle (approx w:60px h:20px) at the top left positionwhere the1st slide is about to re-appear. The 1st slide then displays correctly, as doall the slides, but I can't keep the rectangle from showing up.
I am using "document.getElementById('dfDataBase').focus();" this function to put focus in the particulate text field control.The cursor is showing in the control, but i am not able to type any data, after clicking in the control then only i am able to type the data.
We are using FlowPlayer to display a video on our website page here. However the video appears very small in IE8 (like a thumbnail) and I cannot seem to work it out!
i'm trying to insert a small image gallery in cubecart. I have this code and it is wrong somehwere, Code: <a href="#_self" onclick="LoadGallery('imageGallery','{IMG_SRC}.1.png')"> something to do with the {IMG_SRC} tag. is it possible to use this where it is?