javascript

How to remove <li></li> from ul?

how to remove a particular <li></li> from the ul list? i am adding it dynamically... and i need to remove it when the user click on clear. how can i do that? ...

Google Website Optimizer and user-defined variables

I'm trying to merge my Google Website Optimizer A/B testing with Google Analytics (in order to see how page variations affect stats like bounce rate, time on site, etc.). Eric Vasilik, who I believe works at GWO, recommends a technique for doing this that involves setting a user-defined GA variable that is dependent on what page variati...

Jquery UI Tabs - slide

How can I switch tabs by sliding them horizontally? Currently I have: $("#tabs").tabs({ fx: { height: 'toggle', opacity: 'toggle' } }); I'd like an effect similar to this. Thanks! ...

Jquery UI Tabs - open link inside tab via ajax

How can I open a tab and load a link via ajax from another tab. Eg: User clicks link inside #tab_a #tab_a hides #tab_b shows with .loading applied Content is loaded via ajax into #tab_b .loading removed from #tab_b I'm using Jquery UI tabs Thanks! ...

How to change the IE7 zoom level using Java script coding

Hi, I have developed web application using using asp.net2008. Application has to work in any screen resolutions. we can do this by using different css as per screen resolution . But I want to change IE7 zoom level using Java Script. If we find out this way will be very usful for our appliclation work in different screen resolutio...

jQuery XML export or Simple JavaScript file download

Hi, I have dynamically created a xml string form a JSON object returned from server. I need to give the user to download this as a file so that when the user click the button named export he/she receives a downloadable.xml file and can be save d on local machine. Is this possible? -- Mithun Sreedharan ...

Javascript selecting option from a select dropdown, using a href.

Hello, Im working on a CMS website that creates form elements on the fly according to id and values. I need to select certain information out of these forms using a link. For radio options and checkbox options I use this code: <a href="#" onclick="document.getElementById('RAL1').checked=true">1001</a> Which works fine. RAL1 is the id o...

how to prevent your javascripts being stolen,copied, and viewed ?

i know its impossible for 100% protection, but something high or that works for majority of the users. for instance, i encountered a site where viewing the current page's source returned nothing. in another case, accessing or trying to download the .js files itself from browser http://gget.com/somesecret.js, it would redirect you an...

Report user errors in jQGrid

I have a jqgrid table querying a MySQL DBMS through an apache2 web server via XML. Sometimes whenever the DB server shuts down or the server side program encounters some kind of crashes the jqgrid just freezes down waiting for the XML data to arrive. In this kind of situation, I would be preferable to make the jqgrid user aware of thi...

How does one pass string contains '\' from from asp.net server side to Javascript function?

How does one pass string contains '\' from from asp.net server side to javascript function? After checking parameters at client side, all '\' replaced with '' even, replacing '\' with '%5C' at server side doesn't work. Any idea? ...

Microsoft Ajax Minifier and NAnt

Hi folks! Could someone explain to me how to use the Microsoft Ajax Minifier from a nant-script as a nant-task. I've seen examples of how to use it in Visual Studio but I would like the minification to be done on our CI-server. ...

window.parent jQuery selector not working in IE8

this code bellow works fine $('html').bind('mousewheel', function(event, delta) { window.parent.scrollBy(-120 * delta,0); return false; }); but this one doesn't, can anyone tell me why. I'd love to know. $(window.parent).bind('mousewheel', function(event, delta) { window.parent.scrollBy(-120 * de...

Tips on resources for moveable components

Hi, I would like to create a user interface like the iGoogle or facebook profiles where the end user can customize the layout. Move components around, resize e t c Do you have any suggestions on resources/code examples in order to create something like that? ...

How can I store a full url that contains a hashmark within a variable?

I'm trying to store a url such as: http://localhost/pro%5Fprint/index.php#page=home in a variable, but I can't find a function that does that. I found plenty of solutions to store the index.php, but it doesn't include the hashmark and what follows it. Is there a PHP solution for this? I did see that I can get the full url including ha...

General rule for tag parameters dynamic changes

Just found that changing href dynamically can be implemented differently and one method with document.anchors[] = works for FireFox and Chrome and does not for IE while using document.getElementById(..).setAttribute('href', works for All. Is there a general rule for such changes that one can take for granted or is it always tag...

Unable to get a checkbox to be checked (not a simple question!)

Don't dismiss this as a newbie question! It's not, I'm not, I've tried everything, and its a complex/convoluted environment that my code is in. Okay - here goes. I'm adapting someone else's html/js/css code and trying to get it to work on my server (I've taken permission - please, no comments on that). The main html generates a overlaid...

How to move <div id="mbr_img"> above <div id="mbr_music"> in pure javascript?

<div> <div id="mbr_music" class="mb"></div> <div id="mbr_img"></div> </div> I'm doing it this way: var oDivMusic = document.getElementById("mbr_music"); var oDivImg = document.getElementById("mbr_img"); oDivImg.parentNode.removeChild(oDivImg); document.body.insertBefore(oDivImg, oDivMusic); Which is not working,how to do it correct...

jqtransform and collapsed DIV

Hello, I am using a jQuery plugin called: jqtransform This plugin uses JavaScript to apply CSS styles to form elements. The problem that I have consists in the following scenario: I’m building a search page, with a advanced search option. When the page loads, the div called “advancedSearch” is hidden, and it will only show if the use...

JQuery, new JS function syntax

Can someone explain me the syntax below line 1? I am OK with js and function references, but this code looks a bit confusing. E.g. is it function declaration and execution? jQuery.noConflict(); (function($) { $(function() { // more code using $ as alias to jQuery }); })(jQuery); // other code using $ as an alias to the other li...

How to Customize a .NET Build?

I want to customize a .NET build process so that I can run an executable (a Javascript minimization program) across all my Javascript files before deployment. I've searched on the web, and I am not seeing a good way to do something like this. Can someone point me in the right direction? Thank you. ...