Click And Place A Small Cross On Screen
Apr 14, 2006
I'm sure I've seen this somewhere before, but can't find it via google. Or I'm using the wrong search words.
Does anyone know of a script where a small cross, or any other small image, can be placed on the screen where the user clicked the mouse?
View 3 Replies
ADVERTISEMENT
Dec 7, 2005
I have a form with several different text boxes for things like dates,
numbers, etc. arranged in a table, each row has the same kind of text
boxes for data entry (10 rows probably).
I want to have a separate section above the form where I can toggle a
div containing an appropriate error message to appear after the
onchange event fires for the text box.
The thing is, I want all the divs with their different text messages to
appear in the same place and disappear from the same place above the
form instead of different places on the form or web page.
Well, they don't have to be multiple divs, but there are multiple
different error messages that should appear depending where the user is
typing...
Example: 'wrong format,' 'month must be between 1 and 12,' etc. Of
course the messages will be nicer than this.
View 5 Replies
View Related
Aug 1, 2009
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.
Where is the SWF: [URL]
View 1 Replies
View Related
Jul 22, 2011
I am writing a small data entry screen that will post the form data to a page and return a message. But i cannot get the Success or Error functions working properly.
Here's the code where strData is the posted querystring of:
I'm not sure whether it should be in a form and using the onsubmit or click of a button.
View 2 Replies
View Related
Feb 25, 2011
So I wish to be able to click on a small thumbnail (small_tn1.jpeg) and a bigger picture pops out in a new window. (big_tn1.jpeg).I have looked at lightbox-versions but they are to complex with code.I want to use one function openBig() to be able to use on all my pictures on the site. So all my pictures will be named; small_tn1.jpeg, big_tn1.jpeg, small_tn2.jpeg, big_tn2.jpeg...I haven't found any that full fill my request. The closest code I found is for only a single-image. http://www.pcurtis.com/popup_advanced.htm*It's a school assignment, so I can not use jQuery or target="_blank"*
View 3 Replies
View Related
May 4, 2005
Soliciting thoughts on the best way to determine the position of a click event.
Here's what I'm using right now but it's not working:
Code:
function getMousePosition(evt)
{
var x, y;
if(evt.pageX)
{
x = evt.pageX;
y = evt.pageY;
} else if (evt.clientX)
{
x = evt.clientX + document.body.scrollLeft - document.body.clientLeft;
y = evt.clientY + document.body.scrollTop - document.body.clientTop;
}
if(document.body.parentElement && document.body.parentElement.clientLeft)
{
var b = document.body.parentElement;
x += b.scrollLeft - b.clientLeft;
y += b.scrollTop - b.clientTop;
}
alert(x + ',' + y);
return [x,y];
}
The coordinates are WAY off in both firefox and IE. Can someone fix this?
View 16 Replies
View Related
Aug 31, 2011
How am I able to add a a cross to the right of a textbox which once click it clears the text from the textbox, sort of like the way Google do it, I have been trying to do this for ages now and can't seem to find a way to do it.
View 5 Replies
View Related
Jan 19, 2011
Isn't it possible to place a text at a fixed place on a picture with javascript ?
The text will be AJAX updated...
View 5 Replies
View Related
Oct 5, 2011
I have a website that I am maintaining that was built some time ago. There is a little speaker icon on a page that allows a user to click to hear the pronunciation of a word.
<script type="text/javascript" language="Javascript">
It does not work in all browsers and I am wondering what the alternative should be?
View 4 Replies
View Related
Jul 23, 2009
I use a Time Date Picker Javascript code [URL]. It works fine with a placement problem. When you click one of the last pair input fields on the page, a drop-down list will appear from the input field. In my case, the drop-down list shows on the bottom of a page instead. I can't find the code controls the location of the list.
View 1 Replies
View Related
Jun 18, 2009
Is there any way to resize an iframe dynamically to the height of its content that works cross browser and works when the iframe content is on another domain than the main page (I have access to both pages, so code can be put in either) Also, it must resize when links in the iframe are clicked (ie when a new page within the iframe is loaded)
View 1 Replies
View Related
May 27, 2011
Simple question really. The cross fade option used by default with cycle is not a linear one...it looks like it uses some kind of S curve because during the crossfade animation the background (meaning the area behind the images being cross-faded) becomes visible. Example screenshot taken mid-transition. The pink should never be visible behind the grey, but it is:
[Code]...
at the moment, which is leading to background visibility. Is there another fx option I should be using?
View 4 Replies
View Related
Mar 5, 2007
Same thing for the height parameter; for to set in the centre some popup with images what is better? what are the difference?
View 6 Replies
View Related
Mar 2, 2011
I have 2 monitors from a different size. It is important in my application that I get the screen size of the monitor where the webbrowser is located. When I try to get the screen size (window.screen.height + window.screen.width) only IE gives me always the screen size of the main monitor where my taskbar (windows7) is located, instead of the screen size of the secondary screen where the webbrowser is located.
View 6 Replies
View Related
Dec 27, 2011
I have a div that has a negative top margin and a negative right margin. The right margin is because I want to have the div slide onto the page from the right. The top margin is because without it my page height is the height of the visible elements plus the height of the off-screen div.On a button click, I move the div down and then animate it onto the screen from the right. On button click again, I animate the div to the right, off the screen, and then move it up. I also toggle its width & padding so it will appear to grow/shrink as it moves on/off screen. At least that's what I am trying to do. The animation onto the screen looks good, but going off the screen, it appears to happen intantaneously, instead of animatedDoes anyone know how I can fix this?
$(".addPanels").live("click", function(){//now and in the future, show the add panels menu
var thisAddPanelsMenu = $(this).parent().prev(".addPanelsMenu");//get the addPanelsMenu
if(thisAddPanelsMenu.length) {//if the addPanelsMenu exists
[code]....
View 2 Replies
View Related
May 15, 2006
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.
Let me know what you think of it.
<html>
<head>
<title>Calendar</title>
<script type="text/javascript">
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'
}
</script><style type="text/css">
#calendar {
position: absolute;
color: navy;
font: italic 75% sans-serif;
margin: 2px;
padding: 1px;
background-color: lightcyan;
border: 1px solid gray;
}
TR.newRow {
background-color: white;
}
TD.newCell {
text-align: right;
margin: 1px;
padding: 2px;
border-right: 1px solid lightskyblue;
border-bottom: 1px solid lightskyblue;
}
TD.selectedCell {
background-color: cyan;
text-align: right;
margin: 1px;
padding: 2px;
border-right: 1px solid lightskyblue;
border-bottom: 1px solid lightskyblue;
}
TD.hiddenCell {
background-color: lightcyan;
}
TD.title {
font: bold 110% sans-serif;
text-align: center;
border-bottom: 1px solid skyblue;
}
TD.highlightedCell {
background-color: palegoldenrod;
}
</style>
</head>
<body onload="display(ཁ/25/2006','Adam's Birthday');">
<table id="calendar"></table>
</body>
</html>
View 1 Replies
View Related
Feb 20, 2005
how forum's get divs to popup once they click a link? Like the "Quick Links" in sitepoint's navigation.
View 15 Replies
View Related
Feb 5, 2010
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)
View 2 Replies
View Related
Aug 14, 2011
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.
[Code]...
View 1 Replies
View Related
Dec 1, 2006
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:
View 2 Replies
View Related
Apr 10, 2001
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).
View 2 Replies
View Related
Jan 23, 2007
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.
View 2 Replies
View Related
Aug 21, 2007
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:
View 3 Replies
View Related
Sep 23, 2009
The following function is called when the user selects "other" from a drop down menu (<OPTION>).
IE it works great, in Firefox I get the following error:
Ele1 is undefined
- Ele1.removeChild(Ele0);
Code:
function buildTextBox() {
var Ele0 = document.getElementById("LAC_Littmann.color");
Ele0.innerHTML = "";
var Ele1 = Ele0.parentElement;
[Code]....
View 1 Replies
View Related
Mar 4, 2009
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).
View 4 Replies
View Related
Mar 25, 2007
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.
View 1 Replies
View Related