javascript

Quick Problem - Extracting numbers from a string

I need to extract a single variable number from a string. The string always looks like this: javascript:change(5); with the variable being 5. How can I isolate it? Many thanks in advance. ...

Jquery/javascript datetime

Hi all, i want to convert this string 23/08/2009 12:05:00 to javascript datetime how can i do it? ...

Identifying a DOM by something other than id (ie: it's href tag) in jquery

The title covers most of my question. Instead of: $('#id').slideUp(); I need to be able to select a particular area tag in an image map in a similar way, by virtue of the string in its href tag. I'm sure this involves the .attr() function but in what way I don't know. Could a resident genius help me please. Many thanks. ...

jQuery event processing and the ready function

Hi, I am very new to jQuery (I started this morning) and I am confused about exactly what triggers the function supplied to the ready function, to be executed. According to the jQuery documentation [http://docs.jquery.com/Events/ready#fn%5D the ready function Binds a function to be executed whenever the DOM is ready to be trave...

Limitations of ScriptManager in AJAX Calls

Hey Guys. Is there any limitations on AJAX Calls with ScriptManager to Web Services? I have an application and I need an AJAX enabled form in it. After every Insert or Delete, I have to get a list from database and show it on page. So I call two server methods from my JS. Isn't too many AJAX calls gonna cause any errors(eg. timeouts, tr...

Javascript DOM and dropdowns

I've got a dropdown that's code is as follows: <select name="month" onchange="updateURL()"> <option value="1">January</option> <option value="2">February</option> <option value="3">March</option> ... <option value="12">December</option> </select> As you can see, when it changes, it calls the javascript function: updateURL()....

How to make a jquery plugin use jquery.live?

Hi I am kinda in a bind. I got this color picker plugin that I am using and some text-boxes. So the color picker script runs and binds it too these text-boxes. But later on I dynamically load up more text-boxes and I want them to have the color picker plugin put on those text-boxes. But currently it won't and I have no clue how to mak...

AOL styling problems - two fixed sidebar one fluid content layout

I have adapted the holy grail three column layout into my site and it works great, except in AOL. I can easily use JavaScript to detect AOL and write new CSS styles after the rest have been evaluated, using document.write(' ');, but even with that freedom I cannot for the life of my style the page right. I was hoping someone could help...

javascript array output in table lined up

I deleted my previous post by accident, so I need to post it again. Hello all, I have a code wich works very nice and I had great help here. The only thing is that the array players output are not very nicely lined up with each other in a table. Having a fixed width will only line up the numbers, but doesn't line them out like a table ...

JQuery - object.id is undefined when it shouldn't be

Hi, I'm working with JQuery and i'm running into this strange (or perhaps stupid) error. In my HTML I have: <input type="password" name="repeatPassword" id="id_repeatPassword" /> And then in my javascript code i have: validateRepeatPassword($('#id_repeatPassword')); Unfortunately in the function "validateRepeatPassword": functi...

What precautions should I take to prevent XSS on user submitted HTML?

I'm planning on making a web app that will allow users to post entire web pages on my website. I'm thinking of using HTML Purifier but I'm not sure because HTML Purifier edits the HTLM and it's important that the HTML is maintained just how it was posted. So I was thinking making some regex to get rid of all script tags and all the javas...

trigger javascript default action in event handler

Hi all, I am trying to figure out how to trigger the default action before something else happens. Specifically, I am using a third party library, and if I use a event handler, and call one of their functions, they override the default action. Therefore, as a work around, i want the default action happen before their library function i...

uframe load cross domain page

anyone know any workaround of using uframe to load external uri ? currently when i tried i get access denied on firefox ...

How to call a function in jquery?

Hi I wanted to my code a bit cleaner so I wanted to put a very long function in it's own method. Right now I have $('#Id').submit(function() { // lots of code here }); now I wanted to break it up like $('#Id').submit(MyFunction); function MyFunction() { // code now here. } but I need to ...

Optimization Suggestions for Javascript.

here is the code....: var minX = minY = maxX = maxY = 0; for(var i=0; i<objArray.length; i++){ if(objArray[i].x < minX){ minX = objArray[i].x; }else if(objArray [i].x > maxX){ maxX = objArray[i].x; } if(objArray[i].y < minY){ minY = objArray[i].y; }else if(objArray [i].y > maxY){ maxY = objArray[i].y; } } I...

Reload parent window from child window

How can i reaload my parent window from child window using jquery? Please help. ...

The modern uses for Image Maps

I've been asked to collate a list as possible of the modern uses for Image Maps. When they first came into being, web-designers in the 90s used them as one of the first ways to create a more immersive experience, but now a-days they can be linked to javascript and jquery to perform all sorts of "exciting" tasks. Many of their possible...

Disable or ignore mousedown on select field in firefox

Is there any way to make it so a click on a select input field does not open the list of options? I tried returning false from onmousedown and onclick, I tried calling this.blur() in onfocus, I tried setting the readonly attribute, none of this seems to work in Firefox. Chrome and IE seem to take the "return false" in the mousedown hand...

tinymce not working with chrome when i dynamically setcontent

I have a site that i put: <body onload="ajaxLoad()" > I have a javascript function that then shove data from my db into the text editor by using the setContent method in javascript of the textarea. seems fine in firefox and IE but in chrome sometimes nothing shows up. no error, just blank editor in the body section: <textarea id...

Progress bar on webpage

I want to display an animated gif on my webpage for some time consuming tasks. There is an AJAX updateprogress control for that to this, but as i've seen on Matt Berseth's blog link text he uses UpdatePanelAnimationExtender from AJAX toolkit. Can you explain why he needs the UpdatePanelAnimationExtender? What is better? Thanks. ...