javascript

Javascript XML Parser

Hi, We've sets of webservices and we have to make request on clientside (sending request to getting response in a jason format, and parsing XML document through - having XSLT support would be great). We need a Javascript library which will be independently responsible to all the above work and should handle browser compatibility issues...

Jquery - multiple checkbox and multiple textbox

I have 4 check box when i select anyone of the check box need to display the respective check box and text box. input type="checkbox" id="acheck[]" value='name' input type="textbox" id="productfield" value=' ' jquery Code: $(document).ready(function() { $("#productfield").css("...

How to make in Javascript full screen windows (stretching all over the screen)

How can I make full screen in JavaScript that works in IE, Firefox and Opera. When I mean full screen I mean one that takes all of your screen ...

Using JavaScript to scroll through a list of items in ASP.NET MVC

Hello, I'm new to ASP.NET MVC and also to JavaScript. What I've got currently is a simple webpage that displays information about employees that is read from a database. Part of the information regarding an employee are his paychecks. Currently I receive this information in an array from the site controller. What I want to do is to use ...

regular expression error in javascript

I'm staring blank on this error, so I hope someone here can point out where I go wrong. This function should replace a parameter's value in a querystring with a new value: function ReplaceParameter(querystring, key, value) { var myregexp = new RegExp("(?<="+key+"=).+(?=&)", "i"); return querystring.replace(myregexp, value); } ...

How to highlight changes/difference in one text paragraph from the other?

Hi! Is it possible to highlight the modifications in one text paragraph from the other? For example, there are 3 text fields in a database. Non-admin users can edit the text and submit for approval. When the admin logs in, (s)he can open the approvals page and it shows the original text and user submitted text with modifications. Usual...

How to create constant data

I'm designing some classes and for some data I want to use fields that are constant. Now, AS USUAL, IE does not support the key const so const T = 10; not work. I could create a property via __defineGetter__ and __defineSetter__ to mime that but , AS USUAL, IE does not support that syntax (IE 8 has Object.defineProperty but not work...

write an IE XHR proxy in javascript

Problem: I am looking for a way to intercept xhr.open() calls I am writing a framework which will run along side exiting code, over which i have no control I need to intercept the open calls in this existing code. I cannot change the existing code I must thus override the native XHR implementation for both IE and Firefox. I have made...

How to move cursor to end of contenteditable entity

Hi I need to move caret to end of 'contenteditable' node like on gmail notes widget i read threads on stackoverflow, but that solutions use input's and doesn't work with content editable ...

How to impose maxlength on textArea in HTML , Javascript

I would like to have some functionality by which if i write <textarea maxlength="50"></textarea> <textarea maxlength="150"></textarea> <textarea maxlength="250"></textarea> it will automatically impose the maxlength on the textArea. If possible please donot provide the solution in JQuery. Note: This can be done if i do something li...

passing parameters from Javascript

I have the typical HTML "contact me" page, i.e. name, e-mail address and message. Since I want to do input validation on the page itself using Javascript, I can't use a "submit" button, otherwise the attached Javascript function would be ignored. At least that's how I understand it, CMIIW. I tried to load the next page wrting "location =...

jQuery multiple checkbox filters

Hi All, I have a list of events, these events are each of a specific type, and start in a specific month. I have a checkbox group for types and one for months. What I'm trying to do is use the checkboxes to filter the list. I've got it working with one group, but can't seem to get it working with two. Basically I'm trying to set a cla...

Should you do validation on the server side?

Should you do validation on the server side, or is it ok to just do the validation on the client side? @TheTXI I am happy your amazed I just did not want to leave anything out that could potential change someone answer to give me false information. It seems alot of people touched on what I was going after but the part of the Ajax s...

IE8 XmlHttpRequest Debugging

I am looking for some way to elegantly inspect XmlHttpRequests in IE8. I wouldn't mind a plugin or an external program. I have yet to find anything that works nearly as well as Firebug. I have already tried Julien Couvreur's bookmark debugger, but it did not seem to work with Prototype. Julien's Script ...

reading option of three select tags with same name

Hello How can i have three or more select tags with same names(as in my program, the select tags are being generated dynamically), and select independently what option was selected. I have a loop, where my php reads a sql table, and for each row, it creats a select tag and a button with it. <select name="vote"> <option value="1">...

Slide out and fade effect using jQuery and localScroll

Hi guys! I'm using localScroll to create a content slider. The problem is that I want to give a fade effect to the div that I'm sliding out, to make it fade before it disappears. Does anyone have any idea how can I make this? I tried something with onBefore and onAfter but I didn't get what I expected. Thanks! LE: here is the code th...

How do I load external JSON from a script on a web page?

I'm trying to load data from an external .js file, containing a json representation of a bunch of data. I cannot for the life of me figure out how to access the data inside the page. I'm sure this is really easy and I'm missing something simple! right now, I'm trying this: $(document).ready(function(){ $.getJSON("http://api.crunch...

Unobstrusive JavaScript for Digg button?

I want to add the Digg button on my webpage but don't want to add the script tag directly on the page. <div class="digg"> <script type="text/javascript"> digg_url = ''; digg_bgcolor = '#99ccff'; digg_skin = 'compact'; digg_window = 'new'; </script> <script src="http://digg.com/tools/diggthis.js" type="text/javascript"></...

How can you determine the file size in JavaScript?

I help moderate a forum online, and on this forum we restrict the size of signatures. At the moment we test this via a simple Greasemonkey script I wrote; we wrap all signatures with a <div>, the script looks for them, and then measures the div's height and width. All the script does right now is make sure the signature resides in a pa...

Callback function parameter issue

Hello, I'm writing a callback function for the FB.Connect.showPermissionDialog() function which accepts permissions and an optional callback function. It's supposed to be passed null if the user rejects the permissions dialog. But for some reason, my script always makes the post request even if the permissions request failed. echo("F...