I'm experimenting a bit with the new tag and I've already hit my first roadbump. I figured I'd start getting my feet wet by implementing a version of the classic board game Go/Baduk/Weiqi.
I've drawn the xy grid using moveTo() and lineTo(), and I've drawn a wood background using fillRect() that needs to be "under" that XY grid of cours...
I tried this:
<div style="display:block;">
<a href="/go" style="display:block;height:100%;width:100%;position:absolute;"></a>
LOTS OF STUFF HERE
<input type="button" onclick="runsomething();return false;">
</div>
But it doesn't work. It does click to follow the anchor...but the button also follows anchor, which I don't want.
Edit:T...
There are 3 buttons on a web page. On clicking each button a same popup window (say window1) opens up. Now there is another button on this popup window (window1), which further opens up to another popup window (say window2). On selecting some value from the 'window2', that value is passed onto the 'window1'. There is a 'Find' link on a '...
Hello.
function A() {
this.myProp = document.createElement("div"); }
function B(id) {
this.myProp.id = id;
document.body.appendChild(this.myProp); }
B.prototype = new A();
window.onload = function() {
new B("hello");
new B("goodbye"); }
What happens here is that I end up with one div with id "goodbye". What I wo...
Hi , I want to send a mouse event and a variable to a JS function from within my html code, i can send the event fine but the problem is sending the event AND a variable. I have included a stripped down version of what I am trying to do. The browser is chrome. Can anyone offer some advice please ??`
function mouseDown(e,w) {
var ctr...
Right now, the width of my DIV is 100%. It's great on mobile. It stretches, and it doesn't require the user to scroll left or right. It just "fits".
However, on a big monitor...the DIV is stretched out, and all the stuff on float:left are to the left, whereas all the float:right are all the way to the right!
I would like a style solu...
This is a JavaScript function for menu tree. I would like to add more sub-menu in it, not only one sub-menu. What's x.all[0] and x.all[2]?
var head="display:''"
img1=new Image()
img1.src="fold.gif"
img2=new Image()
img2.src="open.gif"
function change(){
if(!document.all)
return
if (event.srcElement.id=="folding"){
v...
hallo, can somebody help me. I try to make some thing happen when i click on anders(value 0), than something need to be vissible. It works in firefox but not in IE
<select id="budget" name="budget">
<option value="0" onclick="anders('1')">Anders</option>
<option value="200" onclick="anders('');" selected="selected">€ 200,-</option...
Hi SO,
I am trying to learn JavaScript but I've come across a hurdle. If the answer is obvious and reachable through a simple search I apologize in advance. I am a novice to programming and JavaScript, and unsure what line of inquiry to follow.
In the following code, the function takes values from a HTML form, does some processing and ...
I have an array of objects in javascript, each of which in turn has an array:
{
category: [
{ name: "Cat1", elements : [
{ name: name, id: id } ]
},
{ name: "Cat2", elements : [
{ name: name, id: id },
{ name: name, id: id },
{ name: name, id: id } ]
...
I need to compare a textarea to make sure:
It's not ONLY SPACES and not ONLY RETURNS(new lines) and NOT ONLY a combination of these two.
However, if there are more than 3 characters OR numbers, then it is okay.
Not more than say 2000 characters.
Imagine a textarea, I don't want the form to submit if the user have pressed enter (new l...
All,
Is there any tool to add line numbers in jquery to a textarea.
Thanks..
...
I am trying to understand how the JavaScript running in the various browsers determines the locale that will be used by the JavaScript Date object when using the method toLocaleString.
I have changed the language and locale settings of my system through windows control panel and I have also changed every browsers language settings to t...
Hi! I'm having the difficulties with calculating distance between several points on the map:
I have an array of coordinats where the first coord ["30.327547", "59.919676"] is the begining of the trip and other are pit stops:
var J = [
["30.327547", "59.919676"],
["29.84964", "58.737619"],
["28.250252", "57.785994"],
["3...
I want to be able to package my JavaScript code into a 'namespace' to prevent name clashes with other libraries. Since the declaration of a namespace should be a simple piece of code I don't want to depend on any external libraries to provide me with this functionality. I've found various pieces of advice on how to do this simply but non...
I have an application which use some javascript functions,
As all javascripts include in Masterpage, most of them which comes withpage are not necessary, and some of those are repeated ( cause used in some different JS file. )
So I want to check if there is a way to determine duplicate functions and remove them ?
...
I have a large scale application which uses javascript for many reasons. these javascript files included in some JS files and JS files imported to Asp.net Masterpage files.
this JS files contents (javascript functions) will add to page when page display to user, so a Bunch of waste Javascript functions will include in Asp.net pages.
I'...
Possible Duplicate:
Can somebody explain this Javascript method ?
(x = [].reverse)() === window // true
Any idea why?
...
Hi,
I'm trying to work with openstreetmap through openlayers, and I have encountered a biit of Javascript syntax that I don't understand (I'm no expert with Javascript - just beginning to learn how it handles objects at the moment...)
Here it is anyway...
map = new OpenLayers.Map ("map", {
controls:[
new OpenLayers.Control.Navigati...
Hello.
I have my integrated my site with phpbb, so you login into phpbb, and then you will be able to see my site, so I do not use normal sessions, so I do not know how to do this.
My site is a design at index.php, and then I have an insert.php inside a frame. Now at my index.php, I want to receive a message, and at insert.php, I want ...