javascript

I need a custom border for a div box. What are the ways to apply this?

The problem is that the dimensions of the div box and its location will be changing dinamically via JavaScript, and the box itself must be 100% transparent. Look at the picture to figure out what I mean. As far as I know, there is nothing that can be done via pure CSS, am I right? Maybe you know some tricks that could help me out (except...

pass string with spaces into javascript

hello, i'm trying to pass a php defined string with spaces to a javascript function, so that i can append to a query string. However, the function only works when there are NO spaces, and does not even execute when there are spaces -- by testing with alert(). is there a way I can pass strings with spaces into javascript functions, so t...

How to reload a html page when your code changes

I remember watching a jquery demo by John Resig. He had a browser application that reloaded live while he was coding. I think he did not even have to save his code changes for this to happen ( see 3:40 in the video ). This is the video: http://vimeo.com/116991 I find this really cool and think this can be really useful and fun while...

JS - Ooyala API: How do I return this objects title property?

Hi, I'm using the Ooyala API (http://www.ooyala.com/support/docs/player%5Fapi) to embed videos and want to dynamically change the titles as the videos change. I've embebbed the video in the html using the following code; <script src="http://www.ooyala.com/player.js?width=750&amp;height=312&amp;embedCode=dwbjp-XdAc-w6mATLnMIuwBRxHfF...

unable to load image using Javascript in IE 6

Hi, I am trying to set source for Img tag using Javascript at button click. The problem which i m facing is that the I cannot see the Image in IE 6 but it works in FireFox. I browsed and tried few solutions like load the image in page load(Document load) itself or set a timer, but nothing works consistently. This problem also not consis...

I want to access the whole row of datagrid using javascript

The steps to get that rows in javascript as follows: how to Handle the RowDataBound event of the Grid? how to Bind the ID OF EACH RECORD in checkbox attribute? That’s all. Pls,help me to come out. ...

How do I determine an HTML input element type upon an event using jQuery?

Given the following sample code: $(document).ready(function(){ $(":input").blur(function(){ alert("The input type is:" ); //How would this look?????? }) }); How can I detemine whether this is an input, select, text, etc? This is not a real-world example but should suffice for the purposes of this question ...

jqgrid with large local data sets

I'm looking for recommendations for jqgrid to add a large dataset from a local source. Right now, there's a simple loop: grid.clearGridData(); for(var i = 0; i < data.length; i++) { grid.addRowData(i+1, data[i]); } grid.trigger(”reloadGrid”); And on some larger data sets, this causes the browser to display the “javascript is usi...

What useful custom jQuery selectors have you written?

For me, one of the best, yet under-utilised feature of jQuery is the custom selector. I have a fairly trivial example of this, to pick out all text boxes that are empty: $(document).ready(function() { $.extend($.expr[':'], { textboxEmpty: function(el) { var $el = $(el); return ($el.val() == "") && ($e...

How do I create a button with a function, then submit it, with jQuery?

I am using the following code to add a button to a page $("#myDiv").html("<button id='fileUpload'>Upload</button>"); I am then creating an Ajax Upload instance on the button. var button = $('#fileUpload'), interval; new AjaxUpload(button, { action: '/upload.ashx', name: 'myfile', onSubmit: function(file, ext) { bu...

toggle text input value and search

Hi I'm having problems with toggling/searching with my text input, here is a function which I use: function toggleSearch(obj) { var el = document.getElementById(obj); el.value = (el.value != '' ? '' : 'Search' ); } I call this function in focus/blur of text input and it works like a charm when I'm submitting my for...

Add spell check to my website

I have an asp-based website which I would like to add spell checking capabilities to the textarea elements on the page. Most of the pages are generated from an engine, though I can add JavaScript to them. So my preferred solution is a JavaScript-based one. I have tried JavaScriptSpellCheck and it works okay, though I would like to see...

jQuery Dynamic Function and Variable

I am trying to create a function that handles the 'keyup' event for several input fields and passes the input value to a php script. Here's the code I have so far $(document).ready(function(){ $("#email").keyup(function(){ val = $("input#email").val(); what = 'email'; aFunction(val, what); }); }); fun...

Can I use the .NET Framework from JavaScript (JScript) or VBScript?

I want to write a script that can run on a vanilla Windows (XP or later) system and call methods in an installed (GAC'd) .NET assembly. (I need to deliver the script to other people and I don't want to assume that they have anything in particular installed (other than the the assembly in question). Can I use JavaScript (JScript) or VBS...

Google Maps API v3: How do I dynamically change the marker icon?

Using Google Maps API v3, how do I pro grammatically change the marker icon? What I would like to do is, when someone hovers over a link - to have the corresponding marker icon on the map change colors to denote the marker in question. Essentially, the same function as what Roost does. See the live example When you hover over a home ...

Which Javascript history back implementation is the best?

There are implementations for history.back in Micrososft AJAX and jQuery (http://www.asual.com/jquery/address/). I already have jQuery and asp.net ajax included in my project but I am not sure which implementation of history.back is better. Better for me is: Already used by some large projects Wide browser support Easy to implement Li...

Fck editor problem

Hi, Im using FCK Editor control instead a textarea element. I installed it without problems. But when i want to validate it with a Custom validator of ASP.Net 2.0, im not getting the result expected. These lines are the code that i have: <textarea style="width:30px;height:20px;" class="ckeditor" id="txtdescription" runat="server" na...

Empty responseText from XMLHttpRequest

I have written an XMLHttpRequest which runs fine but returns an empty responseText. The javascript is as follows: var anUrl = "http://api.xxx.com/rates/csv/rates.txt"; var myRequest = new XMLHttpRequest(); callAjax(anUrl); function callAjax(url) { myRequest.open("GET", url, true); myRequest.onreadystatechange = resp...

How to get the value of checkbox

How to get the value of a check box? var tb = new Ext.Toolbar(); tb.add({ xtype: 'checkbox', boxLabel: 'Expand Groups by Default', id: 'GetChkBoxValue', checked: true, handler: function() { alert(this.getValue()) } ...

submitting form from textarea

how can i submit a form on enter pressed while i amm typing in textarea........if i hit enter it only breaks a line but not submits the form. ...