javascript

Message of Javascript exception in C#

Hi, i'm doing some unit tests in Silverlight. Therefore i'm invoking some javascript functions. i'd like to know how to get the message of the exception thrown in javascript. Is this possible? Thanks! Peter ...

Need Magic jQuery Replacement for Selectbox Dropdown Form Element. Thank you!

Hello! I'm stuck on a problem and, after what seems like days of searching for a solution, I'm reaching out to Stack Overflow for help. I'm trying to replace a standard dropdown form element with a Textbox and a Div containing an unordered list. I'd prefer to have the solution be based on jQuery, but am open to alternatives. I've foun...

pass object from JS to PHP and back

This is something that I don't think can't be done, or can't be done easy. Think of this, You have an button inside a div in HTML, when you click it, you call a php function via AJAX, I would like to send the element that start the click event(or any element as a parameter) to PHP and BACK to JS again, in a way like serialize() in PHP, ...

Embedded Windows Media Player background image

Hi all, I'm loading an external video stream in my embedded player. Since it takes a little while to connect and preload you see a black background for +- 7 secs untill video plays . I would like to know if its possible to have a background image saying 'Stand by loading video' with my logo on it before the video starts to play. Only th...

Redirection from a Telerik Rad Window

In an asp.net web application, I have a modal popup built with a Telerik Rad Window. In that popup there is a button which must do some action in its "code-behind" and then redirect the application to another page. For the redirection I use the javascript command 'top.document.location.href = myPage' (sent to the browser from the code-...

Opening Gmail's Compose page opens up in the whole page - need to open in an iframe how!

Hi guys - I would like to open up the compose page for gmail in an iframe on my google app based application. I have a simple modal window set up which has an iframe set up and I wish to open up teh gmail compose page within it. The link I use is: https://mail.google.com/a/YOUR-DOMAIN-HERE/?view=cm&fs=1&tf=1&source=mailto ...

javascript open window references

Hi, I'm having some issues understanding how to reference new browser windows after opening them. As an example, if I created 3 new windows from a main one (index.html): var one = window.open( 'one.html', 'one',"top=10,left=10,width=100,height=100,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no"); var tw...

JavaScript and XML Dom - Nested Loop

So I'm a beginner in XML DOM and JavaScript but I've run into an issue. I'm using the script to display my XML data in a table on an existing site. The problem comes in nesting a loop in my JavaScript code. Here is my XML: <?xml version="1.0" encoding="utf-8"?> <book_list> <author> <first_name>Mary</first_name> <last_name>Abb...

DOJO: Adding multiple conditions for querying dojox.grid.DataGrid

Hi, I'm trying to create a DOJO DataGrid populated using a dojo.data.ItemFileReadStore with very simple json data which has an ID and a description. When an event occurs, i need to filter the rows displayed based on the IDs. When its a single ID, i can fix it by just adding myGrid.setQuery({ID:"someIdIWant"}); Is there some way i can fi...

Why might ASP.NET be putting JavaScript in HTML Comment blocks, not CDATA?

We have an ASP.NET 2.0 WebForms app that uses MS Ajax 1.0. It's working fine on all our environments (dev, test, IE6 VMs etc.). However, at the customer site the client side validation is not happening. We're currently trying to eliminate all the various factors and along the way we asked them to get their page source and send it to us,...

Make alt tag display quicker

Is there anyway to get the alt tag to display quicker? Also, I notice it doesn't show in all browsers. I know I should craft a javascript tooltip but I am looking for something really lite with minimal code. ...

how callback a function on 404 on JSON ajax request with Jquery?

I want made an Ajax request with response on JSON. So I made this Ajax request : $.ajax({ url: 'http://my_url', dataType: "json", success: function(data){ alert('success'); }, error: function(data){ alert('error'); }, complete: function(data) { alert('complete') }}) This code works goo...

Retrieve parent node from selection (range) in Gecko and Webkit

I am trying to add an attribute when using a wysiwyg editor that uses "createLink" command. I thought it would be trivial to get back the node that is created after the browse executes that command. Turns out, I am only able to grab this newly created node in IE. Any ideas? The following code demonstrates the issue (debug logs at botto...

jquery not select?

i have a click event for $('#blah div'). div has text inside of it (not inside a div, span, p, etc) and has a textarea in it. The textarea is triggering the event as well, how do i make it only trigger when i click the text and ignore the textarea? ...

changing window.location without triggering refresh

I have an AJAX form that submits GET requests. Because these are all GET requests these should be easily bookmark-able. Preferably I'd make my Ajax request, update the screen and then update window.location.href to be the URL for the new page. Unfortunately this reloads the page. Is there any way I can get around this? Basically I'd lik...

Get Value of Span Element that was changed before by JavaScript...

Hi all, i am developing a gadget and i am using JavaScript to change innerHTML of span, but after some operations i need to read that value. Additionally i am using pre-entered value for spans but when i try to read new data function loads pre-entered one. Is there any solution for that? JS: function read_write(condition,filename){ ...

google maps with my application

hello i want to use google maps with my java web app.. is there any possiblity to use it , edit (mark regions, naming those regions) and save it ? ...

Embed View Only Word Document in Webpage

Working a on a Google Web Toolkit project. I want to show a word document in a webpage. Does not have to be the MS Word 2007 view. Any way to do this? ...

JavaScript String Replace with a tricky regular expression

Hi. I'm trying to work out what regular expression I would need to change this string html = '<img style="width: 311px; height: 376px;" alt="test" src="/img/1268749322.jpg" />'; to this html = '<img width="311" height="376" alt="test" src="/img/1268749322.jpg" />'; with the help of Javascript.replace. This is my start: html = ht...

Is there a way to turn off auto-complete on an input-field using jQuery?

Is there a way to turn off auto-complete on an input-field using jQuery? Like this: <input type="text" autocomplete="off" /> ...