javascript

Javascript culture always en-us

I'm not sure if I understand this code or if I'm using it right, but I was under the impression that in an ASP.NET 2.0 AJAX website I could run javascript like: var c = Sys.CultureInfo.CurrentCulture and it would give me the culture/language settings the user had specified in their browser at the time of the visit. However, for me, it...

Javascript/Jquery - Reset text box view area after tab

I don't know what this is called so its hard to google for it. If you have a plain html input type=text with a small width eg 20 and then type more characters than can be displayed, it shows the last characters you type. And the first ones are scrolled out of view: This is my long text // this is the whole string my long string // this...

How do I get access to the <html> element in Javascript?

IE displays a default scrollbar on the page, which appears even if the content is too short to require a scrollbar. The typical way to remove this scrollbar (if not needed), is to add this to your CSS: html { height: 100%; overflow: auto; } I'm trying to do the same thing in Javascript (without requiring that in my CSS), but I ca...

Implementing OFX specification with javascript

Hey all, I am working on a personal project and need to retrieve financial data. After looking around how this is normally done it seems you can pay lots of money and license a service like Yodlee to get this data for you or you can implement a OFX client like wesabe has to communicate with financial institutions. Seeing as I don't ha...

Getting the date object to work in IE6 (w/ YYYY-MM-DD param)?

I just got IE6 sprung on me for a project that is going out into the wild soon, which means it's time to go back and comb through all of the CSS and JS. I've gotten hung up on the date object, however: $.validator.addMethod("dateRange", function() { var today = new Date(); var event_date_raw = $('#event_date').val(); var event_dat...

The use of Javascript - stats?

I am looking at redesigning my website and was wondering if I could get some opinions. I know that the rule is usually to design with users without JS first and foremost, but having looked at the stats, it appears 95% of the users online have JS enabled. Would you recommend designing the website using JS and not bothering about people w...

how to jquery event bind to function

<input id='btnExcelRead' name='btnExcelRead' type='submit' runat='server'/> <- actually asp:button <input id='excelUpload' name='excelUpload' type='file' /> <input id='txtStartDate' type='text' /> <input id='txtEndDate' type='text' /> .. $(function(){ $("#btnExcelRead").click(CheckValidation); }); var...

gzip javascript files not with the server

The answer to gzipping javascript files is always some variant of "let the server do it", but what if I want to locate javascript files at URIs that are not behind my web server? How can I store gzipped files and ensure browsers will correctly render the javascript? Do I need to add some header data at the beginning of the file itself f...

How to manipulate width of multiple images in javascript

I have multiple images and i wnat to place all of them in a single line.How should i manipulate the width of images such that the sum of width of al images does not exceed the browser's width.?? ...

How to stop page refresh when hit enter button from rich:inputNumberSpinner field?

Hi, I use rich:inputNumberSpinner tag. The problem is : I set cursor focus to inside of rich:inputNumberSpinner field, then i hit the enter button from my keyboard, that time page will be automatically refresh. But i don't need page refresh when i hit the enter button from my keyboard. The code : spinnerTagTest.jsp <%@page...

PHP auto refresh page without losing user input

I'm working on a PHP collaboration software project. I have a page that shows the latest updates from other users who are adding content to the database, but also has a form input to allow the user to enter text. I am currently using this code to refresh the page automatically every 30 seconds: header('Refresh: 30'); The problem is ...

how to search some character inside string

i have been type some string inside textfield that is "KD-G435MUN2D"... i already use this code for search "UD" character from that string: <script> var str="KD-R435MUN2D"; var patt1=/UD/gi; document.write(str.match(patt1)); </script> but this code doesn't work..where is my fault? ...

html widget communicating with server

I'm making html widget for websites. Let's say, it will display current stock indexes. In short, arbitrary website owner takes code snippet from me and includes it on his webpage http://website.com/index.html. When arbitrary user opens http://website.com/index.html, my code sends request to my server (provider.com), which performs necess...

Aborting jQuery().load()

The .load() function of the jQuery library allows you to selectively load elements from another page (subject to certain rules). I would like to know whether it is possible to abort the load process. In our application, a user can browse a list of items. They may choose to click a button which loads and displays additional information a...

Changing the HTML of CKEditor form elements (in the dialog window)

I'm trying to modify the HTML of the dialog boxes in CKEditor. The HTML inside each of those boxes is an absolute nightmare, and even worse, the source code is compressed and it's unclear what the path of execution is. I want to take something like this: <div class="cke_dialog_ui_select" id="44_uiElement" role="presentation"><label st...

Works in Firefox & Opera, but not in IE8

1) This issue involves just one html webpage, lets call it "ajax.html". 2) I have AJAX functions in this webpage that work in both Firefox and IE8. 3) I now attempt generating just the option values of a dropdown list of dates using my ajax functions, and it works in Firefox & Opera, but not IE8. 4) The surrounding html code for the d...

need code for search another character

how to modify this code if i want search JD from var str="KD-S35JWD"..i try this but doesn't work: <script type="text/javascript"> var str = "KD-R435jwd"; var hasUD; var hasJD; var hasED; var hasEED; var patt1 = str.match(/U/gi); var patt2 = str.match(/J/gi); var patt3 = str.match(/E/gi); var patt4 = str.match(/EE/gi); var patt5 = str....

IE8 is still caching my requests even with mathrandom.

TLDR IE is still caching my requests even with Math.random() included in the URL. So I added math random onto the end of my url: var MYKMLURL = 'http://' + host + 'data/pattern?key='+ Math.random(); I also added math random onto my function param: window.setTimeout(RefreshPatternData, 1000, MYKMLLAYER); function Refr...

Searching for Nodes with Specific Text using the Prototype Javascript Framework

Does the Prototype Javascript library have a selector that's equivalent to jQuery's :contains()? If not, what would what be "The Prototype Way" to selector/filter-down a list of elements that contains a particular string. For example, using the following $$('#some_div dd a') I may get back an array of 50 or so links. I only want th...

after dragging up, animate viewport up and after dragging down, animate viewport down...

I been trying to make this work for the last couple of days, I'm a new into web designing so I hope someone can help me out with this. I'm trying to run an animation after dragging the div container depending if the user is dragging up or down. This is the code that Im working on. this is the code when calling the jquery widget $ $('#...