javascript

Form submit event problem

<form id="form1" runat="server" onsubmit="return CheckForm(this)"> <script type="text/javascript" language="javascript"> function CheckForm(frm) { if(CheckEntireForm(frm) == false) return false; } </script> Hello EveryBody Please help me to get solution I've us...

Is there a redraw-event for HTML5's canvas element?

As the title says, I need a notification when the content of a canvas element was redrawn. Is this possible? If not, a notification when the whole page was redrawn would also be ok (reDRAWN not reLOADED!). The reason why I need this is that I want to get the current FPS of an animation running inside a canvas. ...

Search functionality in a lightbox

Hi All, I have a page on which there is a link search. onclicking search i open a LIGHTBOX where i get a textfield and Search button. Now i want when i enter keyword in textfield and enter on submit button a result should be shown in a lighbox only. is it possible w/o ajax or i have to use ajax form only. just curious why we used get...

What is the right way to make a new XMLHttpRequest from an RJS response in Ruby on Rails?

I'm trying to come closer to a solution for the problem of my previous question. The scheme I would like to try is following: User requests an action from RoR controller. Action makes some database queries, makes some calculations, sets some session variable(s) and returns some RJS code as the response. This code could either update ...

french chars html - javascript

I have an html page were i can fill in some text and send (with javascript) this to an sql-database. On my pc, everything works fine, but on another one (a french windows), it doesn't save my chars correctly. french chars like é, è, â,.. were saved as 'É', or something like that. I googled a lot but still did not found any solution,...

UpdatePanel Javascript Error on Adding Clientside Listbox items After postback

Hi, I have a Dynamic list control of Metabuilder.Webcontrol inside UpdatePanel,I am adding removing Items using Javascript from the list control. It works fine Inside UpdatePanel. I have another control Gridview along with checkbox's which require postback to get populated. Once It gets populated successfully inside update without po...

JSF Double Click perform action

Hi, How can I execute a backing bean action when a user double clicks on a menu? e.g. using a selectManyListbox I assume I would need some javascript to execute a backing bean action using ondblclick. Is there a way to do this? Thanks, Dwayne ...

Reload page using prototype

Is there a way to reload a page using prototype (or redirect to itself)? ...

Javascript to make input field in edit mode(insert mode)

How is it possible to make a input field editable in javascript. I mean onFocus putting it in insert mode so that values can be overwritten. Any suggestions ??? ...

I can't get onChange to fire for dijit.form.Select

I seem unable to correctly attach the onchange event to a dijit.form.Select widget. However, I am new to web development, so I could be doing something completely idiotic (although, as best I can tell (and I've read all the docs I could find) I'm not). I made sure the body class matches the dojo theme, that I dojo.require() for all the w...

looping through json data in JavaScript

This is similar to this question, but I thought I'd reword it a bit differently in order to make myself more clear. I have this json coming back from a $.ajax call: {"COLUMNS":["PERSONID","FIRSTNAME","LASTNAME"],"DATA":[[1001,"Scott","Wimmer"],[1002,"Phillip","Senn"],[1003,"Paul","Nielsen"]]} Q: In JavaScript, how do I parse through it...

Whats the quickest way to get rid of all the properties of a an object in javascript?

I have an on object like so var obj = {}; function set() { obj.x1 = 20; obj.y1 = 35; obj.x2 = 60; obj.y2 = 55; ... } Whats the quickest way to delete/reset all of the properties of obj? ...

How do I keep existing values from shifting to the right when entering keypresses into a jQuery Masked Input?

I have a text box I'm using as a timer display "hh:mm:ss" When I select the box and press a number, it inserts the number at the cursor location, but instead of replacing the value at that position, it shifts all existing values over. For example, the timer text box reads "01:00:35" and I replace the first minute position with 1, the ti...

prevent escaping special characters on textnode(JS-HTML)

Hello i followed this snippet http://bytes.com/topic/javascript/answers/504399-get-all-text-nodes var xPathResult = document.evaluate( './/text()[normalize-space(.) != ""]', document.body, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null ); for (var i = 0, l = xPathResult.snapshotLength; i < l; i++) { var textNode = xPathResul...

what's syntax for uncheck the checkbox for in specific row?

I'm new to JQuery, i want to uncheck certain row in the repeater grid. I got this work, this will uncheck all checkbox for me. $('span.chkIncRows input').attr('checked', false); This works for me, if I want to uncheck row #2 checkbox from the repeater, without passing row number. $('span.chkIncRows input')[2].checked =false; ...

Is there a workaround to trigger an option.click event in IE?

I am using a dropdown to allow the user to sort search results. These results in a table but not all of the sortable criteria are represented by columns. The columns can be sorted by either clicking on the column header or using a 'Sort By' dropdown. The user can reverse the sort by clicking on the sorted columns header. I am trying to d...

Catch all DOM events on a page (without Firebug et. al.)

How would I go about creating a cross-browser script, that would intercept all events firing on a page/browser window/DOM-tree (regardless of browser)? What I'm hoping to accomplish is basically to get a better understanding of the different handling of events in different browsers; I know the basic theory, but need to see to believe......

In an ASP.NET MVC site, where would the JQuery code go?

I'm just getting started with ASP.NET MVC. I'm going to be using JQuery on the website I'm making, but I'm not really sure about one thing: where would JQuery code be placed? This concerns two things: Where do I import the JQuery JavaScript file? (I've been thinking that the Master page would be a good place to do this; am I right, o...

client generated double submit cookie, cross site request forgery prevention

in a double-submitted cookie csrf prevention scheme, is it necessary for the server to provide the cookie? it seems i could have javascript on the clients page generate and set a cookie "anti_csrf", then double submit that (once as a cookie, done by the browser, and once in the body of the request). a foreign domain would not be able t...

HTML javascript form submitted when image input button

I have a form that contains this single input field, which is nothing more than a button to Print the current web page: <div align="center"> <input type="image" src="../Images/print.jpg" value="Print" onclick="printpage();" /></div> </div> After the printing, the page re-submits itself (to itself). Why does it do this and can I stop i...