javascript

When running user inputed Javascript, is there a way to detect and stop "problem" scripts?

On a page, something like jsFiddle, that executes user inputed Javascript, is there a way to stop / disrupt "problem" scripts running in an iframe? The major class of problem scripts would be infinite loops, I think. Browsers deal with multiple alerts quite well, but a script like, ​for (var i = 0; ++i; i < 100) { /* do stuff */ }​​​​​​...

How to disable form button click function for X seconds

I have a form with a submit button. I want to disable the submit button for 10 seconds, and show a countdown, at the end of which the button becomes clickable. How would I do that? Im using jquery on the site, but Im not a JS programmer. ...

How do people achieve the loading effect with jQuery modal windows?

I'm going to be dynamically loading certain information in a modal window via ajax. I've noticed on other sites that a small circular loading animation will appear in a modal window prior to loading the content. Does anyone know how this effect is achieved and possibly where to find the loading animation? Thanks ...

How do I validate a Medicare number?

I'm developing an online form in which user-entered Medicare numbers will need to be validated. (My specific problem concerns Australian Medicare numbers, but I'm happy for answers regarding American ones too. This question is about Medicare numbers in general.) So how should I do it? (It would be good to have the answer in Javascript...

Australian bank lookup via BSB, using Javascript

Is there a means of looking up a bank name & branch through Javascript? Perhaps an external service or an complete data-set that can be hosted internally and accessed through JSON? ...

What are all the changes we have to do in JqGrid, incase of using DWR & java instead of AJAX & PHP?

First, i have to declare myself that, i dont know PHP & AJAX. I know something in DWR, javaScript & java, like i am able to create a Web based CRUD by using them. I want to integrate DWR & JAVA with the jQGrid. I did a lot of research for that. I am not able to find anything that uses JAVA & DWR in jqGrid. Any conceptual idea or soluti...

How to say with variables: If this id matches this class don't do this

In words, I want to say, If the body Id is not equal to a list item's class execute the following function, I have tried to get the code right but nothing seems to work. I have 4 pages each with an ID to make the active state work in a css sprite that work great. On top of that I added between normal and hover a jquery opacity effect bu...

how to show images in my feed?

i have tried many rss parsers but i have not succeed to get images of rss feeds? you know a feed parser which also shows images? ...

Asychnronous Message Send Asp.net

I'm trying to learn about how AJAX stuff works under the hood. Say I have an asp.net form with a button on it. I then have a database with a single column DateTime. When I click the button on the asp.net form I want to insert a column in the database with the current time. I'll have a C# event handler: protected void btnButton_OnCli...

INSERT / INCLUDE Text file content inside HTML page.

Hello Everyone!!! I've got kinda MLM site to make, Like be a member buy purchasing any product of company and create other members under you, in your downline and for that you get commission in product they buy. This is the concept. But, that company is providing a website as its Product. Now, That product is a Website, Where From 100 r...

Loading Page in Specific Div using AHAH - http://microformats.org/wiki/rest/ahah but unable to execute script

Main.html Main Page GetPage.js function ahah(url,target) { document.getElementById(target).innerHTML = 'loading data...'; if (window.XMLHttpRequest) { req = new XMLHttpRequest(); req.onreadystatechange = function() {ahahDone(target);}; req.open("GET", url, true); req.send(null);...

Jquery: everything works, but my function wont fire.

Everything works just fine, but when I remove {queue:false, duration: 800, easing: 'easeInOutQuart'} from $(".chapters_list").slideDown( with a 500, it stops working. So if I don't want easing in my script, it will work fine, when I insert easing into the top function, like is shown below, it stops working. Why wont it allow m...

Thickbox jQuery Issue: Works fine until after AJAX sort

So I have an image gallery that uses thickbox. When I first load the page and click an image, it loads fine into the thickbox. However, after performing an ajax sort of the images and echoing back identical thickbox urls, clicking on one of the images displays the content in a new browser window rather than a thick box. Any thoughts? ...

2 part CSS "wallpaper" that resizes to browser

My designer believes this cannot be done, however it seems possible to me. (Although I have limited CSS experience). However, he also said the background couldn't be fixed, and stackoverflow has proved his wrong in the past; so I question his knowledge. JQuery can be used if this cannot be done in pure CSS. The top half will be a grad...

What time format is this and how can I reformat it using JQuery?

What time format is this and how can I reformat it using JQuery? It's from a pubdate from an podcast XML. Mon, 26 Jul 2010 19:15:58 -0700 Is there a precise name for this date format? I haven't seen this exact one anywhere and it's baffling me a bit. I've tried the plugin listed below but it doesn't work correctly or take this date ...

How to make a script to run on pages that updates with ajax requests?

I have a script that runs on some pages. The problem is that I attach the script on the page load, but all links on the page make requests and change the contents from the response. (The url's hash changes) I need a way to check when the "page" is finished loading to add my scripts. The problem: somesite.com/home (event load is fired)...

Give me some javascript exercises please

The best way I learn anything is by practice and exercise questions. Right now looking at getting familiar with javascript. I did some basic exercises , but am unable to find more on the internet. Can you people give me some questions to practice and learn javascript. Nothing complicated, just one liners would do. Example: "increase t...

the only thing i know how to javascipt is using alert(). is there any other way to help debugging javascript ?

the only thing i know how to javascipt is using alert(). is there any other way to help debugging javascript ? ...

How to animate multiple effects at same time using jquery?

I am using Jquery's animate() function to animate a div. When i give multiple effects like height 140 and width 200, then what happening is the the next effects starts only after the previous effect finish. I want to execute simultaneously. Plz help. Any help will be appreciated Code: $(document).ready(function(){ $...

How do you store the visibility of a form into a variable in jquery ?

how do we check whether a input box is visible or not....then store its state into variable to be outpu via alert ? right now i'm using and i think it wrong. can any body help ? <input type="hello" name="hello" value="" style="visibility:hidden"/> function testhideinput(){ var $input_state = $('input:text[name=hello]').is(...