javascript

Absolute positioning error in IE6 with dropdown list

I have a div, that I'm using JavaScript to position, so that when someone hovers over an image, it displays a tooltip message that follows along with the pointer. (Using tooltip-0.2.js ) The problem is that when a user goes to the page in IE6, a disabled dropdown box on the page is showing through this absolutely positioned tooltip whe...

How do you access @font-face in the DOM (via Javascript)?

Hi I'm looking to access @font-face with Javascript. I assume it's somewhere in the DOM but where? I want to do this for @font-face feature detection. Thanks! ...

How to hold other process while one is processing in Javascript or jQuery?

Hi, I have a function which does init steps. However, when I check my result, it seems like other processes after init function already finished. How can I hold other processes? ...

At a loss as to why this simple jQuery AJAX script causes an error in IE7

<script type="text/javascript"> $(function(){ $('.update').click(function(){ $.ajax({ type: "POST", url: "/reporting_results/mark_result", data: "id="+$(this).attr("id")+"&check="+$(this).val()+"&user_id=<?=$user_id?>&product=<?=$this->uri->segment(3)?>", }); return true }); }); </script> ...

when text changed inputbox automatically updates next text boxes?

Extension to my previous question http://bit.ly/c5yiVM I have 7 textboxes. If Top 1 textbox(Volume All Years) text changed, text need to be updated in next 6 inputboxes(Latest 2009 Volume to Latest 2014 Volume). I need javascript or Jquery for this. I will write Js textchanged() or focuschange() for top 1 textbox. So what should I write...

JavaScript Image zoom with CSS3 Transforms, How to calculate Origin? (with example)

I'm trying to implement an image zoom effect, a bit like how the zoom works with Google Maps, but with a grid of fix position images. I've uploaded an example of what I have so far here: http://www.dominicpettifer.co.uk/Files/MosaicZoom.html (uses CSS3 transforms so only works with Firefox, Opera, Chrome or Safari) Use your mouse whe...

unable to set href inside click event of Jquery

Hi I am trying to set href using Jquery inside click event of RadioButtonList but that doesnt work If I take the same code to document.ready event it works fine but not in click event. Please advice. $(document).ready(function() { url = "Results.aspx?latitude=" +latitude + "&Longitude=" + longitude; $("a[href='http://www.google...

Prevent an element from being the target in a document mouseover

I'm building an firebug-like inspection tool for my page. When the mouse enters an element, the element should be highlighted. Now I'm creating an element which I position absolute on top of the target element, this however means the next mousemove event (which is bound to the document) will fire with the actual "highlight element" as th...

execute javascript method after method excution complete ?

I want execute below callback()method after completion of process document.getElementById('btnDownload').click(); method. click() is the code behind method. That means, I mean after complete process of click() then excute callback() method. Because my modelpop is not hiding in code behind. So I want hide in javascript method. function...

whats the substitute for a body onload?

i have a javascript that i need to load at the body, but since im trying to build something flexible i really want it to function on a onLoad on a divtag. But thats not going to happen as i understand it as onLoad does not work on a divtag. is there another way i can load/start a function within a divtag? or when i include the .js file?...

Textarea onchange detection

Hi, How do I detect change event on textarea using javascript? I'm trying to detect how many characters left is available as you type. I tried using the onchange event, but that seems to only kick in when focus is out. Thanks, Tee ...

Call JavaScript function from Silverlight 4.0 application

I am trying to call a function from a Silverlight application. It should be a very simple task to do but so far I am not getting the result that I am looking for. This is my Silverlight code: private void button2_Click(object sender, RoutedEventArgs e) { HtmlPage.Window.Invoke("SayHello", new string[] { "Salut!" }); ...

Can I access an iframe of the same domain in a separate window?

How can I detect the presence of and then call a function on a frame that is already loaded in one tab (my iframed facebook app) from a page being loaded in a new tab (from an ad-served link). It seems most examples focus on parent/child iframe communication. In this case, a link will be served from Google Ad Manager, which only allows _...

Javascript - formular - nested dynamic appendchild functions

Hi I have a form which changes the inputfields depending on a radio-button. for text there appears a textbox for textarea there appear additional 2 fields for cols And rows for select, checkbox and radio there appear additional fields with appendchild have a look here: http://joomla.byethost16.com/php.php Now what i want is to let t...

Javascript: Can't control parent of descendant nodes.

I'm creating elements (level 1) dynamically which in turn create elements (level 2) themselves. However, the children of level 2 elements have "body" as their parent. In the HTML code below, the content if spotAd2 is created by my function createNode(). It's a Google Ad Sense tag. However, the Google Ad Sense tag create elements that we...

Javascript/iframe/embed/object question

OK, so here is my issue. I'm building a system which will allow people to embed lists of links on their pages. When the link is clicked, i'd like to use something like Lightview or Lightwindow to open it up over the whole window, not just in the iframe. I don't have access to the page that the user will be embedding this object into. Ev...

Help me reduce code repetition in a simple jQuery function

I have built a carousel using the jQuery cycle plugin. I have 4 links that jump to relevent slides. Right now I have a chunk of code for each link. I am trying to create a single multi-purpose function. $('#features-slide0').click(function() { $('#features-slides').cycle(0); return false; }); $('#features-s...

JavaScript: What is AJAX? What is jQuery?

What exactly IS AJAX? Is there an official release? What exactly is jQuery? Is there an official release? From what I understand, these two "extensions" of JavaScript are just small scripts that enable extended functionality. But, what exactly are there? I mean, Adobe is a company that created Flash. If you want information about Flash...

Check if cookie exists if not create it.

TLDR: Want to check if cookie exists, if it doesn't create it. Am using jquery1.4.2 and jquery cookie, I know this is probably very simple but I just cant get my head right at the moment. I want to: Check to see if a cookie with name of "query" exists If so nothing. If not create a cookie "query" with a value of 1. But only if i...

Sorting a multidimensional array in javascript.

How would you sort a multidimensional array in JavaScript? I have an array full of arrays that contain two dates and a string. I need the main array sorted by one of the date arrays, is this possible? data stucture: events = [ { date 1, date 2, string }, { date 2, date 2, string }, ] ...