javascript

Select top level list items only with Cufom, Jquery

The below JS is selecting all of the list items, i need to select only the top level list item anchors. HTML and Cufon below: <script type="text/javascript"> Cufon.replace('#navigation ul#nav li a', { textShadow: '#dedede -1px -1px', hover: { color: '#2a668f' } }); </script> <ul> <li><a></a></li> <li><a></...

jQuery Dialog makes scrollbars appear in main content

This test of jQuery dialog makes the scrollbars appear in the main content when the dialog is opened. When I touch the dialog resize, the scrollbars go away. Is it the way I defined the dialog or too much content? Click the [!] in the top right corner to see this. Platform: XPsp3, browsers: FF3.6.3, IE8, Safari 5 Thanks ...

javascript, ie: xml with special characters, loadxml(xml) returns false

Hi! I am sending a xml document with grails to the webbrowser and want to show parts of it. However i get an error. I debugged and the error was because of the special charakters like ü,ö a.s.o In Firefox I dont have any problems, it works. However Internet Explorer 8 doesnt load the xml. I looked at the response, and saw, that it canno...

How can I have a form where the text in the input disappears when clicked? (for feedburner form)

Hi all, I've got the following "subscribe by e-mail" form: <form style="border:1px solid #ccc;padding:3px;text-align:center;" action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=food101coil', 'popupwindow', 'scrollbars=yes,width...

jQuery accordion header

I want to add some toolbar icons in header of accordion but when i add onclick event handler is in header also nad its toggling accordion. How can i define toggle accordion only for part of header. Header property does not help because then it minimizes the width of accordion depending of the header width ? ...

Where is form response stored ?

Suppose I have a radio button collection. While I am selecting/deselecting certain options, Tick mark seems to be moving as well. However if I see the HTML code, none of the options really show a "checked=true" in html. 1)So where is this information stored about my choices really ? DOM objects ? Also using JS I change the checked attr...

How to substitute a content of certain javascript reference with local script for debugging?

I need to debug jasvascript loaded by page. Loaded page are not locally placed. Loaded js is packed. I want to substitute it with unpacked version. Is there any tricks or browser options to make it? ...

How to detect the window(new tab) close event?

Hi, I have one parent page and child page. the child page opened in new tab I want to show one alert message (The child page is closing), when i close the child tab. How to show the closing messgae, when close the tab? (Not refreshing time) I used onunload, and onbeforeunload. Two methods are also called, when the page refresh an...

Selecting textbox value when pressing the next button

Hi All, I have a grid of textboxes. When the user presses the arrow button I need the cursor to select the contents of the textbox in the direction they have just pushed. I have tried using JQuery's .select() method, but this doesnt seem to work in IE. Could you give me suggestions on how to get this working? Thanks in advance. ...

Getting Deleted character.

in in Input field, if the user presses Backspace or Delete key, is there a way to get the deleted character. I need to check it against a RegExp. ...

Compressing Web Pages Before Sending

Is it possible to compress javascript files.... or anything related to a web page before sending it to the client? i am using telerik controls, and found that their controls write a lot of extra javascript code that makes the page size huge (something around 500KB). ...

javascript cross-domain issue

Hi, I am building a small widget that I am giving to users to embed in their websites and blogs. Now the widget loads a javascript file in the page where it is embedded from my server, which in turn puts an xmlhttp request back to my server to obtain data. Due to security reasons this request is being blocked when placed on other server...

How to make a div appear all over the site?

Hi, im trying to make a 50% opacity div appear all over the site, i gave it position absolute and width, height of 100%. but its still appears only parts of the site, if you scroll down, its not wrapping the rest of the site. what can i do? thanks! ...

JQuery DataTable Cell from a row click

Hello all I am trying to implement a function on jquery datatable, that returns the 1st and the 4th column of a clicked row i am following this example, which allows me to manipulate a clicked row http://datatables.net/examples/api/select_single_row.html thinking that i can change this handler to do the read cell value procedures and...

Best-practice for javascript configuration on new web project

Hi all, I would like to ask a question about a new and large scale web project's javascript requirements. We will use lot of javascript, ajax requests, jquery, json objects & jquery plugins in our project. We planning to store global variables and lot of default values in a global site configuration file with php class and ini file on s...

changing the JW player source

i'm using jwplayer for my flv files i try to change by Javascript the source of the flv file in the object so i can switch between 2 video files (or more) is any way to do so? ...

Event Handling in IE

Hi, I have the code included below that allows me to do something the first time a user mouses over an element and then remove the event. It plays nice in the W3C event model browsers but keeps throwing an error in IE6-8. I got the code from another question and believed it would handle IE. Anyone see what I'm doing wrong? <scrip...

make javascript function callback-ish

Hi, i'm having a javascript function using jquery: my.namespace.loadSomeStuff = function() { $.get('/Services/loadStuff', function(c){ $("#stuffDiv").html(c); }); }; and am trying to write unit tests for this. now, since this function is not really returning anything and loading some stuff asynchronous using jquery's...

Auto-detect a screen resolution and change browser zoom with javascript

Hi guys! Anyone can help me? Thanks ...

Is it possible to cache JS inside <script/> tags on HTML page?

When JavaScript is inside external .js file it's cached on the browser. Is it possible to do the same with JS inside tags on HTML page? ...