javascript

Javascript submitting of a form within a method

I have a method which prints out the order of a set of images...I need to submit this to a new php page. I have a form which currently prints out the order to the same page. <form action="mainpage.php" method="post"> <div style="clear:both;padding-bottom:10px"> <input type="Button" style="width:100px" value="Show order" onclick="s...

javascript not working, no errors

Hello, I have the following javascript code, which loads without error, however the update function does not actually seem functional, as get_Records.php is never loaded. I can not test if get_auction.php is loaded as it is loaded from within get_records.php One of my main concerns is that I am doing the wrong thing by having update() ...

jQuery Closures, Loops and Events

I have a question similar to the one here: http://stackoverflow.com/questions/341723/event-handlers-inside-a-javascript-loop-need-a-closure#341759 but I'm using jQuery and the solution given seems to fire the event when it's bound rather than on click. Here's my code: for(var i in DisplayGlobals.Indicators) { var div = d.createElem...

Javascript === vs == : Does it matter which "equal" operator I use?

I'm using JSLint to go through some horrific JavaScript at work and it's returning a huge number of suggestions to replace == with === when doing things like comparing 'idSele_UNVEHtype.value.length == 0' inside of an if statement. I'm basically wondering if there is a performance benefit to replacing == with ===. Any performance improv...

JavaScript function name as a string...

Hi, I have the name of a function in JavaScript as a string, how do I convert that into a function pointer so I can call it later? Depending on the circumstances I may need to pass various arguments into the method too... EDIT I should note that some of the functions may take the form of namespace.namespace.function(args[...]);... ...

Determine when an user is typing

Hi there, I am building a search box (input field) which should make a server call to filter a grid with the text being inserted on it but I need to make this in an smart way, I need to fire the server call only if the user has stopped. Right now I'm trying to implement it, but if someone knows how to do it I'll be very pleased. Anyway,...

What are the most likely causes of Javascript errors in IE8?

I'm seeing a lot of Javascript errors in IE8 on pages which worked fine in IE7 (and Firefox, Chrome, and Safari). I know that IE made some changes to things like Javascript security. Some of these don't give clear error messages - things like cross-domain violations can end up throwing very vague exceptions. Let's make a checklist of to...

IE6: window.onresize works on IIS, blows up on asp.net Dev Server... help!

Update 1: Cannot reproduce this on a co-worker's computer (same setup as mine) so I assume this is a problem with my workstation and not a general one. I'd appreciate it if someone would close this question as I don't have enough reputation to do it myself. @MatthewMartin. Thanks for your comments :-) Update 2: Unlike my coworke...

how do I strip white space when grabbing text with jQuery?

I'm wanting to use jQuery to wrap a mailto: anchor around an email address, but it's also grabbing the whitepace that the CMS is generating. Here's the HTML I have to work with, the script as I have it and a copy of the output. html <div class="field field-type-text field-field-email"> <div class="field-item"> [email protected] ...

Embed xsl into an XML file

I'm trying to embed an xsl into a XML file. The reason for doing this is to create a single file that could be moved to different computers, this would prevent the need to move the xsl file. The xsl file is creating a table and grabbing a test step from the xml and whether it passed or failed, pretty simple. The issue I'm having, I t...

Which javascript minification library produces better results?

Between Yahoo! UI Compressor, Dean Edwards Packer and jsmin, which produces better results, both in terms of resulting footprint and fewer errors when obfuscating. ...

Sending data from a page on one server, to another remote server. Language not dependant.

I'll try to keep this short and simple. I haven't begun writing the code for this project yet, but I'm trying to work out the pre-coding logistics as of right now. What I am looking to do, is create a method of sending data from one/any site, to another remote server, which would generate a response for the user requesting the data be s...

Workaround for IE's Non-Bubbly Submit Events

I'm working on a large web application with a lot of AJAX whose event handling has gotten out of control. I'm trying to set up an event delegation system to manage all of it, but am wondering if there's a workaround for IE's non-bubbling form submits (there are a lot of forms that get inserted/updated via AJAX). The best thing I've com...

Get selected text and selected nodes on a page?

When selecting a block of text (possibly spanning across many DOM nodes), is it possible to extract the selected text and nodes using Javascript? Imagine this HTML code: <h1>Hello World</h1><p>Hi <b>there!</b></p> If the user initiated a mouseDown event starting at "World..." and then a mouseUp even right after "there!", I'm hoping i...

Javascript Variable not available in external file

Is this something with javascript; or is it something else I'm doing wrong. file1.js var collection = new Object(); collection.foo = new Array(1, 2, 3); file 2.js var someClass = new Class({ bar : function() { alert(collection.foo.length); } }); index.html <script type="text/javascript" src="file1.js"></scrip...

javascript: addContent - How to package...

While making use of a sample for addContent (located at randomsnippets.com), I stumbled into a problem that I hope someone can help on. This may not be the best/only way to skin this cat, but we have a PHP/MySQL page that has to be modified to ADD rows for data entry when needed. Their method works (please take a peak at their page), ...

Current 'Users Online' Script

What is the best script to use for showing the current visitors or guests Online? Thanks! ...

ASP.NET Combo Box value seems to change when I disable it in Javascript

I have a form in which the user can choose a component type from a combo box, and depending on that component they they may or may not be able to choose a data type from another combo box. When the user selects a component type, client-side javascript fires on the change and sets the value of the data type combo box if required and disa...

Debugging JavaScript in IE7

I need to debug JavaScript in Internet Explorer 7. Unfortunately, its default debugger doesn't provide me with much information. It tells me the page that the error showed up on (not the specific script) and gives me a line number. I don't know if that is related to my problem. It'd be nice if it could narrow down the error to a line ...

1 Parent with 2 Child Drop Down

I am trying to create 1 Parent Drop Down, that has 2 dependent child drop down lists using JAVASCRIPT. My html page is at - http://www.larkgrove.com/entryform/entryform.html I am using the Dynamic Options Lists / Dependent Selects: http://www.javascripttoolbox.com/lib/dynamicoptionlist/examples.php If you check out my site, you can se...