I'm trying to figure out how to pass arguments to an anonymous function in JavaScript.
Check out this sample code and I think you will see what I mean:
<input type="button" value="Click me" id="myButton" />
<script type="text/javascript">
var myButton = document.getElementById("myButton");
var myMessage = "it's working";
myButto...
I would like to move items from one list to another on a page, and I'm pretty flexible about what type of a list it is. What's the best way to do that? ASP.NET Ajax? jQuery? Anything else?
...
When debugging in Internet Explorer; I first get an alert box with extremely limited if not useless information (sorry IE) and choice to debug it; After selecting yes; I get another option every time to chose between 'New instance of Microsoft script debugger' and 'New instance of Visual studio'. I'm fed up of having to click the yes but...
I'm starting to look into the whole world of RJS and Prototype/jQuery in rails and am a little bit confused. There seems to be no clear line of where to use one or the other.
Say i wanted one of the "Active, Hot, Week" tabs like the ones here on SO. When pressing one of them i want to remove a css class (like "active-tab") from the one ...
I'm tryint to post to a ADO.NET Data Service but the parameters seems to get lost along the way.
I got something like:
[WebInvoke(Method="POST")]
public int MyMethod(int foo, string bar) {...}
and I make an ajax-call using prototype.js as:
var args = {foo: 4, bar: "'test'"};
new Ajax.Requst(baseurl + 'MyMethod',
method: 'POST',
...
Yes, I know you could use regular objects as associative arrays in JavaScript, but I'd like to use something closer to java's Map's implementation (HashMap, LinkedHashMap etc). Something that could have any kind of data used as key. Are there any good hash(code/table) in JavaScript implementation out there?
...
I've implemented a set of draggable elements that can be dropped into some containers using jQuery. What I need is an animation that moves an element to a specific container without user interaction. The problem is that the elements and the drop containers are in completely different parts of the DOM and mostly positioned using float.
A...
Anyone know of a JS library that will allow me to syntax highlight a code block, then highlight line-level diffs? For example, in a subversion diff, I'd like to highlight the characters on the line that have changed (as well as highlighting the fact that there are change(s) on the line).
Edit: I'm after something that will let me synta...
Hi,
I'm looking for some help with creating a horizontal menubar in HTML. The menubar will have menus such as File, Edit, View and when you mouseover or click on the File menu (for example), the menu will be displayed showing menu items such as New, Open, etc.
Ideally, I'd like to create the menubar and menus using pure HTML and CSS, b...
Hi,
Using the client-side ASP.NET AJAX library, I have created an instance of a client component with the $create shortcut-method (http://msdn.microsoft.com/da-dk/library/bb397487(en-us).aspx). The object is attached to a DOM element. Now I need to get a reference to the instance, but it is neither registered on window or on the DOM ele...
I have a case where I have a bunch of text boxes and radio buttons on a screen all built dynamically with various DIVs. There are onblur routines for all of the text boxes to validate entry, but depending on the radio button selection, the text box entry could be invalid when it was valid originally. I can't use onblur with the radio b...
Following on from this question here
I have a custom ActiveX control which raises an event "BeforePageValidated" which has a parameter "args" which is an object which contains a boolean. The purpose of this is to allow the client to override the validation and force it fail by setting the boolean value to true.
I can catch the event in...
Hi,
I have the html given below:
<ul id="thumbsPhotos">
<li src="/images/1alvaston-hall-relaxing-lg.jpg" onclick="updatePhoto (this.title)"><img src="/images/1alvaston-hall-relaxing-sl.jpg" width="56" height="56"></li>
<li onclick="updatePhoto(this.title)" src=""><img src="" width="56" height="56"></li>
<li onclick="u...
My predicament is fairly simple: this function gets the id of 'this' <li> element based on parent id of <ul>. It used to work fine but not any more, I will either need to have <ul> use classes instead of id while still being able to assign id of 'current' to the current element, or change my css
function myFunction(element){
liArray ...
I realise this is not the ideal place to ask about this in terms of searchability, but I've got a page whose JavaScript throws "Stack overflow in line 0" errors when I look at it in Internet Explorer.
The problem is quite clearly not in Line 0, but somewhere in the list of stuff that I'm writing to the document, but I cannot work out fo...
This question is for a web application.
And maybe it's a stupid question but I was wondering if there is a way to
generate a polygon with 4 points, so that the user can himself drag
each point to create it's own (As an example, let's say that we want to remove a window from an image that it is not at a normal angle) .Is it possible?. ...
On a page from a website (one of ours) I can enter in the url the following code:
javascript:createNewWindow('Something', 100, 100, 'Text')
Is there a way someone can exploit this?
function createNewWindow(url, widthIn, heightIn, title)
{
var strOptions='toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,r...
I am looking for a jQuery solution to parse RSS feeds. I want something reusable and easy...
Know of a plugin? Or a way to do this with jQuery base?
...
I have an issue with nested jquery tabs and needs some help/pointer.
Currently I have 5 Parent tabs and have few sub tabs under each parent tabs.
When page gets loaded I want to show a particular Parent tab and one of its child tab active.
I am able to activate a particular parent tab but same is not working with child tabs.
Pleas...
I'm writing a GreaseMonkey script where I'm iterating through a bunch of elements. For each element, I need a string ID that I can use to reference that element later. The element itself doesn't have an id attribute, and I can't modify the original document to give it one (although I can make DOM changes in my script). I can't store the ...