javascript

Is there a Javascript IDE that has nothing to do with a browser?

Does anyone know of a program that lets you write javascript; then execute it - all the while having nothing to do with a browser? I don't want DOM manipulation, the equivalent of Console.Write is enough for me. I'm thinking of something along the lines of DrScheme - nice big code editing window, let's you run it, stop it. While all t...

What do I need to escape in my HTML (JSON response)

Hi, My JSON response looks like: {rc: "200", test: "", user: "<div class='sub1'> <div class='avatar'> <a href='/blah'>blah</a><br /> <strong>0</strong> </div> <div class='sl'> <p> you d...

Can 2 CSS classes activate the same script?

Hi, the script below makes the page fade out upon clicks on links that have class="nav". I would like to have the script ALSO activated in the same way for links that have class="home". How would would do this? Is there such a thing as $('.nav & .home')?? Thanks <script type="text/javascript"> $('.nav').click(function(){ var url = ...

JavaScript getter for all properties

Long story short: I'm in a situation where I'd like a PHP-style getter, but in JavaScript. My JavaScript is running in Firefox only, so Mozilla specific JS is OK by me. The only way I can find to make a JS getter requires specifying its name, but I'd like to define a getter for all possible names. I'm not sure if this is possible, but...

IE7 Javascript Performance...

I am trying to develop a application that has quite a bit of client side based scripts. The page has sections that interact with each other based on different inputs. The problem is when you get alot of content on the page the page slows down DRAMATICALLY in IE7 due to the poor javascript engine integrated with this browswer and also pa...

JQuery: Hovering a combo box option element

Gday All, The following code displays a div based on the option that has been selected within a drop down box. $(document).ready(function() { $("#SomeDropdown").change(function() { var theVal = $("#SomeDropdown option:selected").val(); $("#SomeDiv_" + theVal).css("visibility", "visible"); }); }); How do I disp...

Detect window.onfocus with a full screen flash control?

I have a flash object that takes up the whole browser on my website. I am trying to detect if the browser is in focus or not. What is the best way to do this? Using onfocus / onblur works in FireFox, but not in IE6 or IE7. window.onblur = function() { document.title = "NOT focused"; } window.onfocus = function() { document.titl...

Excel files in ASP.Net MVC

Is there any way to use server controls in ASP.NET MVC? Specifically I need to use the FarPoint Spread control in my application to display an Excel file that exists on the server with the ability to display updates on the client in real time. The reason that I want to use MVC instead of webforms is that eventually we're going to scr...

jQuery General Question (cycle plugin)

Currently this does work except slide.src is undefined because by default slide.src is looking for an image src tag first, but the image src tag is now inside the div properties. So how can i change the javascript + slide.src + to be(or get) the image inside the div properties. View <div id="properties"> <?php foreach($search_results-...

Total width of a wrapping inline element

I want to find the total width of a SPAN which wraps around several lines. Is that possible? It's a single SPAN tag, with no other internal nodes... If that's not possible, I would atleast like to find the left and right pixel offsets of the start and end of the SPAN. ...

mini-screen popups on mouse over

I can't figure out how to phrase this question to be honest. :/ But I'm trying to get the following effect: http://zack.scudstorm.com/example.png I was wondering if anyone here could help me try to figure out how to accomplish this effect as seen in the image? :/ The effect, as seen in the image, is that when I hover over an image, o...

javascript text compression/decompression

Suppose I have a 400K text file which I want to read from a javascript. The problem is, my target audience have a slow connection, so 400k might take too long to load. I suppose I need to compress the file, but well, how can I decompress it via javascript on the client side? Is it worth it, or will the time needed for decompression neg...

Can I pass parameters to a client-side HTML page?

I'm not sure if I have the jargon for asking this question not being a web developer but please bear with me. I want to send parameters to a client side HTML page (just a file on a disk no web server involved). My initial attempt was to use a query string and then parse it from window.location.href but instead of the query string being ...

Scriptaculous Effect.Scale issue

Hi, I am using scriptaculous to apply some scaling effect to a div with some contents inside it. When the dimensions of the inner contents are specified as % it works fine. But when it is specified as pixels the inner contents are not scaled according to the parent. scaleContent property is set to true. Can anyone tell me what exactly t...

Change the numbering on an ordered list?

You can change the number at which an ordered list starts like this: <ol start="3"> <li>item three</li> <li>item four</li> </ol> ...but is there a way to make list items have arbitrary numbers, not just consecutive numbering? <ol> <li>item two</li> <li>item six</li> <li>item nine</li> </ol> The only way I can se...

form where i can get the script for adding bse(bombay stock exchange) realty stock chart

I have to add BSE Realty stoock chart into my web site from where i can get this scripts. ...

.net equivalent of Javascript function

What is the vb.net or c# equivalent of the following javascript? this.browserTime.value = Math.floor((new Date()).getTime() / 1000); I'm using httpwebrequest to login in to a site. PostData header recorded from the browser looks like: goto=&currentSlave=235acbdcd297c9211eef670c6dfbd64d&browserTime=1245052940&username=username&passw...

Calling function while creating form elements in javascript

<script language="javascript" type="text/javascript"> var a =10; function test() { if ( a ==10) { document.sample.checkbox1.checked = true ; } } </script> <form name="sample"> <input type="checkbox" name="checkBox1" test();>Option </form> While creating form itself its automatically call function based on it should decide ...

Textarea to resize based on content length

I need a textarea where I type my text in the box, it grows in length as needed to avoid having to deal with scroll bars and it need to shrink after delete text! I didn’t want to go down the mootools or jquery route because I have a lightweight form. ...

UK Currency Regular Expression for javascript

Hi I'm after a regular expression that matches a UK Currency (ie. £13.00, £9,999.99 and £12,333,333.02), but does not allow negative (-£2.17) or zero values (£0.00 or 0). I've tried to create one myself, but I've got in a right muddle! Any help greatfully received. Thanks! ...