javascript

javascript oo question

Hi, I have a html page like this <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <script src="JScript2.js" type="text/javascript"></script> <script src="JScript.js" type="text/javascript"></script> <title></title> </head> <body > <div ><input type=text id="uxTextBox" /></div> </body> </html> and 2 javascript fil...

Single quotes in string with jQuery ajax

I have run into a problem where the user enters data and if there are single quotes at all, the script errors out. What's the best way to handle single quotes that users enter so it doesn't interfere with the jquery/javascript? UPDATE: I'm sending it through ajax to a database. here is the data parameter for a json ajax call. data:...

Javascript Resize

Hi, I have very little javascript knowledge, so it seems a very basic question, but could not find a way to do that. I have a 1024*768 fixed area like this: There will be a javascript button on the right side of the "Section A". When I click that button, Section A will be automatically resized and it will be something like this: ...

array.sort() is not giving the desired result

iam using following function in my javascript code function AlphaSort(sort_type,cat_1,cat_2,cat_nm) { var len = dataref.totalrow; var arr_name = new Array(); for (var i =0; i<len; i++) { var t = eval('dataref.mf_scheme['+i+'].'+sort_type); arr_name[i] = t; } arr_name.sort(); if(sort_type!='scheme_name') { arr_name.rever...

Son of Suckerfish Menu IE6 - menu hiding behind content

Page - http://blu-eye.com/index.html - contains suckerfish menu which is displaying correctly on the rest of the site, except for this page. The menu items are hidden behind the content below. The content below it contains a javascript slider with image and text. I've tried changing the z-indexes on majority of elements, but still havi...

JavaScript not Running on VS2008 Development Server a.k.a (cassini)

I am trying to run a simple ASP.Net Web Application/Site on Vista Box. Unable to run any JavaScript when I hit F5. However when I deploy the same to local IIS and call the application using IE8 this application works and the JavaScript executes. Another observation, when I copy the URL (example: http://localhost%3AXXXXX/yyy/Default.aspx...

Javascript race condition question

EDIT: I figured out the answer to the original YUI3 question I posted here, but it led to another one and instead of starting a new thread I thought I'd just add it here. Please scroll down for the new question (it's bolded). Original question: I'm having some issues creating a JavaScript countdown timer inside a YUI definition, my gues...

jQuery animate overhead at speed 0 compared to setting css directly

Often times in applications I have a property that would normally .animate(), but every now and then must change instantly. Usually I just set the speed to 0 when doing this, but in an application I'm developing now, my situation is the opposite and performance is much more important. This property is set with .css() on window .resize(),...

jQuery DOM Ready

In the following code snippet: <form> <fieldset> <button id="indexGetStarted" class="button" type="submit">Get Started!</button> </fieldset> </form> <script type="text/javascript"> $(document).ready(function() { $('#indexGetStarted').click(function() { $('form').submit(); return false; }); ...

How to change text property of asp.net textbox with javascript

I have a textbox that I want to change text property of it with javascript, but I can't do. My sample code below, Can anyone say what is wrong? Thanks... function openAdresYeni(p) { document.getElementById('hdnAdresIndex').innerText = p; } } ...

Select Only Images for upload through browse button

Hi friends, I want to make a file upload form. But my confusion is that when i put file element in html its allow all types of files to select. I want that browse button will only allow the images to select from the file system. Actually it should display only images of the file system. Thanks in advance. ...

jQuery for submitting a form via AJAX?

Is there any magic jquery method that will allow you to submit a form to its action URL via AJAX rather than with an page reload? I know you can bind a form's submit event to a handler function, but I'm also looking for something that will automatically serialize the form's request variables into the $.post's data element in the same as...

Check username and password in Login Form (jQuery)

I use jQuery to check username and password in Login form. I use GET method. Doing so well? ...

jQuery plugin for designing report layouts

I'm looking for some sort of jquery plugin (or even plain javascript) that can be used to create report layouts, business card layouts, etc. Not finding anything after lots of googling. Basically, I'm envisioning a canvas (possibly html5 canvas?) that shows a background grid. At a minimum, text and images can be added to the canvas. P...

jQuery "getJSON" from an external domain that doesn't support JSON-P output.

Hello, I'm trying to grab data from a JSON on an external site but the site doesn't support JSON-P output. This is an example of non-working code, but gives a good idea of what I'm trying to achieve: $.getJSON("http://www.bom.gov.au/fwo/IDV60901/IDV60901.94868.json", function(data){ //Process data here }); Are there ways around t...

Greasemonkey communication with server that requires windows-1250 encoding

I'm developing a greasemonkey plugin, which is supposed to send a form in background using POST (GM_xmlhttpRequest) on an application not under my control. That application is written in PHP and seems to expect all its input in windows-1250 encoding. What I need to do is to take all the form fields as they are, edit just one of them and ...

creating div with fixed width and flexible height

I'm trying to create a div which will have fixed width and flexible height , here is the picture which I want to use for background. The thing is when I have div larger than image height the bottom rounded corners are omitted and also if I have div less than the size of image same thing, how do I make this work with round corners with al...

how to render .htm page into .aspx page using javascript

in my .aspx page i call wcf service and the result is get into callback function in .aspx(same) page i want that 'callbackfunction' to assign variables to result.name, result.title etc. here is my callback function function callBack(result) { var i = 0; var j = i; var t = new ...

Creating picture gallery

I want to create a gallery of pictures for my website and upload those pictures from the administration panel of the website. I am going to show all pictures in a page with a very small size, and one place I will separate for each picture to show the selected picture (from small ones) with big size. I know two ways of doing that: I c...

Prototype: call custom function after validation

Hi, I'm using prototype and needs to call my function after succesfull validation. Part of the code: var validator = new Validation(this.form); this will validate the form, but I don't know how to call my function trackForm after the validation is correct and the form is submited. Any help? ...