javascript

How to post XML to an iframe with JavaScript

Basically I want to post XML (with Content-Type text/xml) to an URL and display the output directly in the browser. This has to be done in an iframe. Is it possible to post the XML to an iframe? In other words, can the Content-Type of the Post-Request be changed to text/xml? PHP4 is also available if necessary. The URL of the iframe-a...

jQuery function not returning

Hello, (function($){ $.a.b = { title: "ABC", init: function (id) { /* do something here */ return id+'a'; } }; })(jQuery); When I try to call $.a.b.init('t'); it does not work, I mean it does not return as expected. Any suggestions? The problem is not tha...

opening file upload window using javascript...

I have a button or link button. I want to open a window for file uploading by clicking the button or link button. Actually at that time I won't have any file upload control there. can any one tell me how to do it by using JavaScript? ...

Adding methods to native JavaScript objects

Adding methods to native JavaScript objects like Object, Function, Array, String, etc considered as bad practice. But I could not understand why? Can some body shed light on this? Thanks in advance. ...

How do I test some JavaScript was called with the correct arguments in GWT?

Hi, I've built a thin GWT Wrapper around an existing JavaScript API. The JavaScript API is independently tested, so all I want to do is test that the GWT Wrapper calls the correct JavaScript functions with the correct arguments. Any ideas on how to go about doing this? Currently, the GWT API has a bunch of public methods which after ...

Documentation on Eclipse Monkey

I'm looking for some documentation on "eclipse monkey" features. What variables are predefined, what methods do these objects have and so on... You can only get so far by tweaking the examples. ...

Which is the fastest javascript engine, and does it really matter?

Which is the fastest javascript engine? Does it really matter? ...

What are the performance implications of adding all JQuery code to application.js in a Rails project

I'm running a fairly large web application which contains an increasing amount of JQuery code for both UI polish and making AJAX requests. Larger chunks of code live in their own, dedicated .js file, but there are an increasing number of pages (primarily forms) which use a small sprinkling of JQuery for showing/hiding form elements, mod...

Reference javax.script.ScriptEngine in android or evaluate a javascript expression

Is it possible to reference the javax.script.ScriptEngine library when developing an android application? If not is there anyway possible to evaluate a javascript expression in android? ...

Read cookie in javascript

This is my asp code, can be the same done in Javascript? HttpCookie cookie = this.Request.Cookies["Votes"]; if (cookie != null) if (cookie.Values.Get(id.ToString()) == "true") return true; return false; ...

OnClick event for whole page except a div

I'm working on an own combobox control for ASP.Net which should behave like a selectbox, I'm using a textbox, a button and a div as a selectbox replacement. It works fine and looks like this Image: My problem now is the Selectbox close behaviour: when clicking anywhere outside the opened selectbox it should close. So I need something li...

javascript calendar

I was wondering if there was a simple way to make a topdown list calendar for a website. I don't want to use the google calendar. I would also want the calendar to show like the next 5 events and hide the rest until the 5 shown have already happened. If there is a way to do this with jquery I wouldn't mind doing that either. ...

How can I read a HTML comment located outside of <html> using JavaScript?

I have a HTML comment outside of the DOM root node which I need to read: <html> ... other stuff </html> <!-- The comment I want to read --> Can I do this with JavaScript somehow? ...

Asp.Net and Shadowbox

Trying to pop up an IFrame Shadowbox with Jquery from an asp:gridview datarow. I can't get the proper quotes into the string: <asp:ImageButton ID="btnEdit" runat="server" OnClientClick='<%# "javascript:popAccount(\'"+ Eval("id", "Popup.aspx?id={0}")+"\');" %>' /> Parser Error Message: The server tag is not well formed. Witho...

Right Align Input

I must be brain dead. I'm having a hell of a time right aligning numbers in a input field. .number { text-align: right; } <input name="price" type="text" class="number" /> has no effect. I need to use an input field since I refer to the value in JavaScript and I'm using it both for input and display. Thanks ...

What is the $create function in ASP.NET AJAX?

I'm familiar with $get() and $find(). But, I've just stumbled across some code I need to work on that calls a function $create(). I can't find anything online or in the code explaining it. The slightly modified call is here: $create(namespace.aspnetclass, {id: 'foo', groupId: <%= groupId %>}, null, null, $get('divContainer')); W...

Retreive a HTML elements id using jQuery

Is it possible to obtain the id of an element (div, input etc) using jQuery and how? ...

Nav Menu IE7 Z-index issues...

Hi I am going out of my mind trying to work out why the menu is appearing under the slogan wording in IE7 but fine in FF? http://securityfor.voxit.co.uk It struggles specifically over the h1/h2 etc tags? Can anyone help? ...

Blackberry application (sending GPS coordinate to server...)

Hello guys! I´ve never created a Blackberry application ... So, any help will be welcome ! I need to develope a application to send GPS coordinates (each x time) to a server (using Gprs)... Is it a simple task? Is it possible to develope that only with Javascript ? How about MDS? I installed a Visual Studio plugin to MDS... Can I deve...

How to maintain event observation after an element has been updated

I'm working on a project where I'd place an search box with a default set of results, over the layout using Prototype which is triggered from a click event. When the output is set, that new page has it's own Javascript which is uses, to dynamically filter the results. Now the new set of results do not work with the Javascript set previ...