My code doesn't work right:
function rotate(Points, Angle) {
for (var i=0; i<Points.length;i++) {
Points[i] = [Math.cos(Angle) * Points[i][0] - Math.sin(Angle) * Points[i][1], Math.sin(Angle) * Points[i][0] + Math.cos(Angle) * Points[i][1]];
}
return Points;
}
rotate([[0, 0], [50, 0], [25, 25]], 5);
I used the fo...
I've got an uploadify form working beautifully, but I'd like to change the settings programatically and I'm getting an error.
Uploadify is initiated on document.ready and I'm trying to bind the updateSettings to a button click (also done in the document.ready). I have also tried using the updateSettings function outside of the document....
Here I'm wrapping an HTML tag with another tag '$holder' below.
$holder = $('<div />')
.addClass('joverlaytext')
.css({
position:'relative',
});
$(this).wrap($holder);
Now after this statment how to get the object/reference to this newly created HTML element, ie. jQuery obj of '$holder'
...
Hello I am using jquery to do some ajax that calls in some data from a database, on the mouseover and element the method runs and I get the expected results, however when I then mouse over another element, the method runs again, however I need to delete the first lot of data from the screen first, this is what I have so far,
$("a.conte...
I am trying to load a new post in wordpress without reloading the entire page. I am not sure where to start with this. I am new to AJAX and JavaScript. Any help would be great.
...
Hi,
I have a parent page that launches a telerik radwindow and passes it an argument.
Once the radwindow is done processeing the value, I need it to return it to the parent page, and I would like the parent page to have access to this value in my code behind page.
I have tried to pass the value to a hidden field on my page and then tr...
I have a form for which onkeyup triggers the creation of a suggestions box for certain fields. I am able to capture the keystrokes for the up arrow, for the down arrow and for escape and use them accordingly to move around in the suggestions box or close it. I would like to use enter to move their selection into the input field that tr...
I have some javascript loaded in a cfwindow. I call the javascript function on click of a button. The following is the code loaded in cfwindow.. When I click a button JS error shows up saying : setVendorPayee is not defined
function onclick(event) { setVendorPayee("126", "sudheer"); }(click clientX=397, clientY=139) when i actually ha...
I'm about to potentially start work on a website, but the client has a requirement that the website should also be accessible from mobiles/cell phones. He hasn't mentioned which mobiles he wants to support in particular but I assume it would be smart phones like iphone, blackberry, android, etc.
My question is, how much work will this t...
I am calling a jquery.fancybox link from the click event bound to a table row. The action works fine the first time, however, if I close the fancybox and click again on any row the anonymous function bound to the row still fires, but fancybox doesn't start up. Here's the javascript I'm using:
$jq(document).ready(function() {
$jq('a...
Hey, I'm doing this project where we are supposed to connect a javascript client side application/web page on server A with a python server side script on server B.
I need to get the output from the python script and store it into a variable but am running into some problems. I was trying to use XMLHttpRequest for this, and even though ...
I am working on a ASP.NET website that needs popups in a modal window similar to JS confirm and alert. How would I do this on client and/or server side?
...
I can't get it working anyone out there can help
I use this in the head
<script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" media="screen"/>
<script src="js/jquery.prettyPhoto.js" type="text/javascript"></script>
I use this for photos
rel="prettyPhot...
Hi,
I'm creating a bookmarklet that send data over to say, serverb.com when the user is browsing servera.com.
I obviously can't preform an AJAX poll, because of cross-domain policy issues.
I've been using ACD, but it doesn't work well.
How do I go about writing a bookmarklet that will open a (even invisible? or at least unfocused) popu...
For example, I have a php function:
function DeleteItem($item_id)
{
db_query("DELETE FROM {items} WHERE id=$item_id");
}
Then, I have something like the following:
<html>
<head>
<script type="text/javascript">
function DeleteItem($item_id)
{
alert("You have deleted item #"+$item_id);
}
</script>
</head>
<body>
<form>
Item ...
A client wants a merch shop on their site, and has set one up. I could iFrame in the whole page to the merch page, but frankly the merch site is an eyesore, and their site has a very particular feel to it. So I'm considering using an AJAX GET to grab the whole page, then javascript to display only the div with the merchandise in it. H...
Hi
I'm tryng to create a route planner to track my running routes. Using Bing Maps, I am able to create the route, but I'm struggling to remove to default 'beginning', 'end' and 'red circle' itinery icons.
Below is my code so far (based on this link). All I basically want is my own start icon at the beginning of the route and my en...
Is it possible o get the URI with javascript or is possible to break apart the href of the link and if so how, I am trying to run some ajax that has hover and click events and the method call for each ajax is the same so I need to be able get the unique ID that is passed in the URI.
...
After reading through nearly 100 posts on this site trying to find someone that asked something similar to what I needed I gave up and decided to just ask myself. Forgive the rest of this post as it will probably sound stupid to experts.. but here goes
I am trying to set up a sort of "live demo" for css styles that I create. The idea is...
I want the same functions to run for 2 jQuery objects: ('input[type="text"]') and $('textarea[type=text]'). How can I combine those two in the code below? (currently, only input is included).
$('input[type="text"]').focus(function() {
if (this.value == this.defaultValue){
this.value = '';
}
i...