javascript

How to bypass onSubmit Form validation in ASPX page

Hi, i have a form on a particular ASPX page that has custom js validation. Also on this form is a navigation menu in the header. The navigation menu items are built programatically and are initiated by __doPostBack calls which obviously submits the form. The problem i am having is that the form itself has code something like the follow...

window.open("c:\test.txt") from Silverlight

I'm trying to open local file from Silverlight. I try Window.Navigate("c:\test.pdf", "_blank") and invoking JavaScript like this: window.open("c:\test.pdf", "_blank") Both give "Access is denied". However it works in plain HTML when I do <input type="button" value="test" onclick="window.open('c:\test.pdf', '_blank')" /> I...

java and jsp_sessiion expired_redirect

Hi i am working with java and jsp for mail project i want to redirect the page with xml r by some way when the session is expired or i want to deactivate the window when session is expired... please help me.. thanks in advance... ...

Adding and removing inputs via jQuery's remove(), but page gets slow, how to free memory?

I'm dynamically adding a lot of input fields through jQuery but the page gets really slow when reaching 200+ inputs (think of the page like a html excel sheet). This is fine really because this scenario is not very common. However, when I dynamically remove the input fields from the page using jQuery's htmlObj.remove() function, the page...

ASP.Net AJAX - IE 6/7 Memory Usage?

Hi, We're carrying out testing of our ASP.Net AJAX application, and are finding memory usage in Internet Explorer 6 & 7 increases by at least 2mb for each page refresh - whether refreshing the same page or navigating to a new one. This happens on the most basic of maintenance screens, and even on the main page where we've only got the ...

codemirror live syntax highlighting: extend for {tags}

I have implemented Codemirror http://marijn.haverbeke.nl/codemirror/ to work as a live text editor within an application and it works perfect. The only thing I would love to do is create a custom color (e.g. red) for tags used in our system. We would be using tags like {something here} or {{something here}} doe anyone know how I can...

extjs - 'Store is undefined'

Hi all, I'm pretty sure this a trivial problem and i'm just being a bit stupid. Your help would be hugely appreciated. In controls/dashboard.js I have: Ext.ill.WCSS.controls.dashboard = { xtype:'portal', region:'center', margins:'35 5 5 0', items:[{ columnWidth: 1, style:'pad...

Prototype: Need a javascript autosuggest tool

HI guys I'm building a web mail client interface and would like an autosuggest script that could be used in filling out the recipient addresses. I've checked a few scripts but they limit by either allowing to choose only one element, or you can enter only elements from the drop down list - I just need one which not only allows you to add...

Is it possible to copy, paste, open new window in javascript?

At the moment to get to an external link from our intranet, we have to copy the link, and paste the link into a new window. Is there any way we can achieve this in a single function in javascript? Thanks UPDATE: When users login from outside the network, urls are changed. This is what we need to code for. I think I the following is app...

JSON Date coming through as Today's date?

I'm trying to convert a JSON date to a dd/mm/yyyy format, which I'm managing to do semi-successfully. The problem I'm encountering is that the date from the record in the DB is for example, 2009-06-29 which is returning the usual JSON /Date(1246230000000)/, however, when I try and turn it into the previously mention dd/mm/yyyy format, i...

How to synchronize data between model and view (2 ways) in javascript?

I try to use jQuery plugins like chain.js or DataBind, but it is not quite what I need... Chain.js can't store changed data to the model (as I know). DataBind have method unbinddata(), that store changed data in JSON structure, but can work only with form inputs, not with attributes or $(el).data(). ...

Get version number from String in Javascript?

I have a version number with 3 digits as a String, var version = "1.2.3"; and would like to compare it to another version. To see if version is newer than otherversion, var otherVersion = "1.2.4"; How would you do it? ...

Javascript wysiwyg editor with image upload functionality (use with JEditable)

I'm looking for a good wysiwyg editor with image upload functionality (i.e. a user can add as many pictures as he likes, form URL's or disk, and they'll be uploaded). I already tried TinyMCE, but it was really heavy and took a very long time to load (I'm using JEditable to only make the editor appear when the user clicks on it). ...

Recommended Javascript Framework for Single-Page-Applications

Which Javascript Framework do you recommend me to create a medium-large size Single-Page web application? These are some alternatives I'm considering at this point: JavascriptMVC Sammy SproutCore Make my own customized implementation on top of jquery I plan to make use with ASP.NET in the server side, in case it matters. ...

IE 8 html parsing error message.

I'm experiencing the problem outlined in this kb article. http://support.microsoft.com/kb/927917 . Sorry I can't hyperlink cos i don't have enough points! "This problem occurs because a child container HTML element contains script that tries to modify the parent container element of the child container. The script tries to modify the pa...

How to exit mootools each()

How can I exit the each function when the conditions was true once? This does not work: $$('.box div').each(function(e) { if(e.get('html') == '') { e.set('html', 'test'); exit; } }); ...

Count the no of LI then add class to parent UL.

<ul class="taglib-ratings thumbs"> <li id="qezr_yourRating"> <a href="javascript:;" class="rating rate-up "></a> </li> </ul> <ul class="taglib-ratings thumbs"> <li id="qezr_yourRating"> <a href="javascript:;" class="rating rate-up "></a> </li> <li id="qezr_yourRating"> <a href="javascript:;" class="rating rate-up "></a> </li> </ul...

Jquery .each(): find elements containing input

Hey, I have a table which have a thead section and a tbody section. Im using jQuery each to find and count all THs in a table. This works fine. But at the same time i want to check if the TDs of the THs in the tbody is containing any input elements. Here is what i have so far: jQuery('#' + _target).each(function () { var $tab...

w3c document.forms[0].fieldname equivalent

I've been using document.forms[0].fieldname.value to get values in javascript from a form, but I'd like to use a name to reference the field and not a 0, what would be the equivalent these days since isn't compliant? ...

how to get gridview textbox control id in javascript

Currently I'm working on gridview it's have textbox on submit click I want to get textbox id of gridview but I an unable to find it button submit. Could anybody help me get the id? ...