javascript

Ajax methods - which is better?

I have a bunch of insert, update, and delete operations I need to execute via Ajax. Which of the following would be a better approach? Individual methods for each function (e.g. delete_foo, insert_foo, update_foo, delete_bar, insert_bar, update_bar, etc.) A "master" method and just pass a parameter to distinguish between operations. ...

need help with z-index property

I have a sprite image that is the background of a div and the div contains "li" elements with anchor links in them..I want that when user hovers over links ..diff parts of sprites' image are displayed in div's background.. now sprite was working great until I added a master page to my aspx page..the image hid behind the "Links"..but whe...

jquery arrays intersect

Hi, I previously posted this question as jquery/javascript: arrays - http://stackoverflow.com/questions/3969576/jquery-javascript-arrays. But since I am a complete beginner I have formulated the question wrong and didn't understand the answers either.... :( After failing to implement the given solutions I did some more looking around I...

How to get rid of the blue javascript highlighting in NetBeans?

I know this isn't a direct programming question but who else besides programmers use netbeans so I figured this would be the best place to ask and actually get an answer. So please don't close the question. So what I want to get rid of is the sky blue hightlighting that happens to all javascript in netbeans: http://tinypic.com/r/2q8okx...

Google Maps in Grayscale

Hi! Is there any way to display a Google Map (embedded via the Javascript API) in grayscale without losing any other functionality? Thanks, DLiKS ...

Friends Invite for Facebook HTML and Javascript

How can i add in my facebook application invite friends. First of all i use actionscript, in order to handle invite issue i searched so many sites but i ve got nothing, cuz facebook doesn't support invite actions. then i learnt that javascprit can handle this, however i couldn't find anything valuable about that ...

Why is $_POST array empty in PHP after an a request with post data

I make a post request to the the page getremote.php with post data but the $_POST array seems to be empty. Would be grateful if anyone can tell me what I've done wrong. The javascript code to make the request is var postdata = "Content-Type: application/x-www-form-urlencoded\n\nedits=" + this.createEditXMLtext(this.editXMLstruct); var...

Javascript: Allowing "virtual" function in base class to create instance of subclass

Hi, I have the following object model I want to get working - have been banging my head against the clone bit! Is this possible? I can't seem to get access to the SubClass constructor from within the baseclass without hard coding it. The code is for a queue of arbitrary operations that all share a lot of common functionality; new operat...

Unable to remove the textbox using javascript

Hi guys , i am facing a problem with removing the textbox using js. i am using below mentioned code <html> <head> <script language=javascript> function addElement() { var ni = document.getElementById('myDiv'); var numi = document.getElementById('theValue'); var num = (document.getElemen...

Javascript getCookie functions

I found two functions to get cookie data with Javascript, one on w3schools.com and one on quirksmode.org I would like to know which one I should use? For example I believe I read somewhere that there was a problem with some browsers splitting the ; semicolon? w3schools: function getCookie(c_name) { if (document.cookie.length > 0) ...

Where can I find a good Javascript/DOM reference?

Possible Duplicate: Best reference sites for HTML and JavaScript programming What is the best online javascript/css/html/xhtml/dom reference? A good Javascript API reference documentation related to browsers and DOM Where can I find a good Javascript/DOM reference? I know the MSDN one: http://msdn.microsoft.com/en-us/librar...

getting directions from a custom marker with google maps API

i have created a map with custom marker, but I am not sure how I can allow my users to click on the marker to get directions. <script type="text/javascript"> jQuery(document).ready(function($) { var latlng = new google.maps.LatLng(51.443054, -2.077167); var settings = { zoom: 13, center: latlng, mapT...

javascript IP address question, what if fail to load/no internet connectivity

Hi, I have some code that if I'm at home; it will display at popup saying that if you are at home. If you are not at home it will display a popup saying you are not at home. As the script is located on a server to give an IP address, how can I get it to say if you are not connected to the internet, as it will fail to load so I would have...

Disable onClick functionality using JavaScript

I am using onClick event for the image. When I am disable for the particular case, I didn't know exactly how can disable the onClick functionality using JavaScript. Sample code: <td> <a onClick="fun()"> <html:img src="/caleder.jpg ... /> </a> </td> calling fun: function fun() { // in fun I want to disable the im...

jQuery: form, function and give attribute

I have a form that on action: action="javascript:DoWallInsert($idf );".. Now on this form i have this submit button. I want onclick that it should be disabled, and then enabled again on success (the ajax call inside the function). <input name="submit" type="submit" id="submit" value="Send"> function DoWallInsert(BuID, uID){ $('#...

Using JavaScript create a div and also it will come top of the main div

This is my HTML template. <div id='main'> <div id='1'>one</div> </div> I want dynamically create a new div with inside of main div and also it (new div>) will come to top of the main div. The answer look likes <div id='main'> <div id='new'>new</div> <div id='1'>one</div> </div> How can this be achieved? ...

how to add new set of values with property when json object already exist..using javascript

Hi friends, i already have json object..like this, updates={ mainUpdates:[{id:'1', inner:[{mid:'11',sub_domain:'a'},{mid:'12',sub_domain:'b'}]}, {id:'2', inner:[{mid:'21', sub_domain:'c'},{mid:'22',sub_domain:'d'}]} ], msgCount:'2' } now i want add new values with its name(property) dynamically to the exi...

drop a draggable using jquery

Is there any way of dropping a draggable into the droppable by hardcoding and not by actually going into the browser and doing drag-drop?? Thanks in advance.:D ...

how to call javascript/jQuery when javascript is disabled in mozilla/ie ?

how to call javascript/jQuery when javascript is disabled in mozilla/ie ? ...

Update a link href in prototype

Hey all, I'm running a prototype script (lightbox) and I want to add an extra link below each image with the url to a page that changes with each image. I have so far managed to add the a element to the right place, but later in the script I need to update the href of the link based on the image that is loaded. There's a point in the ...