javascript

Grab code behind property in Javascript?

I would like to burn in a c# code behind property into the javascript alert(<%= someProperty%>); . For some reason it is not working. Is there a way you can burn the codebehind property into the javascript? thanks ...

How can I match multiple occurrences with a regex in JavaScript similar to PHP's preg_match_all()?

I am trying to parse url-encoded strings that are made up of key=value pairs separated by either & or &amp;. The following will only match the first occurrence, breaking apart the keys and values into separate result elements: var result = mystring.match(/(?:&|&amp;)?([^=]+)=([^&]+)/) The results for the string '1111342=Adam%20Franc...

Google's Imageless Buttons...

There have been a few articles recently about Google's new imageless buttons: http://stopdesign.com/archive/2009/02/04/recreating-the-button.html http://stopdesign.com/eg/buttons/3.0/code.html http://stopdesign.com/eg/buttons/3.1/code.html http://gmailblog.blogspot.com/2009/02/new-ways-to-label-with-move-to-and-auto.html I really lik...

IE and Memory accumulation in Javascript

Here is the test URL http://edventures.com/temp/divtest.php Procedure: Close all IE instances. Open the URL in IE7 Open the task manager, look for memory consumed by IE Now click on Create button, Watch the memory it will jump up by about 2K Now click on Destroy button and the DIV will be destroyed but the memory remains the same. Y...

How do I detect when a web page is loaded?

I want to write an application that detects when a page is loaded in the browser, then I should be able to insert content on top of the loaded web page? Anybody with an idea on how to do that? Please note that I should be able to do this in any browser (Firefox/IE). What language should I use to help me do this? How do I detect this f...

jQuery: selecting a parent attribute from a callback

Hello, given this html code: <td><img class='del' id='4' src='images/delete.gif'></td> I am in trouble understanding how to complete the following code: $(document).ready( function(){ setup(); } ); function setup(){ $("#deleteForm").hide(); $("img.del").bind('click', formDisplay); } function formDi...

How to stop onkeyup event being fired when an alert box is cleared with the enter key

Here's my problem... I have a text field which uses the javascript onkeyup event to do some "quiet" validation with a tick or cross if the value is valid. When the enter key is pressed, it does the same validation, but with an alert box advising of any problems. If the enter key is used to clear the alert box, this press of the enter ...

How to make a multi-lingual keyboard in jQuery?

I am searching for a multi-lingual keyboard api or plugin which I can embed in my web app. If the plugin in jquery then its better, caz I am already using jQuery library. I want keyboard like (or better) than the keyboard that www.shabdkosh.com has. On shabdkosh.com home page, there is a link "key" with the search button, click on the l...

What does "kill" do in JavaScript?

What does this JavaScript do exactly? parent.kill = 1; This is used in a project I'm working on to do some sort of session expiration but I've never seen it before. It's loaded in an iframe so I'm assuming that it is targeting the DOM document.window. ...

Javascript Random Seeds

Is it possible to seed the random number generator (Math.rand) in Javascript ? ...

Best jQuery rounded corners script?

Hi, I've been looking at various scripts for adding automatic rounded corners to a div using jQuery but there are loads of plugins available, none of which seem perfect. So, does anybody know of a script that is quick to render, supports IE6, anti-aliases and supports opacity? Any help would really be appreciated, Jon. ...

set height div javascript

I'm adjusting the height of the box with no problems, now I would like to adjust the height of the box grabbing the top handle and adjust height but upwards. What would be a good way of doing this? thanks (current downwards code) var mY = event.clientY; var originalHeight = parseInt(document.getElementById('somediv').style.height); ...

Turning TIMESTAMP sql into 12 hour time

Hi, I am writing an app that allows people to schedule things for certain times and then displays them. The time of the event is stored in the database as an sql TIME, because there are things im doing in the DB that need this structure. However, on the output page i want the time to be in 12:00 am/pm format, but i dont want to run a c...

Programmatically adding Javascript File to User Control in .net

How do you add Javascript file programmatically to the user control? I want the user control to be a complete package - ie I don't want to have to add javascript that's related to the user control on the page where it's used, when I can do it inside the control itself. Since there is no Page object in the user control, how would you do...

Reflective Web Application (WebIDE)

Preamble So, this question has already been answered, but as it was my first question for this project, I'm going to continue to reference it in other questions I ask for this project. For anyone who came from another question, here is the basic idea: Create a web app that can make it much easier to create other web applications or we...

editable div content in html 4

Hello, Wondering if there's any not-too-hard way to edit non-form text in html 4. I know there's a contentEditable property that can be set in html 5, but I want better browser support than that will give me. It seems like gmail is doing something like this in their chat status indicator. This works properly on IE6 (which I don't believe...

How can I prevent a function from being called outside another function in Javascript?

I have a javascript function (function1) that checks some global variables (can the user connect, is the service available, etc) before calling another (legacy) function (function2) that actually pops a window and connects the user to our service. I want to prevent function2 from being called anywhere but from function1. Is this possib...

IE warning workaround? Page w/Secure and insecure items

I have a page that is viewed secured with 'https' in the URL, that also contains youtube urls to play video from youtube. Since the youtube URL contains 'http' with no 's' IE is giving an a warning dialog of "This page contains both secure and non-secure Items." Is there a way I can workaround this in Javascript? Maybe after the page...

Does javascript coding work better with any particular server language?

Does javascript coding work better with any particular server language? ...

What is the best javascript obfuscator?

I am looking to use a javascript obfuscator. What are some of the most popular and what impact do they have on performance? ...