javascript

JCarousellite does not work from within Fancybox

I have have a link that opens up a Fancybox(also tried Colorbox) to an image gallery page. This gallery page uses jCarousellite for thumbnail navigation then loads the large image using an ajax call. When i access this gallery page directly, everything is peachy and all the JQuery fires correctly. When i load it using Fancybox, none o...

AJax JSON Call error when trying to access the properties of class

I am making a JSON call to web method which is defined in code behind. The web method returns a class object.The class returns 3 properties one of type list and 2 integers. I am accessing these in the following manner: success: function(result) { alert(result); alert(result.LookCount); ...

jQuery start typing between tags

I am making a WYSIWYG editor, what I want to do is preventDefault on the enter key, and instead, when enter is pressed, it creates a new line, with tags <div></div>. So essentially each <div> is one line. I don't know how to create the <div> and have the pointer start between each <div> like this: <div>Line one here</div> // Press enter...

css is getting overridden by .js inserted styles (Alloy UI)

I have a situation where the .css in my head tag is getting overridden by css that's being inserted dynamically into the head by a javascript library. The .js library automatically appends the new .css link to the end of the head tag so it is always put on top of my styles. ...

javascript isFloat and isInteger

how to find if a number is float or integer? 1.25 --> float 1 --> integer 0 --> integer 0.25 --> integer ...

Intercept Link Clicks from Frame

I have a old fashion page that uses a frameset containing a top frame and bottom frame. The frameset is defined in "index.html" and my code is as follows: <html> <head> <script src="jquery-1.4.2.min.js" type="text/javascript"></script> <script> $(document).ready(function(){ $('#mainFrame').ready(function() { ...

OpenLayers Format JSON is Returning Empty responseText String

Hello StackOverflow, After a week of posting at the OpenLayers forum and not receiving responses to my questions, I have decided to look here. I have Googled and Googled and Googled and even found a wonderful tutorial concerning this topic, in Spanish, but so well written that Google translate was able to translate it perfectly. gis...

Javascript: sort multidimensional array

After creating a multi-dim array like this, how do I sort it? Assuming 'markers' is already defined: var location = []; for (var i = 0; i < markers.length; i++) { location[i] = {}; location[i]["distance"] = "5"; location[i]["name"] = "foo"; location[i]["detail"] = "something"; } For the above example, I need to sort it by 'di...

Some images not loading on Iphone 3gs\ipad?

I recently rewrote a flash gallery to html/js here: http://susanzbreyer.com/gallery.html The problem is that on iphone 3gs and ipad some of the images on the last tab do not load, and just show a blue box with a question mark. It works on every desktop browser, iphone 4s, android phones, etc. Does anyone know what might be causing thi...

Confirmation before deleting (jquery)

I would like to show a simple confirmation dialog box show before running a delete function. Here is what I have so far HTML: <!-- Delete Confirmation Dialog Box --> <div id="confirm" style="display:none;"> <div class="message">Are you sure you want to delete?</div> <div class="buttons"> <div class="cancel">No</div><div ...

Parsing javascript arrays in PHP

I can't seem to figure out how to get a JS array into PHP. What I have to work with looks like this: var arrLow = [ { "e": "495864", "rank": "8678591", "rankmove": "<p><img src='up.php?uStyle=144'> UP 495864" }, { "e": "104956", "rank": "-", "rankmove": "<p><img src='up.php?uStyle=145'> DOWN 1" }, { "e": "0", "rank": "0", "rankmove": "...

Alternative to jQuery's slideDown() and slideUp() not affecting the display property.

Hello, I've been trying to use the slideDown() effect for a website I'm working on, but I'm having difficulty getting the effect I want. Here's a sample showing what I want to accomplish. <div> blahblahblahblah <span id="span_more" style="display:none"> blahblahblah </span> <a class="link_more" id="more">More...

What this mean in javascript ?

Possible Duplicate: Explain JavaScript's encapsulated anonymous function syntax I have just read a javascript book but I have seen this code: 1(function() { // code })(); what is this ? is a special function ? ...

Why is this JavaScript advertisement cropped only when it's loaded inside of an <iframe>?

As part of a project I'm working on, I need to load an AdMeld ad (a major ad network) inside of an <iframe>. I can't call the add directly due to complicated cross-browser limitations. Here is a very simple page that loads one of our ad slot, with rotating ad creatives: http://troy.onespot.com/static/stack_overflow/4949/iframe.html I ...

Improve the design of GUI/website

So i am using visual studio 2008, asp.net 3.5, with the basic toolkit provided. Now i have made the gui which a lot of functionality but the design is very basic. and looks too old. I need to give it a new look, a new feeling new designs.... like the gridview, the buttons the textboxes, the menus look basic... this is not working for...

Selenium: how to find the number of childNodes of a div

I have been banging my head on this for the better part of a day; I need to count the number of childNodes in a parent div. It basically is acting like a list and each childNode is a row I want to count. The html looks like: div<@class="list "> div<@id="list-item-01"> div<@id="list-item-02"> div<@id="list-item-03"> div<@id=...

accessing variable in parent page from iframe

I have a page with an iframe that contains a html page. I want to access a javascript variable in the parent page from within the iframe. The name of the variable in the main page is "observer". I try and do the following in the iframe page: parent.observer = 'aadasds'; but I am getting the following error: Permission denied for to ...

JavaScript date parsing producing wrong date

I have this script: var a="Thu Oct 07 16:50:0 CEST 2010"; var b=a.split("CEST"); var d = new Date(b[0]); alert(d);​​​​​​​​​​​ But it doesn't work how I want. In fact the date result differs from the original in the string. The input is Thu Oct 07 16:50:0 CEST 2010 but the result is different Sat Oct 07 2000 16:50:00 GMT+0200 (CEST). ...

Turning on error reporting for a JavaScript segment?

I haven't worked in JS since 1999, so I'm quite rusty. I remember working in it in the past, and I was able to enable some kind of error reporting. Right now, when I have a syntax error in a script, no error is reported in the browser. Is there a directive or something to enable error reporting in a JS file? ...

carry some extra information in an HTML select/option dropdown list

I want to carry some extra hidden information (eg: postal code) in an HTML select/option dropdown list and make it available to a javascript function when user changes option box selection. This is the type of thing I would like to do (but alas it does not work). Can someone fix it or suggest reasonable alternative? <select id="s...