javascript

Jquery Lightbox still displays removed images

Is there a way to remove from the Lightbox gallery those images that have been removed via Jquery's .remove() method? i.e. some <img>'s are removed while the Lightbox is displaying other images. <img ... rel="lightbox" /> <img ... rel="lightbox" /> <img ... rel="lightbox" class="to_remove" /> <img ... rel="lightbox" class="to_remove" />...

Why won't this variable update?

In the document.ready() I have: $('#menu_indicator').append('<p>' + currPage + ' / ' + pageLimit + '</p>'); pageLimit is always one number that does not change throughout the whole code. I have it so that when a user clicks a button, it changes currPage to a different number. (this part is not in document.ready();) Why doesn't it up...

How To Display List of Sites One At A Time

I am looking for a way to display a list of websites one at a time from a URL list. I'm fine with a very manual solution, I found an AJAX solution where each "page" is displayed in a tab but it is very heavy because if I have 50 pages I want users to page through one at a time, this solution essentially pulls all 50 pages onto the one p...

how do I capture something after something else? like a referer=someString

I have ref=Apple and my current regex is var regex = /ref=(.+)/; var ref = regex.exec(window.location.href); alert(ref[0]); but that includes the ref= now, I also want to stop capturing characters if a & is at the end of the ref param. cause ref may not always be the last param in the url. ...

Prevent an accidental Back Browse

I have a client that just got the Apple Magic Mouse. We built a recipe website and she get very upset when she is inputting all the information for the recipe, then goes for her new mouse and accidentally scrolls to the right and it will do a Back Browse and all her info is lost. So she wants to warning/pop up to prevent this from happ...

Webpage’s slide show (Image Viewer) doesn’t work, when I create from already developed template.

Hi! Everybody I create a web template in Dreamweaver 8; in this template I added a slide show (Image Viewer). This template is working fine in browsers and slide show also playing, but when I create the new web page from this template, and then the slide show not playing, there is an error message display. message is below: “A script in...

Javascript validation and PHP validation?

I am using jquery validation plugin for validation empty forms. Should I also check this in PHP to be sure on 100%? Or it is ok with javascript validation. Thanks ...

Javascript works only in firefox

Can anyone please why does this javascript work only in firefox? function filter(obj, what, where) { var v = obj.value; var d = document.getElementById(where).getElementsByTagName('optgroup'); if (v > 0) { for (var i = 0; l = d.length, i < l; i++) { d[i].className = 'hide'; if (d[...

How do I share cookies across 2 domains with javascript?

I want to be able to access and set cookies between example.com and mysite.com. How do I do that? ...

Jquery - JSON.stringify, array is empty

Hi, i hope somebody can help me, the array value is empty in the post. $(function start() { c_all = new Array('#div { font-color:#ff0000; border:1px solid #00ff00; }', '#div_2 { font-color:#ff0000; }', '.line2 { font-color:#00ffff; }'); css(c_all); }); function css(x) { values = new Array(); for (i = 0; i < x.le...

Web development with ESN Planet, how does it work?

Hello, I'm starting a new job soon, in web-app development. While I'm experienced with programming, my background is primarily in game development and desktop/server applications. I have very little experience from modern web app development. Anyway... Our primary development tool is going to be something called ESN Planet, which I've ...

Canonical jQuery approach to dynamically enabling/disabling form submit buttons

I'm writing some JavaScript to handle the common scenario of dynamically enabling a form submit button when some text is entered in an associated text field. I've been using the Prototype framework for years but am moving over to jQuery. So I was surprised to discover that the jQuery version of my code seems kind of clunky. Is there a w...

Popup window always on top

Am looking at whatever hacks that are possible to keep a window always on top (apart from window.focus()). Maybe a hidden textbox to which I can set focus etc. I see this happening in LivePerson (support) whenever a new message arrives. I have legitimate use of this and not to annoy users with ads or anything. Any hacks for any browser...

Is there any way to see what part of a code is making a webpage slower?

It is all of the sudden much slower then it was. Is there any way I could use some sort of tool that will tell me what part of my code is making my page slow? Thanks ...

Javascript Popup Window

I have used a ton of javascript popup windows over the years, any recommendations on the best one out there? I would like to see if there are better ways to do popups. ...

How does JavaScript object `window.screen.width` detect my ScreenResolution in Ubuntu 10.4

How does JavaScript object window.screen.width detect my ScreenResolution in Firefox under Ubuntu 10.4? I mean what it accesses in OS to retrieve this data - OS variable or OS config files like a) .xprofile, b) kdm/gdm, c) xorg.conf. ? ...

Javascript + Asp: FileUpload and CustomValidator

Hi, How can I create a CustomValidator on Client Side for validating my file path from FileUpload? Thanks ...

Else return for returning to originals state is not working.

My code for changing the background color works great, but the "else" return does not work. Am I missing something? here is what i have: <script type="text/javascript"> $(document).ready(function() { var input = document.getElementById("test"); input.onclick = function () { document.getElementById("quote_input").style.backg...

Remove Resize handles and border from elements with contentEditable

Hi Guys! The problem I'm having is with the contentEditable attribute in IE. (some things never change). The problem is that I'm getting resize handles, and a thick border around <li> elements when they're in focus. Any idea of how to remove them? CSS or Javascript tricks are very welcome! ...

Do not round .width() in jQuery

Hi everyone, I've searched around and couldn't find this. I'm trying to get the width of a div, but if it has a decimal point it rounds the number. example: #container{ background: blue; width: 543.5px; height: 20px; margin: 0; padding: 0; } if I do $('#container').width(); it will return 543 instead of 543.5. How do I get it to ...