javascript

Jquery.tabs: How do i use it with ASP.NET MVC

Hey Im trying to use Jquerys.tabs control. I dont see the logic. If i use PartialViews i migth as well wave goodbye to my Controller/Action logic, but then i would have to make ascx files, and i can't call those from my Controllers, or can i? Im not nessesarily interesseted in the ajax/unload onclick part, that Jquery.tabs() offers. I ...

jQuery password strength checker

I'm quite new to jQuery, and I've written a simple function to check the strength of a password for each keypress. The idea is that every time a user enters a character, the contents is evaluated to test the strengh of the password they have entered... I'm sure everyone has seen these before. Anyhow, the logic I have used is that no pa...

loading xml for safari (now not working in ie)

Hi, I have been having problems getting my xml to load in all browsers. I have finally got it working in safari but now it is not working in IE. Has anyone got any solutions? Thanks function displayResult() { var xmlRequest = new XMLHttpRequest(); xmlRequest.open("GET", document.getElementById('tracklisting').innerHTML, fals...

What client web GUI technology to chose Flex or dhtml/JavaScript ?

hello all im standing and trying to decide which client web GUI to chose flex or js/dhtml ( one of the frameworks or combination ) i need to build front end to system that user can edit some kind of book format that involved images and texts and i really don't know what is better . for user experience and easy development ...

simple java script job

Hello, I need a very simple Javascript on a html page, that will do the following.. Display a text like: This is a string of text and can be long then if you mark some of the text with your mouse, the selected text should be inserted and automatically updated into a text field How can i do it? ...

IPv6 address validation and canonicalization

What libs have you used for that? How compatible are they with one another? Or did you write your own parsing routine? I'm particularly interested in mutually-compatible implementations for Java, C++, Python, and JavaScript, which support: zero compression ("::") IPv4-mapped addresses ("::ffff:123.45.67.89") canonicalization (includ...

What is the problem in this JavaScript code?

var urlname= '/a/b.php?company_name='+company_name+'&series='+series; document.getElementById('frame2').innerHTML='<IFRAME HEIGHT="600px" WIDTH="100%" NORESIZE="NORESIZE" SRC="'+urlname+'" NAME="aol" FRAMEBORDER="0" ALIGN="ABSBOTTOM" scrolling="no" id="a1" name="a1" onload="Javascript:heights('a1')"></IFRAME>'; I'm using this code but ...

Markers in google maps

I'm currently loading a map with the following javascript. google.load("maps", "2.x"); // Call this function when the page has been loaded function initialize() { var map = new google.maps.Map2(document.getElementById("map")); map.setCenter(new google.maps.LatLng(52,-3), 13); var point = new google.maps.LatLng(52,-3...

jQuery autocomplete problem: how to handle 'Not in list' case.

Let me clarify: I'm using standard jQuery autocomplete plugin (bassistanse.de) and bind it to a KeyValueCollection serialized to JSON (ASP.NET MVC). All works fine, except I want to be able to notify user when he/she types in a value which isn't present in DB, i.e. value not in list. What are possible ways of solving this? Ideally, I w...

Search for embedded email and phone numbers

I need to use a javascript form validation routine to scan various input text fields for embedded phone numbers and email addresses. This is for a classifieds system that is free to post but 'pay to connect' with buyers, so the intent is to prevent (as much as possible) the ability for users (those posting the ad) from simply embedding t...

Setting priorities on HTML Events

We have a Web system that uses a combination of OnBlur and OnMouseDown events. Unfortunately, for a strange reason the OnMouseDown event handler is being triggered before calling the OnBlur event handler. This is not what we want. Instead, we want to always call the OnBlur event handler prior to calling the onMouseDown event handler. I...

Get max viewing distance from current zoom level with Google Maps API

When loading some directions the map adjusts to the appropriate zoom level. Then I request for several markers in the database within a certain radius from the map's center. How do i get the correct radius value depending on the current zoom level? This value should be the real distance from the center to the edge of the map. Thank...

what's the exact way to get the position of an element?

related to browser window's upper left corner of client area. ...

plain javascript code to highlight an html element

to debug some javascript code, I am looking for javascript code (preferably just js, without libraries and dependencies) that can highlight a div or span (probably by putting over it a div or span of the same size and shape with a bright color and some transparency). I pretty sure it can be done, but I don't know how to start. CLARIFIC...

JQuery Development Standards

I'm looking into development standards fro JavaScript. I had previously used Doulgas Crockfords Javascript standards and JsLint . However now I'm making more use of JQuery I'm looking for something that is more Jquery oriented as well. Ideally a sensible checklist and an automated tool to validate. However realistically just a set of se...

jQuery code optimization

I have jQuery code which looks something like this on Button1 Click $('table.result_grid tbody tr') .filter(function() { var chkbox = $(this).find(':checkbox')[0]; return !chkbox.checked; }) .show(); on Button2 Click $('table.result_grid tbody tr') .filter(function() { var chkbox = $(this...

ASP.NET and Firefox: why doesn't clicking on a GridView ButtonField do anything?

I have a pretty simple ASP.NET Web Form that looks a bit like the following: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="example.aspx.cs" Inherits="example" %> <form runat="server"> <asp:GridView runat="server" id="grid" AutoGenerateColumns="false" OnRowCommand="DoStuff"> <Columns> <asp:ButtonField T...

How do you do a circular carousel with jCarousel and static content?

On the jCarousel plugin site there's an example on how to do a circular carousel but it's using dynamically generated content. I would like to know how one can do the exact same thing with static content. Here's the jCarousel circular example using dynamic content: http://sorgalla.com/projects/jcarousel/examples/special%5Fcircular.html ...

Extending prototypejs toggle() for effects

Is there a way to extend the toggle method in prorotypejs to allow for injection of an effect function, eg, scriptaculous effects or FBJS ...

click event on a div should not be triggered by it's children

Let's say I have the following Code: <div id="parent"> <div id="child"></div> </div> Now I attach an onClick event to the parent div: $('#parent').click(function() { ... }); Is there an easy way to stop the event from triggering when I click on the child div? I don't want to do something like $('#child').click(function() { ret...