javascript

asp.net --> forgot password functionality ..

Hi, I am doing "forgotpassword functionality" in asp.net My forgotpassword.aspx page consists of a username, security question, security answer, new password,retype password and a submit button. When I click on the "forgotpassword" link at the previous page, it should prompt me about the security question and when I enter the answer a...

jQuery media browser

Hi, I am attempting to build out a visual jQuery based browser for thumbnailed assets grouped by the upload date of the asset. The backend part is fine, but I'm having a really hard time finding a workable visual solution that can handle (potentially) hundreds to thousands of assets smoothly. The display of the content is not an issue...

Puzzling javascript array behavior

So, this may be a really stupid question, but I'm obviously missing something here. Consider the following code: var selectedItems = []; selectedItems.push("0ce49e98-a8aa-46ad-bc25-3a49d475e9d3"); //fyi, selectedItems[selectedItems.length] = "0ce49e98-a8aa-46ad-bc25-3a49d475e9d3"; produced the same result. At the end sel...

jQuery click function only works on first element.

Hello, I am having some trouble with jQuery. I am making a simple CMS and in the interface I have a list of pages, in each list item is an edit link. I made jQuery listen for clicks with that edit id. It will then look at the parent LI to see what id it has so the user can save the changes to the right pageId in the database. My List ...

Why do i need to add /g when using string replace in Javascript?

Why is the '/g' required when using string replace in JavaScript? e.g. var myString = myString.replace(/%0D%0A/g,"<br />"); ...

JQuery/JavaScript increment number

Hi Guys, I am trying to increment a number by a given value each second and retain the formatting using JavaScript or JQuery I am struggling to do it. Say I have a number like so: 1412015 the number which this can be incremented by each second is variable it could be anything beween 0.1 and 2. Is it possible, if the value which...

Matching form entries with javascript?

Hello, I have a form with markup like this.... Which voucher did you cut out <div class="answer item1"> <input type="checkbox" name="downloaded_vouchers[answer1]" id="answer1" value="1"/> <label for="answer1">Answer 1</label> </div> <div class="answer item1"> <input type="checkbox" name="downloaded_vouchers[answer1]" id="answ...

jQuery pause function execution and do something else while paused

I have something like this: function doSomething() { var obj = $('somediv'); ... waitAndDoSomethingElse(obj); ... $('somediv').show(); ... } function waitAndDoSomethingElse(obj) { obj.fadeIn(); .... } I want doSomething() to pause... execute waitAndDoSomethingElse() and then continue... Any ideas? Thank ...

Show/Hide div tag javascript.

I have a gridview column that's gets a large amount of text from the server. So instead of showing all that text after the grid loads I want to show it only if a user clicks an Expand link then closes it with a collapse link. Here is what I have. Please note that I already know that I can put both javascript functions in one; I'm testing...

Move page specific jscript and css to another file with a macro in visual studio

I'd like to create a macro which moves all my page specific style and javascript to named files. For example: default.aspx contains <html> <head> <title>Weeee</title> <link type="text/css" rel="stylesheet" href="../content/style.css"/> <style type="text/css"> /*page specific style*/ </style> <script type="text/javascript" src="../con...

Input Form Selectable Images

I am looking to create an option within a form to choose a theme for the page. The options need to be displayed as images so the user can see what the theme looks like. What is my best way to implement this? ...

Use Jquery to navigate away from page

I will only have a relative link available to me but i want to use Jquery to navigate to this rel link. I only see .ajax functionality in jquery. how can i do this using jquery or just pure DHTML/javascript? ...

Making browser vertical scrollbar return to top in ASP.NET code.

Does anybody know how to make the vertical scrollbar the browser window return to the top in code? Either javascript or code-behind would be fine. ...

Why isnt my Jquery background image switching?

Heres my Jquery $(document).ready(function(){ $('a.toggle').css('background-image','url(http://blah/resources/img/close.gif)'); $(".sectiontitle").click(function(e){ $(this).next('div').slideToggle("slow"); el = $(this).find(".toggler > a.toggle"); currBg = el.css('background-image'); if (currBg=="url(http://blah/resources/im...

How do I access different levels of "THIS" in jquery?

I realize the code below is not the most efficient way of grabbing elements, but for the sake of an example... $('.myFirstClass').each(function(i){ // Here is the first 'THIS' occurrence $(this).find('.mySecondClass').each(function(j){ // Here is the second 'THIS' occurrence // How do i access the first occurrence from...

Adding an onclick event to a table row

Hey! I'm trying to add an onclick event to a table row through Javascript. function addRowHandlers() { var table = document.getElementById("tableId"); var rows = table.getElementsByTagName("tr"); for (i = 1; i < rows.length; i++) { row = table.rows[i]; row.onclick = function(){ var c...

Regex to match contents of HTML body

EDIT: OOPS, sorry I wasn't clear. I have a string that I get from AJAX that is an xhtml document, I need to get the body tag of it, unless I can generate a dom tree from the string? I need to get everything from a body tag in a string, including markup, with a javascript regex. I know that this is a duplicate, but the regexes I found i...

Can JavaScript tell the difference between leaving through the back button or a link?

My application has pages with several tabs that simply switch the visible content. However, the page also has links that will add tabs to the page. In addition, the application remembers (with cookies) which tab you last viewed in case the page is refreshed (strict cache settings cause refreshes even when using the back and forward but...

how to use Dictionary or Hashtable in Javascript?

Possible Duplicate: Can anyone recommend a good Hashtable implementation in Javascript? Hello everyone, I want to calculate/store some statistics information using JavaScript, the equivalent code in C# is below (features I need are -- key-value pair, string/int key value pair, manipulate values by keys, etc.), any ideas how to ...

See if a variable is an array using JavaScript

Possible Duplicates: How do you check if a variable is an array in JavaScript ? What is the best way to check if an object is an array or not in Javascript? How can i tell if a javascript variable is an array? ...