javascript

Get DOM Element of a marker in Google Maps API 3

Hi, I'm trying to find a way to get the DOM element of a marker. It seems that Google uses different elements for showing a marker and one of handling the event. I've figured out 2 things so far. There's an generated variable called fb that holds the DOM element on a marker object, but I think the next time Google updates the API, it...

Rows & cols SUM

Hello, i have a really complex query (mysql + php) and i would like to know the easiest way to sum columns and rows of a table apart from using SUM(x). Maybe a javascript could help. Thanks in advance. ...

Prototype get all img tags in div named slideshow

I am new to prototype and scriptaculous and I am trying to get all of the tags in my div with an id of slideshow. How can I put these in an array? ...

Linear Fit to Planet Positions

An astounding alignment occurs 2048/5/28 with the inner 5 planets having heliocentric longitudes (in degrees): 248.229, 66.631, 246.967, 249.605, 67.684. The planets are at most 0.875 degrees from the line (through Sol) with slope 67.823 degrees. In this case, the method sought (PA) would give: PA(248.229, 66.631, 246.967, 249.605...

Javascript in PDFs

Thanks in advance. I am currently creating a PDF document which has fields on it which I'd like to post into an aspx page. Now this bit I have working successfully using a button with the added behaviour 'Submit Form'. I want to tweak this so before the form is submitted a confirmation message pops up, clicking no will abort the for s...

Jquery Coda Slider Help

please help me with my code, <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Build Slider</title> <style type="text/css"> ...

How do I write my script for each link I want to redirect

So I'm trying to redirect users from html links and element id tags, to other pages with javascript. I've figured out how to do one singular redirect but having trouble writing the code for multiple links heres what I have so far: HTML: <head> <script type = "text/javascript" src="script2.js"></script> </head> <body> <a hre...

Javascript: Hijack Copy?

I was just reading the Times online and I wanted to copy a bit of text from the article and IM it to a friend, but I noticed when I did so, it automatically appended the link back to the article in what I had copied. This is not a feature of my IM client, so I assume this happened because of some javascript on Times website. How woul...

How i can mark function as "private" to renaming it by Google Closure Compiler?

I have private function createSomething(): function Player(id) { /** * Creates stuff * @private */ this.createSomething = function() { // do something good }; } and i want to see renamed function "createSomething()" after compiling source by Google Closure Compiler. Yes i know about ADVANCED_OPTIMIZATIONS but it ...

How to define a common variable in javascript Class that can be used across instances?

I want to define a single variable used among all instances in the Class definition(which is a plain function constructor in a jQuery plugin). Is there such a feature? If there is,just a simple demo and I think I'll understand. ...

Use CSS (and maybe JavaScript) to make an element be square (or maintain a specific aspect ratio)

I have a div that I want to have the following characteristics: Width = 50% of its parent element Height equal to whatever it needs to be in order to maintain a certain aspect ratio. I need to use percentages because the object will resize left-right when the browser is resized. I want the object to be resized top-bottom to ensure th...

how to use java to get a js file and execute it and then get the result

Hi friends, How can I use java to get a js file located on a web server, then execute the function in the js file and get the result and use the result in java. Can you guys give me some code snippet? Great thanks. ...

retain text box value on window.location

I have a form as follows: <form name="donation_form" action="" method="post" target="_self"> <select name="donationType" onChange="window.location='?page=donate&amp;donationType='+donation_form.donationType.value;"> <option>--Select--</option> <option value="a" selected="selected">a</option> <option value="b" >b</option> <option value...

Creating nested elements

I am attempting to dynamically create the following using data from an array <li><a href="#" class="red" id="5"><span>Some text</span></a></li> At the moment, I'm creating it in a rather simple way var link = '<li><a href="#" class="' + this.cssClass + '" id="' + this.id + '"><span>' + this.text + '</span></a></li>'; $('#options')....

Javascript keyboard in iphone

Hi, Is anyone who help me for my iphone application in which i am using javascript keyboard over the text area i want to know that is there any way to remain enable the javascript keyboard after pressing the return key,and the cursor should move to next line without hiding the javascript keyboard. Thanks Ramel singh Rana ...

Javascript multidimensional object with unexpected properties

Working in javascipt, I'm initialising a multi dimensional object (which itself is nested several Objects deep). However, when looking at the properties of the child object it has unexpected properties, the first one being "fromBase64". This happens when using the IE6 browser and the TIBCO GI framework, but the object is independent of a...

Voodoo magic interfering with my javascript, I am going crazy.

Alright, so everything on this website was finished, it all worked, it displayed right enough across all the browsers. For some reason one of the pages isn't styling at all, and the javascript isn't running. The crazy part about this is that every page uses the same CSS file and the same JS file, and the code used across all of them to i...

Delete unclosed tag elements via jQuery

Hi Everyone, Say I have element sequence like below : <div style="margin-bottom:9px;line-height:normal;margin-top:4px"></div> <div style="margin-bottom:9px;line-height:normal;margin-top:4px">Something Here</div> <div style="margin-bottom:9px;line-height:normal;margin-top:4px"> There are unclosed elements below and I want to delete th...

Using key/value pairs for jqGrid cell data

I have a jqGrid defined as such: $("#tableFeedbackReports").jqGrid({ url: '/FeedbackReports/GetFeedbackReport', datatype: 'json', colNames: ['ColA', 'ColB', 'ColC', 'ColD'], colModel: [{ name: 'ColA', index: 'ColA', width: 60 }, { name: 'ColB', index: 'ColB', width:...

help neede for implementing a button action in html page

sir, problem analysis: when i m clicking a submit button of my html form the function related to the button is called and it does its work.after completing the work a mail notification is sent which is consuming too much time.after that a confirmation message is displayed on the same html (without using ajax i,e page is refreshed). my...