javascript

Maddening IE javascript problem?

I have a page that uses a bit of jQuery and an effect called 'kwick' - in my sample page hosted at http://www.batsumaru.com/main.html it worked fine in all browsers, no problem. But when the actual code was produced at http://www.batsumaru.com Internet Explorer shows a script error (object does not support). I tried my best to debug but...

Can this snippet of Javascript be simplified more with jQuery?

I have the following snippet of Javascript, which is just attaching an onclick to a button and then updating the text of an em tag underneath it. I'm slowly trying to educate myself and work with jQuery more as I've found to like the syntax a lot more and for some tasks, it's more of a pleasure to work with. Some of the best examples I...

What is the highest possible z-index?

I couldn't find that in the specs. I am using lot of of 3rd party javascript and want to make sure that certain piece appears on top of everything else. ...

What is the best JavaScript solution to limit the length of a textarea?

Is there a canonical solution for limiting the number of characters that someone can enter into a textarea? I have server side validation of course, but would like to improve the user experience by adding client side code to simulate the experience you get with maxlength on an input[type="text"] so that users never see the "your input i...

FCKEditor - how to make a simple plugin?

I have a site that uses the FCKEditor. I'd like to make an incredibly simple plugin: when a user selects text and then hits MyPluginIcon, the editor surrounds the text in a span tag with a specific class. So it's just like the Bold or Italic button, but for: <span class="blah">EtcEtc</span> I am far from a JS expert, so I have been ...

What is the best approach for confirming html form fields?

A lot of times you get a form where you need to enter an email address (or other form field) twice in order to confirm that you typed it correctly the first time. Some forms disable the copy and paste action (via javascript) in the browser to force the user to type the email address again. Personally I find this highly annoying. What a...

Why Haven't GWT- and Script#-style Frameworks Become Dominant?

With GWT, we can write code in Java and have it translated to JavaScript code. With Script#, we can write code in C# and have it translated to JavaScript code. It sounds GWT and Script# will save web developers from suffering javascript pains. Then, why these tools haven't been dominant? Why still people dedicated to write javascript cod...

Is there any way to reset the cursor to the beginning of a textbox when it loses focus?

I have some input[type="text"] textboxes on my form that are sometimes not wide enough for the content that gets typed into them. Currently, if a user types more text that fits (but is under maxlength), the textbox scrolls as you would expect. When they tab out of the textbox, the textbox stays scrolled to the "end" of what they typed....

Duplicate explorer/outlook type application on a web page

We have an ancient application that basically duplicates a file explorer, outlook style application in html (menu and toolbar on top, tree on the left, gridview on the right, and yes I know it is a bad idea to bring desktop UI to the web, but it was 2000 and seemed like a good idea at the time). The main problem (other than the HTML is ...

How to create a "Processing" page?

Can someone tell me how to create to a "Please Wait" page. When the pageload is complete, the default.aspx page shows up. Is there a way to do that? I do not want processing images or anything like that. The actual page would be what I would want. ...

How can you select the text in a div (for copying into the clipboard) from javascript?

I have a div containing some text that I would like the user to be able to easily copy from the page (via the clipboard). Is there a cross browser way to select all of the text within a div on a mouseclick? ...

JQuery isn't recognising a #id selector, seems to be dependent on the URL

I'm writing a Ruby on Rails app. The following jQuery code is included in the head tag of the index.html.erb file, which is the template for all pages on the site. <script> $(document).ready(function() { $("#select_mailshot").click(function () { alert('mailshot'); document.location.href = "/products/1"; }); $("...

CSS horizontal table cell spacing: how?

Hi, Hopefully this is an easy one but I have not found a solution. I want to put space between columns on a table. Example | Cell |<- space ->| Cell |<- space ->| Cell | An important point is that I do not want space on the edges. There is a border-spacing property but it is not supported in IE (6 or 7) so that is no good. It also...

Capture link clickthrough events from Javascript

In order to track the overall user clickstream, I'd like to fire a javascript event, if the user right-clicks, and select "Open in new Tab" (or middle-clicks in most browsers) on a link. Most of these links are linking outside of my site, and I'd like to interfere with overall browser experience (such as: status bar, etc) as little as p...

Whats the best JQuery book?

I am a good javascript/asp.net developer, but i am just starting to learn JQuery, Whats the best book to learn JQuery? Books i like their style: Complete reference How to program ...

Extjs Custom TriggerField implementation

hi, this is my first question here.. I hope I can contribute with answers too.. My need is to build an Extjs TriggerField implementation which open on trigger click a Panel with a custom loaded page inside... example: When I click the trigger button I what to open a panel specifying an url as '/Views/Test/Blabla.aspx' and then storing t...

Trying to pass in a boolean C# variable to a javascript variable and set it to true

Hi, Having issues where in my .aspx page I pass in a boolean variable (C#) to a javascript function that is expecting a boolean type. BUt the C# variable returns True, and javascript doesn't like the uppercase. myjavascript( <%= MyBooleanVariableInCSharp %> ); If I convert the c# variable to string, then my javascript variable becom...

Converting decimals to sexagesimal (base sixty) in javascript

What is the best way to convert decimal numbers (base ten) to sexagesimal (base sixty) represented as a string using 0-9, A-Z and a-x as the digits. I'm planning to code it in javascript but any help is appreciated. Usage Example: >>decToSex(60); "10" >>decToSex(123); "23" >>decToSex(1000000); "4bke" >>decToSex(1234567.89); "5gu7.rO" ...

Refresh Problem

Hi Everyone i am working on chat application in asp.net C#. application work very nice but when anyone press F5 or refresh button of browser that time whole page is refresh that time all thing i get back but if i done file upload that time upload one more time can done. anybody say why it happen. when i press refresh that tim...

Experiences with Javascript History Frameworks

I'm seeking a javascript history framework to handle navigation inside a page when the user selects multiple options which change the page behaviour. There are multiple artefacts on the page that change the data loading of the page and I'd like to store this as a stacked set of behaviour. In a wider sense, I'd like to add this as a tool...