javascript

Toggle TWO Panels with ONLY ONE VISIBLE Is it possible?

I have two sliding panels. I need ONLY ONE panel open at a time. Right now they can both open. My project link is: link text Here is my code: $(document).ready(function(){ $(".btn-slide").click(function(){ $("#panel_quote").slideToggle("slow"); $(this).toggleClass("closeQ"); return false; }); }); $(document).r...

jQuery 1.4.2 IE8 error on page expected ')'

Hi all, I'm having an issue with IE8 (nothing new there). The error I'm getting is not making much sense as it does not occur on FF or Chrome. Here's the code: function remComp(id, trade) { $.ajax({ url: "functions/removePriceSurveyComparison.php", type: "POST", async: true, ...

How do I trigger ESC button to clear text entered in text box?

<input type="text" id="search" size="25" autocomplete="off"/> I know it is something with onkeydown="if (event.keyCode == 27) ...

jQuery set flash wmode parameter

Hello, Am wondering if there is any jQuery plugin available to change the wmode to transparent at runtime. (Something similar to wibiya) I tried googling, but could not find any exact plugin do to the job. The only resource I found was: http://www.onlineaspect.com/2009/08/13/javascript_to_fix_wmode_parameters/ http://labs.kaliko.com/...

track download with asynchronous google tracking doesn't load google's gif

Hey I tracking a download of a pdf with this code: _gaq.push(['_trackPageview', trackLink]); When I check the net console (firebug), it tries to load the google gif for tracking, but doesn't get loaded, see screendump here: http://screencast.com/t/MWVkZTU0OD If I copy the url for the tracker and call it directly in the browser, i...

ui-wrapper suddenly gets activated

Hey.. I have a thumbnail and a full size image that i want to load dynamically on my page. The thing is.. if I load the smaller image - ie., the thumbnail - then it shows properly on screen. But if I load the actual full size image, then another div, with a class of ui-wrapper is created around my image. And it would not show the im...

Javascript : [ onmousover ] and [ onmouseout ] event

The General Problem So imagine a dropdown menu for example and when you mouse over on a link the dropdown is popping up. But as you can read on the article below, there are problems with it, when you mouse over on a link(for some browsers everything inside the element) the box is dissapearing. The problem comes from event bubbling. ...

Grab largest image on site given the URL

Given a URL how do I pull the largest image (in terms of image-dimensions) on the site? I am using it to act as the best possible representation of a sites thumbnail. Similar to first thumbnail image when sharing a url on Facebook: http://www.facebook.com/share.php?u=my_website_url The image thumbnail on Facebook in the div: <div cla...

Javascript: Disabling drop-down based on other drop-down

Hi, I have a Javascript function in my website. I don't know Javascript very well but, I want to modify it. This section loads a third drop box, depending on the first two. I want to modify it to disable the third one if the second drop box locatie's value is util. jQuery( function () { jQuery("#util, #loc").change( function() { ...

Getting the security origin of a URL

I'm writing a Chrome extension, and would like to be able to clean up given urls, so that I get their security origin. Using location.host seems to do the job, but it's not always usable - if I'd like to get the origin of an IFrame element, for instance, the call will be blocked. Looking at WebKit's source, this seems like a far from tr...

callback function meaning

What is the meaning of callback function in javascript. ...

display xml data in html from an xml file specified within another xml file with xmlhttprequest

Hi, can you help, I have a basic xml file which is displaying well in html. The xml file is as such... <videoList> <video> <pointer> <type><![CDATA[image]]></type> <lat><![CDATA[52.1]]></lat> <long><![CDATA[1.0]]></long> </pointer> <speaker> ...

Syntax Highlighter Around A Div Element

I am using the syntax highlighter plugin and I want to always have it applied to a specific div area. The div's content will change based on a on-click hyperlink. How can I enclose the syntax highlighter script tag around the "mydiv" element at all times? <script> function viewCode() { $('#mydiv').load('euler/_48.py'); ...

Javascript help..

Hi, I am very new to javascript. I want to add the same effect as that given in the text fields of this webpage in my own page... Can any one help me with how to do it or where to learn it from. I want my text fields to show what have to be written there but it will change as soon as I write something in it.. Another thing is that a sm...

DOM Javascript on Internet Explorer 8

hi everyone, i have a litte probleme with CSS modification on Internet Explorer. When i add an new CSS style in , IE don't reload the page with the new CSS injected. But when I change CSS property of an element it's works ! (This code work perfectly on Firefox !!!) do you have any idea to do that the head modification work ? if(doc...

Javascript plugin

Hi all, i was wondering if anybody knows (and if there is such a thing) a javascript plugin that can do to following: on the website http://www.worldofmerix.com/ click on any of the menu buttons on top for eg. "about us"; then you see a line appear in the middle and expand so that you can see the entire div... I need a similar animation...

Using text/html javascript templates in production code

Has anyone implemented John Resig's micro-templating in production code? In particular I'd like to know if embedding the templates with <script type="text/html"> has caused any problems. A bit more information: here's the sort of thing I'm worried about: My users are mostly in corporate environments - could an unusual proxy server man...

Check if Javascript is available and redirect to another page

In my rails site, i require javascript on all the pages. If it is not enabled, every page will fail. What I want to do is, if there is no javascript enabled, I want to redirect them to another static page - asking users to enable the javascript first. I want this to happen for all the pages. Is it possible ? I have tried to put code in...

Javascript pagination

Can someone help me please? I have little knowledge of JS... I tried this example, that brianpeiris wrote.. It worked nicely, but I need two different pagers in the same page. How can I accomplish this? This code doesn't work, but this is how far I got.. <script type="text/javascript"> var pagination_options = { ...

How to Access the Gridview in Static Method?

I want to access my gridview in the static method? I am doing async call from javascript, I need code for this, Please help me [System.Web.Services.WebMethod()] public static void bindGrid(string userinfoId, int row) { GridView gv; gv = (GridView)gvParent.Rows[row - 1].FindControl("gvChild"); gv.DataSource ...