javascript

When a user sets his focus in an input box can I set the regional language with JavaScript?

When a user sets his focus in an input box can I set the regional language with JavaScript? How would I do this? ...

Why does this javascript code prevent my browser from ever loading?

Hello. I'm learning javascript and jquery and have written a very basic script inside my file. I'm experiencing two problems... The browser never finishes loading the document, it just sits there with the loading icon animating in the tab. Any ideas? I can't seem to debug this using firebug. When I set a breakpoint anywhere in the ...

Iframe Link Question

I have an iframe on a page and there's a link inside the iframe. When user clicks on the link I want it to open in the current page (but not in the iframe), I want the current page to reload with the target of the link in the iframe. How can I do that? I hope there is some javascript or jquery solution because I need to achieve this in ...

Identifying the same user across multiple browsers/ISP connections

I run a film festival website which accepts ratings on films and I'm concerned with stopping people cheating the system (i.e. submitting multiple ratings to fix the top ten list). I've used techniques like IP address and browser stamp checking but I'm aware some people are trying to cheat the system by changing ISP connection or browse...

Javascript calling a java Servlet and return data help.

I don't have much experience with servlets and I've been going around in circles search for an answer to my issue. So it' time to get the experts answers! :) Overview: I need to get Javascript to call my servlet and return data to update the value on a form. I have a java servlet running in Glassfish V2.1 called DBGet, the purpose of ...

Does any one know a better way to get the handle of an opened popup window?

Problem: Need to get a handle of an already opened javascript popup window (handle = window.open(…)) from its opener window, multiple requests later after its opener (parent) window has been refreshed and javascript variables reset. For example, parent window could have javascript as follows: <script type="text/javascript"> var...

Need to go to a named link and execute a javascript at the same time

I have a hyperlink which goes to a named link. <a href="#question"> I needed it also to execute a Javascript so I did: `<a href="javascript:SomeFunction();#question">` which didn't work. I guess I have to jump to the named link from Javascript. How do I go to named link from Javascript? ...

How to do live concurrent editing?

I am trying to build a rails app that's basically just a text-editor (with some additional features I can't find anywhere else - which is why I'm building it) One of the core features is live concurrent editing, or real-time collaborative editing (whatever you want to call it). So far I have set up the site with a plugin called Juggern...

How can I return an AJAX-retrieved value to the parent function of the current function in JavaScript?

I have the following JavaScript (and jQuery) code: function checkEmail(email) { if (email.length) { $.getJSON('ajax/validate', {email: email}, function(data){ if (data == false) { // stuff } return data; }) } } I want the anonymous function to return data to t...

ASP.NET Server-Side Comments inside <script> Block

Hello, I know that you can create 'server-side comments' (they won't be sent as comments/text to the client) in ASP.NET (MVC) via the <%-- Comment --%> tags. However, I can't seem to do this inside of a <script> tag -- if I try this I get a bunch of code underlined in red, and weird unrelated errors ("Invalid expression term '}') etc. ...

Add the ability to search xml tags by either first or last name using Javascript

How do I add the ability to search xml tags by either first or last name using Javascript? At the moment it only works for first name. See code. <html> <head> <script type="text/javascript"> function createRequestObject() { var ro var browser = navigator.appName if(browser == "Microsoft Internet Explorer"){ ro = new ActiveXObject(...

How do you use Javascript to duplicate form fields?

For instance, I want to have a html form that looks like this: <table> <tr> <td>Field A:</td> <td><input type='text' name='fielda[1]'></td> <td>Field B:</td> <td><textarea name='fieldb[1]'></textarea></td> </tr> </table> What I want is to add a button that duplicates my entire above form, but changes the 1 to a...

JS: event listener for when element becomes visible?

I am building a toolbar that is going to be included into a page. the div it is going to be included in will default to display:none. Is there a way i can put an event listener on my toolbar to listen for when it becomes visible so it can initialize? or will I have to pass it a variable from the containing page? Thanks ...

Aligning Multiple Instances of JCarouselLite

I am using JCarouselLite to produce three scroll boxes on a website. 2 of the carousels line up properly (New, Gifts), but a third does not (BestSellers). The image floats to the left because the plugin keeps calculating the width incorrectly. All three have the same underlying HTML code, but I can't get the BestSeller Carousel to line ...

Twitter username input field text filtering.

Hi, Does anybody know how the username input field of Twitter works? In the registration form, if you type any UTF-8 character it will not be rendered. How is that done? ...

jQuery Binary Clock

Hi, I haven't worked with jQuery or Javascript really. Could someone please tell me how I would go about implementing this Binary Clock? ...

snapshot from browser with flash or javascript

Hi All, I saw a thread here suggesting using a HPA to take a browser screenshot, but I was wondering if you could help me. I would like to be able to select a part of a piece of a web page and render it as an image. I know flex can take images of its own canvas, but is it possible to take a picture of the rest of the page? I would like...

Javascript client side login, how to authenticate server side?

I'm looking for the best practice to pass secure data from client side to server side. For example, I have a client side authentication and sometimes I need to call private apis on the server side from the client side, but I need to make sure that user is authenticated/authorized to perform those calls on the server side, and right now...

mateo ...javascript

hi what happens is that I am making an Enrollment Form, and I have a text field where I need 2 comparisons, I assess the number of ICFES snp, and if prior to 2000 has 12 digits, and after the 2000 14 ... and I've tried and nothing ... restricts me when I'm older than 14. function verificar(valor) { var letras=document.form1.snp.valu...

Browser Plugin Detection

Anyone know how to determine if a particular plugin is installed on a user's browser? The plugin in question is AlternaTIFF. ...