javascript

Detecting local file drag'n'drop with HTML/JavaScript

There is a HTML textarea. I'm able to catch that event when a local file is dragged and dropped onto the textarea. But how to obtain the name of the dropped file? (To be modified and inserted into the textarea finally.) The following expressions returns None in that case: event.dataTransfer.files event.dataTransfer.getData('text/plain'...

Loading another html page from javascript

Is it possible to load a Javascript program from an html page and then make the Javascript load another html page instead of the page the loaded the program? ...

is there any downside to add content text through javascript other than it will not shown when if javascrit is disabled?

is there any downside to add content text through javascript other than it will not shown when if javascrit is disabled? for example like this http://stackoverflow.com/questions/1899913/how-to-detect-linked-pdf-on-a-page-and-show-message-to-download-adobe-reader-usin/1899938#1899938 if text will not shown to javascript disabled use, no...

anchor tags and image maps

how can i associate an anchor tag with image maps? Suppose, I hover over an anchor tag, it should select the mapped region on the image. Something like this http://myffi.biz/. This is in flash, but can this be done using image maps? You hover over on the links and it should select the mapped region on the image. Is this possible? I ho...

JavaScript data grid in a fluid layout?

We are contemplating using the DataGrid component from DojoX in our web applications. The problem I have is that it doesn't seem to play well with fluid (a.k.a. liquid) CSS layouts -- it seems to like every width predefined. In fact the documentation warns about the automatic width for the columns feature and my attempts to use dynamic w...

Javascript execution sequence

The SO question (load-and-execution-sequence-of-a-web-page)gives details into the order of execution of html page. It states - that the script tag is executed sequentially with single thread. I have the following code on my page: if(booleanTest)eval('parent.'+callback+'();'); parent.hideWin(); return false; Assuming that t...

Why is JavaScript called JavaScript, if it has nothing to do with Java?

The title pretty much explains it. If JavaScript is not derived from Java, why does it have "Java" in the name? ...

JavaScript is not running in Mozila Firefox, only runs in IE

<script language="JavaScript"> function del_rcd(param) { if(confirm("Do you really want to delete it")) { window.location = 'controller/del_task_ctl.php?param='+param; } } </script> <script language="javascript"> function popup(id) { window.open("detail.php?tid="+id, "Preview","width=600,height=500,scrollbars=yes");...

select mulitple items with JS

I have a bunch of divs (i'll call them items). Most have an image in them but having an image doesnt matter. How can i select these items, have the item show some way of being selected (i was thinking having padding which changes color?) and allow me to add more by hold ctrl and left click or by left clicking which creates some kind of m...

how to calculate page rendering time with or without any javascript or with multple javascript seperately

how to calculate page rendering time with or without any javascript or with multiple JavaScript separately? I want to know how much page will go slow if i use any javascript/jquery with plugin/ multiple javascript/jquery plugin files etc.? javascript code in any form inline, in-page code, external file. ...

Is it a fact that a smaller jQuey plugin (in KB) will perform better than same plugin with the same functionality but of a bigger size?

Or does it depend on the way in which it is written? My question is related to page rendering time. Can we determine which will give better performance? Should we always choose a smaller sized plugin? ...

Flash AS2.0 and JavaScript/jQuery (ExternalInterface) Communication

Hi there, Im trying to use JS to send data to my Flash AS2.0 music player with ExternalInterface, except there are no good tutorials or guides on ExternalInterface that I can find. I want to be able to change the current song in the player by clicking a JavaScript link, and on page / window load without clicking, play a default song. ...

How to select all elements except the ones with a given class, using jQuery ?

I want to select all elements in my page except those with the class "searchBox". How can I do that? I want to disable text selection on all elements except input elements ...

How to debug a jQuery application remotely on client's browser/OS/system?

I have developed a web app (that uses jQuery) which works just fine for me but isn't working for one of my users. I've tried replicating the problem matching his browser/OS but it is of no use. The application works for me but not for him. He has tried with a lot of browsers: Chrome/Firefox/IE but it doesn't work in any for him. The only...

About Popup window data to Parent window

I am opening one Popup window on Button Click in main window, it is for Image Uploading. when I am uploading Image , i.e. on Upload button click I am closing this Popup window and opening new Popup window. And Now I want to display the Popup data to Parent window without refreshing, But I am not getting Parent window object. i.e. wi...

How to show "back to top" button using jquery only if browser height is shorter than page?

How to add/show "back to top" button at bottom in a div using jquery only if height browser height is shorter than page, other wise it should be hidden? <p><a href="#mainwrapper">Back to top</a></p> to this <div id="mainwrapper"> <p> Paragraph 1 </p> <p> Paragraph 1 </p> <p> Paragraph 1 </p> <p> Paragraph 1 </p> <p><a href="#mai...

get current page number of pdf document in asp.net

Hi, I am trying to implement a feature where i open (suppose in iframe) a PDF file (multiple pages), Highlight a section of the document a get the page number (the one that is displayed in the PDF tool bar). Eg: if the toolbar display 2/7 which means i am right now in page 2, i need to capture the page number information. Sounds simple b...

I have Error for Popup Window is opeing right or left corners? Is it possible open in centre of parent page

I Am calling Captcha page as popup winow in the page using below syntax this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(),"Test","window.open('CaptchaLogin.aspx',null,'height=200,width=500,status= no,resizable= no,scrollbars=no,toolbar=no,toolbar=no,location=centre,menubar=no');", true); ...

Methods and practices of making an URL hash

My application uses ajax and refreshes some parts of a template. Now I need to make an URL hash containing some variables that will be used for refreshing a page after a page is loaded that contains a hash. Now I need a javascript procedure for making a hash. How to serialize variables? How to encode that serialized string? I'm usi...

Javascript IE bug - inserting domain name into variable value?

In the "Find a Therapist" box on my site: http://www.rscpp.co.uk/ I show/hide other fields based on whether the user selects Face to Face, Telephone, Email, or leaves this unselected. I used to do this with: function showHideF2fOptions() { contact_method = document.therapist_search.contact_method.options[document.therapist_search.c...