javascript

Which programming languages are possible on Blackberry?

I may start porting an android application to blackberry in the next weeks. I have my problems understanding the RIM documentation of blackberry development. But I think I understand that I can develop an off line web application. An Application that runs in some kind of WebView but is written completely in JavaScript. Sadly I can't fin...

Identify the checkbox that is checked, in a group of checkboxes

Hello Everyone, I have 2 checkboxes in a form and onclick of these, some php code needs to be executed and based on the result of the code, the checkbox is checked or unchecked. So i have written onclick = document.formName.submit(); Now it is triggering the same page and i am able to write the code. I am not able to differentiate whi...

Dropdown is staying on the screen when I hit breakpoints in JavaScript files. Why?

I'm using Visual Studio 2008 Professional Edition SP1 & IE8. When I hit a breakpoint in a JavaScript file that's triggered when an item in a dropdown is selected the dev environment takes focus, but the dropdown list is still visible, hovering over the code. This makes it very unreadable! Does anyone have any idea what's causing this? Or...

Is this a safe way to reference objects in JavaScript?

If I were to define two objects myDataStore and myDrawer something like this: var myDataStore = function(myObjectRef) { this.myInternalObject = myObjectRef; }; var myDrawer = function(myObjRef) { this.myInternalObject = myObjectRef; }; And if I were to create an object like so: [[EDIT - Adjusted Object Creation to Ensure 'th...

How to trigger an event ONLY if both dropdowns are selected?

I have a dropdown select list on my page of class="TypeFilter". I have a jQuery event that fires when a value in that list is selected. $(".TypeFilter").change(function() { // Extract value from TypeFilter and update page accordingly )); I now have to add another list to the page, and I want to implement functionality which will...

Why is zIndex not working from IE/Javascript?

<!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" /> <meta http-equiv="X-UA-Compatible" content="IE=7" /> <title>Pr...

How do I hide an HTML element before the page loads

I have some JQuery code that shows or hides a div. $("div#extraControls").show(); // OR .hide() I initially want the div to be not visible so I used: $(document).ready(function() { $("div#extraControls").hide(); }); However, on the browser, the content loads visible for a second before disappearing, which is not what I want. ...

Save File using Greasemonkey

I have some screen scraped tabular data that I want to export to a CSV file (currently I am just placing it in the clipboard), is there anyway to do this in Greasemonkey? Any suggestions on where to look for a sample or some documentation on this kind of functionality? Just to be clear, I don't want to write to the local file system (...

Scrolling to selected element while typing on iphone safari virtual keyboard

I am building an iphone webapp and have a page with an input field. I'd like the field to scroll up to just above the virtual keyboard when it shows up. I've tried putting a scrollTo(x,y) on the input focus event (i.e. just before the keyboard shows up), but when I start typing the page scrolls up again (presumably based on the default m...

How to Trigger a Page(Not Redirect) With Javascript

Hi, I have a page and when a client use this page, Javascript code trigger Another Page. I dont want to redirect another page. Javascript must only trigger another page and First page continue to its working. this is imposible? ...

Google maps api - polygon mouseover

I am using google maps API v3 and have created several polygons on the map. I want the functionality that when the user hovers over a given area (polygon) the individual polygon changes color. Is there any way to do this? (Later I'd like to be able to register mouse events on the given area as well). thanks. ...

Test if JavaScript has been modified

I have coded a basic game in JavaScript and am working on a high score system for it, however as it is coded in JavaScript we all know it is incredibly easy to open Firebug or Chrome's Dev tools and edit the code. For example adding a multiplier to the score. Does anyone know either A) a way to check the JavaScript hasn't been modified ...

Can't create more than one overlay in Seadragon

Hi everyone, I am trying to add overlays to a seadragon map I am making but for some reason that I can not figure our seadragon ignores all my overlays except the first one. Any help with this is much appreciated. var viewer = null; function init() { Seadragon.Config.autoHideControls = false; viewer = new Seadragon.Viewer("co...

jQuery: Freezing/Disabling all events temporarily?

I have the following usecase: A div with some buttons When the user clicks on a button, a popup is shown and the background div is faded out to 0.5 opacity The problem is that when the popup comes in, the user is still able to click on the background buttons. At this point, I can remove the entire DIV temporarily but I don't want to...

Secure comunication Between a Web Page and the Server

I'm wondering if theres already a combo let say jQuery - Some C# DLL to proive a secure both way communication between ASPX forms with jQuery and a control layer based on ashx files with C# classes... [From comment below] Well I see I have to be more specific. The are things like sniffers on simple network analysis tools even like Fir...

How to connect to a secure FtP from my website/web application?

Hi, I'm working on making a website/web application that displays images every 5 or so minutes, kinda like a webcam. The images are uploaded to an SFTP server. How can I access those from the web? Does anyone have any recommendations for what to use as well? Right now I'm looking at PHP but have checked out javascript and ruby as wel...

Why does this JavaScript example point to the global object (Window)?

function F() { function C() { return this; } return C(); } var o = new F(); ...

Disabling input's whith jQuery not working

Hi, I am trying to disable some inputs using jQuery 1.4.2, This is a part of the HTML code: <input type="text" disabled="disabled" name="nume" value="Text" /> And jQuery: $('.salveaza').live('click', function(e){ $.get(ajaxURL, $('form', itemCurent).serialize()+' // This is the code for disabeling inputs ...

jquery .find to get the text in a <li>

So I have a series of 2 nested ul's. When you click on the text (which is in an a tag) in the li, my page makes that editable and adds a save button. clicking the save button needs to give me back the new text inside that li and the id of that li. The id is not a problem. I'm trying to use jQuery's .find to select that anchor tag (wh...

Javascript callback and google maps api question

I am using google maps api v3 and have an array of arrays object: MVCArray.<MVCArray.<LatLng>> I want to iterate over this. I see that MVCArray has a method forEach which uses a call back, but I have no idea how to use this (I haven't done much js). The api defines this method as follows: forEach(callback:function(*, number))) C...