javascript

javascript get selected html elements

User is on a webpage , uses his mouse to select stuff, how can i use javascript to know what has been selected? ...

How do I get Google Closure to call my init function when DOM tree finished

I am looking for something like the $(document).ready function in jQuery, as I work on experimenting with using Closure. So, my question is simple, is there a function I am missing that will allow me to wait until my function is called when the DOM tree is done? I use unobtrusive javascript, so the idea of putting any javascript in my ...

getting null for google.gears object when working offline ...

Hi, I am new to gear, We are using gear in our web application were flow is ... When ever user assign with some task user will get message attached with static html file, In that html we are showing work assign to user in html form once user submit we are creating local database and saving data to local database, But the problem is we ...

Stop blink (jQuery plugin) using stopInterval

Hi, I am using this jQuery plugin for text blink http://plugins.jquery.com/project/blink But I don't know how to modify it to do a .stopblink() Can someone help? Tanks ...

javascript fails in firefox but works fine in IE

hi, my code function hide() { var lblclear= document.getElementById("<%=Label1.ClientID%>"); if(lblclear!= null) { lblclear.value=""; lblclear.innerText=""; lblclear.outerText=""; } } on button click i am calling this function the above function works fine in IE it is clearing my label text value in fir...

Regular expression in javascript?

Hi, i want to know how to write the regular expression in javascirpt please help me give a simple exaple with details i mean the source code(i am using asp.net and c# language) thank u ...

JavaScript: How to select "Cancel" by default in confirm box?

I am displaying a javascript confirm-box message when user clicks on "Delete Data" button. I am displaying it as shown in this image: In the image "OK" button is selected by default, I want to select "Cancel" button by default, so that accidently if user presses enter then records will be safe and will not be deleted. Is tehre any w...

How can I write below programming in jquery

function abc(a,b,c) { alert('a :'+a+' b:'+ b); xyz(c); } function xyz(c) { alert('c :' + c); } <a href="javascript:abc(1,2,3)" >click here to check value of abc </a> ...

AJAX: problem with redirect

Hi, This is the first time ever I'm using AJAX, and I want to do the following on an otherwise static page www.xyz.org/some_site.html: Send a GET request to another url "www.xyz.org/testscript" if response has either status code != 200 or content != 'ok': do nothing else: include sth on the website (i.e. set style="display:block" on a...

javascript callback question

I have a javascript which I didn't write but I need to use it .. function function1() ... body.. and at the end I have this 'callback': 'getListCallback' } What does this callback mean and getListCallback = function(obj) is another function, does this mean that results from function1 are returned to function getLis...

closing fancybox doesn't remove black screen

I am using fancybox to display both pop ups for video and images. <script type="text/javascript" src="../jquery.fancybox/jquery.easing.1.3.js"></script> <script src="../jquery.fancybox/jquery-1.3.2.min.js" type="text/javascript"></script> <script type="text/javascript" src="../jquery.fancybox/jquery.fancybox-1.2.1.pack.js"> </script>...

change link text in HTML using JavaScript

I have an html page which has a link called "open". Once the link is clicked the text "open" should change to "close". How do I do this? ...

Where can I see the content of submit() java script function?

Just for curiosity... If possible, where can I find and see the javascript submit() function's content on the form? Just to see how it handles http requests. thanks! ...

Making IE not to hang with unsupported Javascript?

Hi, I have a problem with IE. All other browsers work fine, but in IE the following example will make Javascript to stop entirely: elem = document.getElementById('asd'); elem.style.background = '-moz-linear-gradient(top, rgba(138, 197, 229,0.85), rgba(92, 130, 153, 0.85))'; IE does not support gradients, I know, but why does it sto...

detect microsoft office version using javascript

I have to check whether or not the client pc has MS Office 2007 installed or not. How can I check this using javascript? ...

Embedd .wav files in HTML page in all browsers (no controls)

Hi, all. I need to play few wav files on button click. I found solution working in IE but it requires QickTime plugin for firefox. Is there any other way? <html> <head> <script> function DHTMLSound(surl) { document.getElementById("dummyspan").innerHTML= "<embed src='"+surl+"' hidden=true autostart=true loop=false>"; } ...

What is the Difference between submit() function and send() JavaScript functions?

Hi, I have been studying JavaScript from one book. Once I was playing with the codes concerning the client-server site communication, I wanted to do a POST request with the code below (which uses IE ActiveX object XMLHttpRequest): <script type="text/javascript"> var oRequest = HTTPRequestUtil.getXmlHttp(); var sRequestType = "post"; ...

how to stop jQuery default accumulative loop

I've write a addrow event like this.... $('.addRow').click(function(){ var $newTr = $('#tb1 tbody>tr:last').clone(true); $newTr.insertAfter('#tb1 tbody>tr:last'); newRowNum += 1; $newTr.find('input[id^=foods]').attr('id', function(){ var newID = 'foods' + newRowNum ; $(this).attr('id',newID).attr('name',newID).attr('class',newID); });...

Why does my UTF8 data from my mod_perl application still get garbled in the web browser?

Before I begin, I would like to highlight the structure of what I am working with. There is a text file from which a specific text is taken. The file is encoded in utf-8 Perl takes the file and prints it into a page. Everything is displayed as it should be. Perl is set to use utf-8 The web page Perl generates has the following header <...

How can I read the text in the file from remote machine(from IIS6.0 Virtual directory) either using Javascript or Ajax

how can I read the text in the file from remote machine(from IIS6.0 Virtual directory) either using Javascript or Ajax and copy into client machine 'TEMP/specified' Folder ...