javascript

Protect Greasemonkey scripts?

I know that anything that is downloaded and is in the user's possession is going to be pretty hard to protect, but I'm just wanting to hear opinions. I'm thinking of selling a script (made with Greasemonkey...), and I want to be able to prevent the user from easily viewing the source code, or sending it to others. Thanks in advance. ...

how to get all Overlays via KmlLayer class on google-maps-v3 not noly when someone click .

i follow this article ,and the code is : var myLatlng = new google.maps.LatLng(40.65, -73.95); var myOptions = { zoom: 12, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); var nyLayer = new google.maps.KmlLayer('http://www.searcharoo.ne...

can Google AJAX Feed API support geo-rss or geo-atom .

i want to load geo-rss using google ajax api , but can it load geo-rss ? thanks ...

Is there a Javascript library to draw electrical circuit diagrams?

I'm looking for an open-source Javascript library that can draw electrical/electronics circuit diagrams in a modern (HTML5) browser - is there such a thing? It should have typical circuit elements like resistors, voltage and current sources, capacitors, etc. Thanks in advance for any help. ...

How to create GoogleMap marker auto update?

I'm working on mvc project which include Google map inside My system allow user to send tweet to system and keep it in database then will show tweet on the map what i need to do is "Auto update marker on the map when system get the new data" any suggestion? thank you very much ^^ ...

How to display/sort specific divs based on user choice.

Sorry if the title doesn't accurately describe what I'm trying to do. I'm a novice at all this to say the least! To help you understand what I'm trying to accomplish please read the example below. I have a list of divs, each of which may have a series of "tags" as I'll call them. For this example I'll use Red, Blue, and Green as the pos...

Break out of function within enumarable.each iteration

I have a Prototype class - within the class i call a function and within this function i do en enumerable.each iteration. If an element within this iteration fails a check i then call another function which then re-calls this same function later. Can i break within this iteration so not only the iteration is ended but nothing else within...

Check for bool is checking for an object instead

I've created this utility method in JS: function IsAuthenticated(userID) { var isAuthed = false; if (userID.length == 0) return false; // more logic if(SomeLogic) isAuthed = true; return isAuthed; } When I run something like this, I'm getting an object back rather than type bool: if(IsAuthenticat...

Showing FBML using new Facebook js lib

I'm using the new facebook js lib for a facebook connect site. (The one that uses FB.getLoginStatus instead of FB.Connect.get_status ) And suddenly all of my fbml has dissapeared... The documentation says nothing of the new js lib, only the old one. my html tag has the attributes ' xmlns="http://www.w3.org/1999/xhtml"xmlns:fb="http:...

JQTouch won't play linked mp3 files

I'm trying to use JQTouch to make a basic mobile site to play a list of audio files. I'm trying to make a simple playlist of tracks to be used in an art exhibit here at school. Sort of like those walking tours you may have seen. When I link to an mp3 file in an unordered list the browser doesn't open the file and start playing it. It sim...

is there an api for something like this?

i have seen this and i wanted to know if there is any open source web based thing, which has similar functionality. cool would be a JS api/library :-) thanks in advice UPDATE sorry for that, didn't know that German sites are so awful to you :-D it's about a tool where you can place peaces of furniture into a taken photo, as if it wou...

Fluid image resizing in CSS (or JS?)

I'm trying to show a fairly large image on a page on my site. I want it to be re-sized dynamically depending on the user's resolution, so that it takes up the same percentage of screen on every monitor. How would I do that? ...

Offline / Online Data Synchronization Design (Javascript)

Hi All, I'm currently in the process of writing an offline webapp using all the html5 goodies for offline support. However I'm starting now to think about writing the sync module that will ensure that any offline data gets sent to the server and server data back to the client. Now I'm sure this has been done before, I mean its a prett...

What is the jquery equivalent to: document.forms[0].elements[i].value;

What is the jquery equivalent to: document.forms[0].elements[i].value; I don't know how to travel through a form and its elements in JQUERY and would like to know how to do it. ...

Setting bottom affecting scrollTop

So, there's this problem. I have a <div> that is absolutely positioned, and inside of it, I have 2 more <div>s, also absolutely positioned. One has overflow, so it can scroll. The other is a box that pops up below it and shows information about an item selected in the scrolling <div>. It sorta looks like this: +---------------+ +--...

Button to Copy a Text Box

I need a simple script that gives me a button that when clicked will copy the contents of a text input box to the clipboard. Or it could be a script that when you click on the text input box, automatically copies the contents to the clipboard and displays a "Copy" message next to the text input box. I've seen them all over the web, but...

strange javascript problem

I see a developer using this in my site window.setTimeout("pg.init()", 10); problem is that when I click once on the record set it works fine. However when I click on the record right away all I get is the hour glass. However if I wait and then click, it works again..what could be wrong. Any suggestions? thanks ...

QWebView - dealing with javascript infinite loop

web_view_crash.py import sys from PyQt4.QtGui import * from PyQt4.QtCore import * from PyQt4.QtWebKit import * app = QApplication(sys.argv) view = QWebView() view.settings().setAttribute(QWebSettings.JavascriptEnabled, True) view.load(QUrl('infinite_loop.html')) view.show() app.exec_() infinite_loop.html <script> while(true) { ...

jQuery Click Table Row Toggle Section

I have the following markup (which I have no control and must remain as is, however the JavaScript can be manipulated.) http://jsbin.com/uyifu3/edit What I'm trying to accomplish is that when the table row is clicked the the "Toggle Me Here" link is automatically clicked. I keep finding my self getting into a recursive loop with the...

Dojo with application/xml+xhtml content-type

How can I get Dojo Dijits (1.5.0, currently) to work with XHTML as application/xml+xhtml? It works if sent as text/html, but application/xml+xhtml is required. This seems to be tied to dijit.form.DatePicker and a few others. This isn't a matter of validating against W3C, it just plain doesn't work, at all. Error: mismatched tag. Expec...