javascript

Google Maps is using javascript to render image or image files?

To use Google Maps API you fetch their api js file with: <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=set_to_true_or_false"&gt; </script> Then I use javascript on my page to interact with this API. I wonder what is going on in the background that I don't see. Is this file using javascript to rend...

jQuery UI draggable force update

I am trying to set the values in $(element).data("draggable").offset.relative.top but the new value isn't updated until the mouse is moved, Is there a way to update this value right after it is set? ...

Accessing a node-set in a JavaScript XPath query

I have a real simple question that I can't seem to find an answer to. I want to compress two XPath statements (that are getting attribute values). I learned about the | operator, hearing how it returns node sets. var getdata = xmldoc.evaluate ( '/foo/bar[@world=\''+hello+'\']/child::*/attribute::name |/foo/bar[@world=\''hello+'...

Http request Demo

i want to create a demo to view the http request sent while redirecting to any URL like that of web-sniffer.net how to do that using javascript ...

What is the difference between Image.onabort and Image.onerror?

I understand that Image.onabort or Image.onerror fires if image was not loaded successfully. But when is fired which? Can they fire both in some circumstances? ...

Jquery: how to capture the click event that is NOT in the region of <div>?

Hi, I am using the to implement a popup window using zIndex... things work well but I want to implement a function, that is when user click any region that is outside of the popup div, the div will be closed, how to do that? Bin ...

javascript help required

i am using the following code snippet to fetch element with a particular id but it kind of messes up at times... Does anyone have a better code...? or fix for this? function getData(html,id){ var curSectionId = id; var subStr=html.substring(html.indexOf("id=\""+curSectionId+"\""),html.length-1); var divsStrs=subStr.split("<div")...

Copyright consideration: Using parts of a third-party javascript from a webpage.

When i like a certain Javascript (for menu highlighting or so) used by some website, it would be pretty easy to copy this script from that site's source-code and use it in mine. I would consider doing so as unauthorized use of intellectual property, since I have been granted the right to use this javascript in my browser, but certainly ...

Increase Div Width with Javascript setTimeout()

How can we increase or Decrease width of a DIV using setTimeout() ?? ...

How to programmatically turn a javascript animation into a youtube video?

I am working on a web application that allows the user to create a "movie" which is implemented as javascript-driven animation. I would like to give the user the ability to post their movie to YouTube. The user could of course do this by getting some screen-capture software, but I would like to automate the process -- i.e., the user sh...

how to call a code behind function form java script funtion?

I have a div like this : <div id="div1" style="width: 100%; height: 30px; background-color: Blue" onclick="function1()"></div> from this function1() which is a javascript function I want to call a function which written in c# code behind so that i can access the controls of the page and do my manipulation whatever i want to do. ...

Localization .po file format

I am working on web application (used PHP, javascript language) , I have provided localization support to my application. Currently supported English language. I am supporting another languages. I know basic format of .po file i.e. : msgid "Unknown login error" msgstr “Please enter corrent credientioals" I wanted to know standard fo...

dom wrapping a substring in textnode with a new span node

Suppose, I have this paragraph: <p>this is a paragraph containing link to an image at http://lol/atme.png :)</p> I want to replace http://lol/atme.png with an image element. How do I do that? Its like removing the text, but adding a image element in place of that text. Help will be greatly appreciated. ...

Can Dynamic Vtype validation Done(like below code) in extjs

Hi, I am new to extjs. I like to know, Is it possible to do dynamic vtype validation like below code... customRegEX = /^[a-z0-9]/i customMsg = 'Must be an alphanumeric word' function ConstructVtype(customRegEX,customMsg) { var custExp = customRegEX; Ext.apply(Ext.form.VTypes, { AlphaNum: function(v,field) { ...

how to check in jquery javascript that user upload file is image or not.

i want to check that user upload file is image or not. how i can check the type of file is image or not. are any way exist to do this. ...

Show ubercart attribute only if other attribute is checked

If you have a set of attributes that should only be available to a product (shown to the user and then selectable), if a certain other attribute is checked, how would one accomplish this? Andrew ...

jQuery remove elements by condition

Hello. I have some tr elements in table: <table> <tr id="tr_level_1">...</tr> <tr id="tr_level_2">...</tr> <tr id="tr_level_3">...</tr> <tr id="tr_level_4">...</tr> <tr id="tr_level_5">...</tr> </table> In Javascript I have the next variable: var levels = 3; I want to delete all tr's where number in id is more than levels. And if l...

check if cached jquery object is still in DOM

Hi all: Does anyone know how to tell if a cached jQuery object has gone stale, e.g. is no longer in the DOM? For example: var $cached_elem = $('.the_button'); // .. and then later $cached_elem.text('updating...'); I have recently encountered the situation where the $cached_elem is removed from the DOM due to some other event. So ...

Need help with uploading files using the Valums ajax upload script

No matter what I change in this script, when I go to upload the file, the page is looking for the action do-nothing.htm. This is what the ACTION of the plugin is set to in the downloaded example, but I have changed it. I have also changed some lines in the Javascript to see if I could get something working, but nothing. In fact I can't...

Link using Javascript to show content dynamically without refreshing

I want to put some links in my web page. I am using php for developing my webpage When user click any one of it, the content corresponding to that link will show just below it without refreshing the whole page I know it a simple basic, but I dont know javascript much to work with... Can anyone please help me... link1 link2 link3 l...