javascript

Integrating Google Custom Search Engine Overlay with Simple Controls Gallery

I'm using the Google CSE Overlay on a page, but I'm having trouble integrating the Simple Controls Gallery (http://www.dynamicdrive.com/dynamicindex4/simplegallery.htm) to the site. SimpleControlsGallery is based on jQuery and does some preloading and uses high z-index values to swap between a list of images. This causes the image to cy...

jQuery get and response to html, POST problem after that

Hello, I have the following function: jQuery(document).ready(function($){ $("div.findButton").click(function(){ UidID=Math.floor(Math.random()*1000); PostCode=$("#postcode").val(); $.get("result.php", {postcode: PostCode,uid:UidID}, function(response){ $("#result").html(response); }); }); }); example content of t...

Problems with innerHTML using Javascript

Ok, so the base problem is in setting the innerHTML of a div element, any html markup that is in my string is being stripped (and not displayed) in all major browsers except for Firefox. Now for the catch, this doesn't happen when the page is first loaded, it only happens on a partial postback (unless its Firefox, then it always works)....

how to check if checkbox is checked or not in IE 6

I am frustrated with the most idiotic browser of all time, for which, Bill Gates must be hanged I think. I just want to check whether a checkbox is checked or not. Somehow cbox.checked property is always false. What other thing I can do. I saw all the other similar questions, but nothing is working with this stupid IE. EDIT I for...

Eclipse: which plugins for HTML & Javascript?

Which plugins do you use for editing (with syntax highlighting) HTML & Javascript in Eclipse 3.5? ...

How do you insert a string of escaped HTML that is larger than 4096 bytes into a CKEditor instance?

I recently brushed up against Firefox's 4096 byte (4KB) limit for individual XML nodes when using Paul Schreiber's unescapeHtml string method to insert a large string of escaped HTML into a CKEditor instance. This approach did not handle a string over 4KB in size in Firefox 3.5.3 due to the browser splitting the content into multiple no...

Programatically remove <script src="/unwanted.js".. /> reference

I have partial control of a web page where by I can enter snippets of code at various places, but I cannot remove any preexisting code. There is a script reference midway through the page <script src="/unwanted.js" type="text/javascript"></script> but I do not want the script to load. I cannot access the unwanted.js file. Is there an...

Accessing td property of a html table through javascript and css.

I am trying to change the background color of a td element in a static html table. I will be finding the td's invovled through a database call and need to show the td by way of turning the background color from none to yellow. I have built a css file to match the td class attribute so I can isolate the table cell by class id: For exampl...

XUL attaching events to anchors added with javascript

I'm writing a firefox extension that adds event listeners to all the anchor tags on a page. Essentially I have: window.addEventListener("load", function() { myExtension.init(); }, false); var myExtension = { init: function() { var appcontent = document.getElementById("appcontent"); if(appcontent) appcontent.addEv...

Web-page boundary values

I have a "box" popup that appears on mouseover for some links. The box is about 300px tall and the top side of the box is on the same level as the link position, however some of these links are at the lowest scrollable part of the page, thus the popup will be cut off. Question What values are used to detect the bottom of the page, or re...

How can you open a popup window after you close another one?

I need to open a popup window, which when closed, opens a new pop up window. Then when you close that one another opens. I'm aware that this functionality can have uses for spam and nag-ware, but I need it for a user experience survey. Don't ask me, it wasn't my idea. How do you do this? ...

Synchronous cross sub-domain POST request with jQuery

I'm trying to do a cross domain POST request and have hit a wall (or two). I can't put a proxy page on the server - so that is not an option. I have researched getJSON, which works great except that I need to POST not GET. Is it possible to do this? If it is not, can someone explain to me how getJSON works and why I cannot make a POST...

Network-efficient difference between two strings in Javascript

I have a web application where a client side editor is editing a really really large text which is known on the server side. The client can make any kind of modifications to this text. What is the most network-efficient way to transmit the result difference in a way that the server understands? Also, since this will happen on client si...

jQuery change form action doesn't work for some IE 7 users

I'm having a puzzling issue with Javascript/jQuery and a handful of IE 7 users. I'm lost since I can't reproduce the issue with any IE 7 installation. Here's the code: $("form").submit(function() { $(this).attr("action",$(this).attr("action").replace(/^\/foo/,"")); $("input[type=submit]", this).attr("value",...

my first jQuery plugin, only seems to bind to the first form of eight forms on the page

I'm writing a small jQuery plugin that binds to 8 divs on a page, each of which contains a form. There are two links for each widget that increment or decrement a field within the form and then POSTs the form. The problem is that all 16 links on the page all submit the first form on the page. The source code is here: http://pastie.org/6...

tiny_mce affect all the text area in my page

hi i downlaoded a tiny_mce folder and implemented it in my page. it's work fine, My problem is that all the textarea in my page looks like tiny mce , i want only one textarea looks like tiny mce and left of all in normal textarea . what will i do to do this??? Please replay urgently Thanks in advance........... ...

How to filter which files can be seen on upload dialog box?

Hi, In an ASP.NET MVC application which is not to have client side objects like ActiveXes, Flash or Java Applets (JavaScript is OK), is it feasible to imagine it being possible that when an upload file dialog box pops up, it will only show the files I specify? For example, only files of extension .docx or docx and jpg would be visible...

How to only modify "text" while modifying the dom using javascript

I'm trying to write an "unbreakable" class using jQuery, so that: <span class=unbreakable> some text in here maybe with a <span title="tag">tag</span> or something </span> would have each space replaced with &nbsp;. The problem is, if I do something like $(".unbreakable").html ( replaceAll($(".unbreakable").html(), " ", "&...

What's the simplest way to get a user's latitude and longitude from an ip address

I always end up needing the user's location on most web projects that I work on. I've used Maxmind's GeoIp, but it involves you importing their dataset and it needs constant updating. There are also other free and paid services, but I just wanted something simple that I could add to any site in a matter of seconds. So this is sort of...

The best way to integrate SWF to html page

What html-tags I should to use? May be some JS libs? Of course, better if this will be cross-browser and platform independent. ...