Grab The Tiles Position Which Is 32x32 Each Tile?

Sep 17, 2011

In my javascript code im able to grab the tiles position which is 32x32 each tile. When I enter this tile I want to be able to grab the pixel position that the mouse is at inside the tile. For example "[TileX]:[PixelX],[TileY]:[PixelY]".

View 1 Replies


ADVERTISEMENT

Grab The 'this' Keyword Position

Sep 8, 2006

Is there a way to find which element in an object array the keyword 'this'
is acting upon?

For example:

function doMe(){
var aTags = document.getElementById("list").getElementsByTagName("a");
for (var i=0; i<aTags.length; i++) {
aTags[i].onclick=function() {
this.className = "myClass";
}
}
}

Inside of this function is there a way to determine where in the array this
'this' is and return the integer?

var theID = this.somethingOrOtherThatWouldGiveMeTheNumber;
var elementID = document.getElementById("myDiv"+theID);

View 4 Replies View Related

Google Map Tiles Not Loading Correctly?

Apr 8, 2011

I'm using the Google Maps API (v 2) to display my phones last known location on a map. On this 'bare bones' page, the Google Maps tiles load correctly, without any jerking:

[URL]

However, on my customised page, the tiles jerk and slide around (try dragging the map and zooming out). This is particularly evident on Safari and Chrome.

[URL]

I'm not entirely sure how to fix it. The Web Developer script analyser is not returning any errors and I'm really at a loss to understand where I'm going wrong!

View 1 Replies View Related

Tile Background Changing?

Nov 22, 2010

i creating a 'map' for my game. I've got a 13x13 tile layout and using PHP I've loaded all the tiles.What I'm looking to do is grab all the tiles whose class names are 'water' and create a loop that'll change their background every second between four possible images.

View 1 Replies View Related

Java Script To Tile Windows Veritaclly

Jul 20, 2005

I have the following line created in Notepad. I saved it as a js file and
the icon shows it as a javascript file. It is supposed to tile all open
windows when I run it. The first time I run it I get an error in character
1, so I delete the open parentheses and then get another compile error when
I run it. Can somebody make this work for me?

(new ActiveXObject("Shell.Application")).TileVeritcally()

View 18 Replies View Related

JQuery :: Create An Image Tile Effect?

May 5, 2011

How to create an image tile effect, does anyone know any way, or how it works?

View 13 Replies View Related

JQuery :: Windows 8 Tile Type Interface?

Sep 14, 2011

im not new to jquery but have limited skills. I wonder if anyone has seen any plugins or sites that have a similar interface to the new windows 8 interface...or indeed that windows phone. Interested in building a tile based site.

View 2 Replies View Related

Geolocation - Automatically Load Position As Position A Then Choose Position B From A Dropdownlist

Nov 23, 2011

i,m trying to make a map who show me as position A and a target adress as point B.I have made it so i can choose adress a and adress b from a dropdown but i want to automaticly load my position as possition A then choose position B from a dropdownlist. How can i do this ?

[Code]....

View 2 Replies View Related

JQuery :: Opening Other Window And Then Reading Its Tile Or Content?

Dec 14, 2011

I need to to open a survey page to users who has not anwseredthe survey yet.The survey is in the same domain / path than the main page.If users has allredy anwsered the survey, the page opens with title "Error" and there is error message in the body.I can open the new window from the main page, but I do not know if it is possible to read the title or document content of the new window.I can not edit the survey page to put code there.f I could determine with an if question, did the survey page open to the survey or the error page,then I could close the page or close the main page to bring the survey on top.Is this possible to do?

View 6 Replies View Related

Build Tile Base Game Engine Using Java ?

Jan 20, 2009

Ideas on Java script Tile base game engine. You know.. with click to walk (or keyboard), inventory, grab items, talk to people, exp, levels, etc.

View 1 Replies View Related

Swapping A Solid Color Tile For An Image File In Game Map Background?

Nov 18, 2011

I've created a javascript version of the classic game SOKOBAN. Basically what happens is you move the man around the "warehouse" and he must push the boxes into the target area. Copy the code and try it yourself to see what I have so far (note-he can't move the boxes yet).

My question is: Right now, my map consists of solid color blocks. What I WANT them to be is image files (for example: box.png, wall.png, floor.png) to add a little versatility and life to the map. I am not sure how to make this switch though. I suspect I make the change somewhere in the tile array in the initialize function, but I am not sure what..

Also, how can I get the boxes to actually MOVE? I.e. when my man pushes them, they move around in the direction he pushes?

View 3 Replies View Related

Resolved With Google Chrome (position:fixed Horizontal Position:absolute Vert?

May 13, 2010

I'm new to javascript and am not sure why this works in firefox and not chrome. I am trying to create a script that keeps an object fixed horizontally while bing positioned absolute vertically. if I replace the toPP variable in document.getElementById('fire').style.top = toPP; with say '50px' it will move the element down 50 pxs, but how I have it currently it doesn't do anything in chrome

<script type="text/javascript" >
window.onscroll = function()
{
if( window.XMLHttpRequest ) {
var x = 0 -document.documentElement.scrollTop;
var toP = String(x);
var toPP = toP + "px";

[Code]...

View 7 Replies View Related

Grab Elements Of DL (2)

Sep 4, 2006

I wonder if someone could tell me where I am going wrong with this script.
The original implementation of finding a DL list and separating it by dt |
dd groups and making new DL's from them worked good. It found only one DL by
getElementById.

The problem I am having is now to process multiple lists in which are found
now by a unique class name on the DL instead of getElementById and only
processing one DL. I'm not really sure how to explain where I am going wrong
but here is the code....

View 8 Replies View Related

JQuery :: Set Background Position To Position Of Parent

Aug 11, 2009

#navigation li is the parent element, which is positioned relative.The ul element above that is also position relative. I previously tested a click function and was able to confirm I was getting the correct position back, so now I just need to set the CSS property correctly for all of those links.The reason I want to do this is I have a set of links that appear over a photo of a city skyline. When you hover over those items, I want them to be given a background image that is a blurred and lightened version of the same photo so it needs to line up (sort of like the tabs are made of frosted glass).

View 1 Replies View Related

Can't Grab Remote Content

Sep 20, 2006

I have a PHP script that displays my online status and shows a window
if I am online, or doesn't show anything if I am offline.

I'd like to include the content of this remote PHP file inside a web
page using JS. I have created an xmlHttpRequest script to do that but
it doesn't work as expected... It should work just like the status.php
file, but instead, the content doesn't show up in IE, and in Opera, it
it stuck in the upper-left corner...

View 1 Replies View Related

JQuery :: Grab Value Passed In From URL?

Apr 26, 2011

I'm trying to grab a value passed in from a URL, i.e:
test.html?foo=bar
And I would like to grab the "foo" entry, with the value passed in. I'm guessing this can be done, but I can't find a way?

View 3 Replies View Related

JQuery :: Grab The ID Of A Selected DIV?

Apr 27, 2011

I'm trying to use the "selectable" feature - and need to find the IDs of the DIVs which have been selected. When I run the code below, all I keep getting is the ID of the first DIV in the selectable DIV (ie. 2011-01-01).

<!
DOCTYPE html>
<html lang="en">

[code]....

View 1 Replies View Related

JQuery :: Trying To Grab Some Data?

Nov 20, 2011

I am printing some info to a page when it loads echo'ing via PHP/MySQL and here is one div:

<div id
="0058><b title=
"unflattering
woman's

[Code]...

View 3 Replies View Related

Possible To Grab GET Data Form URL?

Dec 4, 2009

I want to be able to grab variables from the GET data in a URL....

so I have index.php?var1=test&var2=test2

How can I use javascript/jquery to get those variables? Is there an easy way without using split and whatnot? How can I do this?

View 1 Replies View Related

Use Script To Grab Keyword?

May 28, 2009

Would like to check if there is anyway where i can use javascript to grab the keyword of .doc and .pdf file.

because when i right-click on the files, and click on properties. there will be a tab at the top (Summary for .doc and PDF for .pdf), and upon clickin there will the description, author and keywords. so im just wondering if there is any way to grab the value?

View 2 Replies View Related

Grab The URL For The Page That Sent The User?

Jun 23, 2009

Is there a way to grab the URL for the page that sent the user? I have links coming in from several pages and would prefer not to create a separate back link for each one... is there a way to do this dynamically?

View 7 Replies View Related

Grab Certain Data From A String?

Aug 27, 2009

I have a data like the format below. How would I only extract the following data: meet, run into, encounter, run across, come across, see (The data after "Sense 1" and stops before the next "Sense #"?code...

View 3 Replies View Related

Grab All Text Between <START> And <END>?

Jun 23, 2010

I am trying to grab all text between <START> and <END> and have the following bits of code, but neither are returning anything. I use JS so rarely that I can't see where the problems are -

var ermtext = response.match(/<START>(.*?)<END>/i);
if (ermtext) {
result.ermtext = ermtext.replace("$1");

[code]....

View 4 Replies View Related

Grab Elements Of DL ( Definition List )

Aug 30, 2006

I'm trying to grab all of the elements of a DL, specifically the <a href>'s
grouping them by the DD's. I suppose if I can just get them into groups I
can get the href's later. The hard part is getting them grouped as explained
below. For example...

<dl id="dlList">
<dt><a href="#2">DT Item1<span>(1)</span></a></dt>
<dd><a href="#">DD Item1<span>(2)</span></a></dd>
<dd><a href="#">DD Item2<span>(1)</span></a></dd>
<dd><a href="#">DD Item3<span>(1)</span></a></dd>

<dt><a href="#1">DT Item1<span>(1)</span></a></dt>
<dd><a href="#">DD Item1<span>(1)</span></a></dd>
<dd><a href="#">DD Item2<span>(1)</span></a></dd>
</dl>

Is there a way to say, loop through the DL until it finds a DT. Whe it finds
one, grab it and all of the DD's that immediately follow it .. until it
comes to another DT. Group it with its DD's and continue until no more DT's
are found.

Then maybe take these collections and possibly populate an array with the
groups?

View 11 Replies View Related

JQuery :: Load(), New Content Is Not Available To Grab?

Mar 16, 2011

I am using the load() method to load navigation sections of hidden copy, which I will later grab and display. After the hidden copy loads, I am grabbing selected divs, and bringing them into an area where the copy will be displayed. My problem is that after I load the new copy, replacing the old copy, and I go to retrieve it, it gives me the old copy still (eventhough firebug shows me that the load() actually did bring in and replace the copy...so it's grabbing and displaying copy not even in the file anymore!) Why is this happening? the code is below.link to example: http:[url]....

$(document).ready(function() {
$('#showcase_holder ul li:first').addClass("in_view");
$('#project_navigation ul li a').click(function(){[code].....

View 3 Replies View Related

Grab User Input From A Form?

Jun 17, 2009

I need to grab whatever the user types in an input box and append it to the URL the page is going to, how do I do that?

javascript:var cbobject= document.searchCatForm.inp_searchCat.value; alert(cbobject);

Code:

<form id="searchCatForm" name="searchCatForm" action="catalogue/search?input=" method="post">
<div class="searchField">
<input id="inp_searchCat" name="inp_searchCat" value="Search catalogue"

[Code]....

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved