javascript

tabbed navigation with jquery

i need help creating and actice state on tabs here is my javascriptand part of my html i cant seem to enter css on here please request it if you require it i need it so which ever tab you are on it shows the same color as the active container background with no borders on the join i need this for the top and side tabs any help on how ...

Cloning li elements in JQuery

I'm using EasySlider, but unlike any of the examples of this plugin that I've found, I show multiple elements at any one time and the width is 100%. The separate images make up a full, long consecutive image, which is Photoshopped so even the borderline between first and last looks natural. It's configured to be a continuous slide automa...

json and binding methods

I have a Person javascript class like function Person(_name, _id, _salary){ this.Name = _name; this.Id = _id; this.Salary = _salary; } First, i want to overload constructor function with: function Person( _person ){ this.Name = _person.Name; this.Salary = _person.Salary; this.Id = _person.Id; } But whatever ...

Multiple Login users - javascript

Hi guys, I want to use this javascript but being able to hard code 3 users, so that those 3 are able to Login. I'm a newbie with javascript so yea. The below is the code i use for a single user login. function validate(loginForm) { var booValid = true; var strErrorMessage = ""; var minLength=5; var maxLength=10; if(loginForm.pw...

Uncheck all other checkboxes

I need to clear all other checkboxes when a user clicks a checkbox. Pretty much the same behavior as a radio button. User clicks checkbox 'A' and checkboxes 'B' and 'C' are both unchecked. I am using jquery but I can't figure out how to accomplish this. Any ideas? Here are how the checkboxes are set u: <div class="sales_block_one">...

BIRT: Join too slow

I have a large table in my DB from which I need a couple of rows for a report. The JOIN turned out to be too slow. So my solution was to read the values into a HashMap and simply join them manually in each row of the report. How can I fill the map in the open script of a scripted data source? My current solution was to pass the URL/use...

javascript validation

Hi all i want one validation in javascript that a text boxt should allow to enter only numeric vales in following format 4.25 4.50 2.00 likewise.there sholud be always 2 digit after decimal point and 1 digit before decimal point. if user enters 2 it sholud display 2.00 like this is my requirement.plz help me ...

Creating a combo box with HTML and JavaScript

I have to make a combo box in an html form & receive its selected value in a php script. I have a piece of code from the Internet. It has text box & dropdown list side by side. After the user enters a value in text box, the value goes into a list that the user has to select again. I need to have the text box on top and the list below ...

Horizontally and vertically exclusive radio button

Hi folks Been using this site for ages and have never had to go as far as to ask my own question... cheers in advance. I have a group of "questions" which are to be listed. The user then has to rank these questions as 1st, 2nd, and 3rd (there can be many more than three questions however). The problem I have is that, if I make the ra...

JSON is no defined

in the json.js file i am getting an error on 199th line 199: JSON = JSON || {}; error is, JSON is not defined Why is this happining? ...

What's the best way in javascript to delete row from html table? Table's td contains colspan and rowspan more 1 and it is a problem.

What's the best way in javascript to delete row from html table? Elements contain colspan and rowspan more 1. Function deleteRow() in DOM doesn't take into account colspans and rowspans. ...

swf object not defined

hi, i get swf object not defined. i have checked the path to the js file through the view source and its correctly linked. and the code for creating the swf is underneath and the divs are correctly named. any ideas? ...

Intercepting a Javascript function call with Selenium

Hi, I have a test where I have to check that when a particular item is selected on a web page, the item is loaded into a flash object on the same page. This being done via Javascript. I have to check whether the parameters being passed to flash by Javascript are correct(i.e. the right item is being passed to flash). The only way I can i...

Display in range addresses within x miles of a geo location with google maps

In my database I have a list of places and for each I have a street name and number, postcode, city and county. Some of them have a latitude and longitude location. And I have the geo location of the city centre for example. I would like to display only the places that are within X miles of the city centre on a google map. Incase this ...

How to bind functions to the JSON object?

function Person(_name, _id, _salary){ this.Name = _name; this.Id = _id; this.Salary = _salary; } Person.prototype.f_IncreaseSalary = function( _percentage ){ this.Salary *= _percentage; } var per = new Person("cem",10,15000); 1) I can access to per.f_IncreaseSalary(0.2) but what if i create this object from JSON strin...

How can I test whether a Javascript object has a method with a given name?

Consider the following sample: var Container = function(param) { this.member = param; var privateVar = param; if (!Container.prototype.stamp) { // <-- executed on the first call only Container.prototype.stamp = function(string) { return privateVar + this.member + string; } } } var cnt = new ...

How is extra script layer implemented?

If you have ever worked on alfresco, you must know the web script layer in it, my question is how does alfresco implement this ? What framework does it use? If you don't know alfresco, then my question is : how can I implement a script layer to expose my service layer as a JavaScript style object? With the layer, I can write the follow...

divide 64bit in two 32bit registers by 32bit

I am trying to write an x86 emulator in JavaScript for education purposes. I have already written a compiler and at the moment I am trying to write the x86 emulator in JavaScript. I have however a problem with the DIV instruction. According to http://siyobik.info/index.php?module=x86&amp;id=72 DIV takes a 64bit number as input by interp...

How to get FB.api('/me/feed', 'post', ... to work?

I've tried to use FB.api to post something to my feed for hours now. I can't get it to work for me. I gave the permissions to the app. I can post to my feed with the PHP SDK but I have to use JavaScript. <button onclick="doPost()">Post to Stream</button> <script> window.doPost = function() { FB.api( '/me/feed', 'post', { ...

jsp with ajax two simultaneous requests only getting one response

I have a jsp page where I'm trying to send multiple (two currently) ajax requests at once, but I only seem to get the second response. This guy described my problem exactly, but his solution didn't work for me. Here is my js code: function createRequestObject(){ var req; if(window.XMLHttpRequest){ //For Firefox, Safa...