javascript

Image viewport with zoom in Javascript

I want to display a huge image inside a viewport in a html page. I would like to be able to drag and drop the image to move it inside the viewport, like in Google Maps. Any library where I can find such component? Thanks in advance ...

What is href=javascript:;

in a code which i am goin through there is a link has href=javascript:; in code.when it is clicked it opens a lightbox to show some msg with close button.how is it done.I think this uses dojo ...

Mapstraction: Changing an Icon's image URL after it has been added?

I am trying to use marker.setIcon() to change a markers image. However it appears that although this changes the marker.iconUrl attribute the icon itself is using marker.proprietary_marker.$.icon.image to display the markers image - so the markers icon remains unchanged. Is there a way to dynamically change the marker.proprietary_marker...

Javascript pushing object into array

Hey, I currently am having trouble trying to get this to work. Here's a sample code of what I am trying. A lot has been taken out, but this should still contain the problem. I have an object, user, and an array, player. I am trying to make an array with the players in it, here: function user(name, level, job, apparel) { this.name = nam...

How to open multiple browser windows on request? (PHP)

So I have a form on PHP/HTML page. User submitss it to that same PHP/HTML page. So now PHP page I will have $_POST data. I want to when page is refreshed opnt some popUp browser windows which url's will be relative to users POST request. like www.example.com/bal-bla-bla.php? id=$_POST['StreamId'] ...

jQuery tooltips on a dynamically generated page.

Him I'm trying to add a jQuery tooltip to a dynamically generated list, the text I want to display the tooltip on is in a table, so my CSS tooltip doesn't work: CSS tooltip. I tried to add this jQuery tooltip to the page, it works on my local test page, but I think the problem has something to do with uniqur ids, and I'm not sure how t...

console.log is not working in Android 2.1 emulator

i'm running one web application... in android emulator browser in one java script file i trying to output some string as console.log("android"); but i didn't got this log using adb logcat even i tried to start adb logcat firstly and then tun the app. but didn't got log message which i used in console.log is there any way so i can ...

javascript namespace issue (I think)

Hi, I've been making a jQuery plugin for password boxes. It adds a generate password button and strength indicator to inputs that are passed to it via a jQuery selector. I'm having an issue with the code on lines 154 & 155 of jquery.password.js inputPassword.position().top. It's not returning the correct position of the input box, so t...

NULL parameter on javascript call to webservice

I've been following this example from IBM to call a java web service from javascript in an html page http://www.ibm.com/developerworks/webservices/library/ws-wsajax/ a small code snippet to show the communication with the webservice is: var call = new WS.Call('http://localhost:8080/MICE_Server/MapEditorService'); var nsuri = 'http://W...

Get Value from thick box control

I have hidden field on thick box, when I close thick I need to get the value of my hidden field, when close thick box this method calls function tb_remove(parent_func_callback) { parent.document.getElementById('hdf').value// I need value of hidden field here please tell me how can I get hidden field value that is on thick box? e.g ...

Javascript replace last occurence of text in a string

Hi all see my code snippet below: var list = ['one', 'two', 'three', 'four']; var str = 'one two, one three, one four, one'; for ( var i = 0; i < list.length; i++) { if (str.endsWith(list[i]) { str = str.replace(list[i], 'finsih') } } I want to replace the last occurence of the word one with the word finish i...

Switch statements: do you need the last break? (Javascript mainly)

When using a switch() statement, you add break; in between separate case: declarations. But what about the last one? Normally I just leave it off, but I'm wondering if this has some performance implication I'm not thinking about? I've been wondering about this for a while and don't see it asked elsewhere on Stack-O, but sorry if I m...

javascript get text at mose postion

How can I get text at mouse position? I have now some like this document.body.onmousemove = function(){ //todo:Get text at mouse position } ...

JS function returning another function

I want to understand about variables, that has been used in returning function. This is example code Prototype = {} Prototype.F = { bind: function() { var args = arguments, __method = args.shift(), object = args.shift(); return function() { return __method.apply(object, args.concat(arguments)); } } } func...

Javascript scrolling, XHTML Doctype, IE6 - IE8 and a coronary

I've been working for hours on this and I can't figure it out. I've got a setup that pulls some coordinate data into javascript and parses it into an interactive map (using canvas {and excanvas for IE6 users}) on the browser for the user. Everything is working fine except for one problem: when hovering on the map after scrolling down th...

How to make pop up blockers allow your popup windows?

How to make pop up blockers allow your popup windows? ...

Javascript problem with iframe that's hidden before loaded

I have a page that contains an iframe that gets loaded using Javascript: index.html <iframe id="myFrame" width="800" height="600" style="display: none;"></iframe> <div id="loader"><!-- some loading indicator --></div> <script type="text/javascript"> function someFunction() { var myFrame = document.getElementById('myFrame'); var lo...

Generate MetaData with ANT

I have a folder structure that contains multiple javascript files, each of these files need a standard piece of text at the top = //@include "includes.js" Each folder needs to contain a file named includes.js that has an include entry for each file in its directory and and entry for the include file in its parent directory. I'm trying ...

JSP Javascript upload file

I'm developing an web app with jsp,servlet in server side and javascript in client side. How can a i upload multiple files(images) to the server(and save them to the db)? ...

making check boxes clickable once in javascript?

Sorry but im an absolute noob with javascript. Ive made a form for a simple quiz but cant figure out how to make radio's only click once. I can select two or three buttons as my answer. i want to change this. <form name = "Beginners Quiz"> <p>Film speed refers to:</p> <p><input type="radio" name="Answer 1" id="Answer1" value = "a" on...