javascript

IE8 Debugger: how to load external javascript files?

I have downloaded and installed IE8. I was playing around with the debugger, but I could not figure out how to load external javascript files. It displays the javascript from the main page, but I need to debug the script in the external files. I have googled various articles that show a screenshot of an IE8 debugger with a drop-down for ...

Represent numbers as shorten like SO does (13500 => 13.5k)?

Ok I write my own JS code for this bug I'm sure there's something more comprehensive out there I can use. My Google mojo isn't working though - any help finding open source code that'll help me represent numbers like how SO does for high numbers (102500 => 102.5K, 18601 => 18.6K, etc)? JS or PHP would be awesome, otherwise I can transla...

How to assign value of textbox to another textbox in html?

Hi All : I want to assign value of text box in another text box's value present in the immediate next line. How to do that using html and javascript?. Eg: input type = "text" name = "test" value = "pass"> input type = "hidden" name = "hiddentest" value = "(here i have to get the value of previous textbox)"/> Please help me.. ...

How to close the Facebook pop-up login window after the user Connects?

Below is my code. For some reason, after the user logs into the little pop-up window, the little window will redirect back to '/" with a lot of session JSON junk at the end of the URL. How do I make it so that the little window closes, and my parent window refreshes? <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/Fe...

How do you display a JavaScript alert from PHP?

I don't code in PHP, but I have this form which I pulled off the web and its working great: What I would like to do is somehow add some code in here that can fire up a JS script, simple alert box, saying "Thank you form is submitted". After the form was received by this mailer.php file. <?php if(isset($_POST['submit'])) { $to = "myEma...

Automated Web Application Testing Framework

What is a good web application testing framework that I can use for a fairly large JavaEE based app? I am currently using Canoo Webtest, but we are running into issues with jQuery. I have tried upgrading the htmlunit to the current version, but that causes even more strange errors to occur. I am looking to see what other automated web ...

HTA installer for MSI failing

I'm using a HTA to try to install a product using WindowsInstaller.Installer as an ActiveXObject. Using the same HTA model that has been used in the past, the attempt to install throws the error: "Msi API Error: InstallProduct,PackagePath,PropertyValues". I have tried this on both Windows Vista and Server 2003 with no success. Both hav...

Modal within a Modal in Ruby on Rails?

I have a Ruby on Rails app with Livepipe widgets - http://livepipe.net/ - and everything has been going great, until the client asked for a modal ontop of another modal. Swapping between modals isn't a problem, but they'd like to see one modal behind the other. I can tell that the tag with the id="control_overlay" is the issue - both ...

JavaScript Function Loading

I have a relatively large (in terms of memory use and code size) JS function (running in IE/FF) that I use only occassionally (like, a couple of times per day). I think I can get rid of it when I'm done with it by nulling out its function (using the variable name of the 'function object', as it were). I am fuzzy though on how I would ge...

Javascript function help

Can someone please look at this javascript function and tell me tell me what I am doing wrong? I want to pass in 4 variables. I know very little javascript. Thanks. function chg(back,front,left,right) { return test("div#post", "#" + "back", "#" + "front", left, right); } Here is the onload file window.onload = function...

Adding a new row to a dynamic ASP.NET Table Control, at position x - Problems with Viewstate after postback

I am creating a dynamic table control with ASP.NET/C# and the table is being used to hold a form. I need to allow users to click on a button in a row and make a duplicate of that row right below the original. My page is also using AJAX and jQuery. I have tried to use Table.Rows.AddAt(indexoforigrow+1, newrow) but I get an error that ...

NPAPI: is there a way to generate an event to JS?

Is there a way to have an NPAPI plugin generate an event on the host page side? i.e. the page that contains the <embed> tag instantiating the plugin. Disclaimer: I am an NPAPI newbie. ...

Regex convert string to valid number, no decimal, sign optional

Removing everything after and including the decimal, and everything non-numerical except the dash if its in is the first character. So far I have this: /[^0-9^-]|[^\.]+$/. Notice How I block dashes from being removed with ^-, because somehow I want to only remove the dashes that aren't the first character (not the sign). Any help? Thanks...

Problems with the event target

Why does this work only if i call the alert function ? After i close the alert box, the color changes. If I comment the line with the alert command then nothing happens. function setLinkColor(el) { var color = getStyle(document.getElementById(el.id), "color"); alert(el.id); document.getElementById("cont...

Strange problem with JavaScript code.

Hi Masters Of Web Development, first I want to say that I did not believe in my eyes - I've got a piece of javascript that works just fine in IE7, and don't in Firefox!!! :)))) That was little joke. :) So I already told you the problem (it wasn't joke), now I'm pasting the javascript: <script type="text/javascript"> <!-- This script an...

setting up a proxy that works with javascript ?

i need to set up a proxy so that i can do cross-domain javascripting. i resorted to using proxy scripts off the shelves. i find it very slow. there also appears to be problems when the other site is using lots of javascript. ...

getSelection() and insertNode -- Javascript Text Selection

Does anyone know how to set the browser selection to a newly / independently created range? I understand how to get the text selection from the browser, and I understand how to create a range, but I don't know how to tell the browser to change the selection to the range I've created. I would have thought it would be something like "setSe...

How to smoothly change <img src="..." /> with jQuery?

I'm now doing something like : $img.hover(function(){$(this).attr('src','1.jpg')},function(){$(this).attr('src','2.jpg')}); Which is not smooth,because it takes quite some time to load an image. ...

Can I use jQuery.extend to simulate method overloading?

I'm quite familiar with jQuery. I'm trying to write common methods for my own purpose. Here is a sample below: $.extend({ add : function(a, b) { return a + b; }, add : function(a, b, c) { return a + b + c; } }); Is the above scenario possible? Can I us...

Reversing a string in jquery

I'm trying to reverse an input string var oneway = $('#inputfield').val(); var backway = oneway.reverse(); but firebug is telling me that oneway.reverse() is not a function. Any ideas? Thank you ...