javascript

Scrollbar appear / disappear event in jQuery?

Is there a simple way in jQuery to detect when scrollbars appear and disappear on a div that has overflow:auto? (Like an event? Fingers crossed...) (I'd prefer not to have to look at the height of the content of the div) Thanks! ...

Printing contents of another page

In the following link <a href=\"#\" onclick=javascript:print(\"\") style=\"color:blue;\">Print</a>" <script> function print() { //How to print the contents of another page } ...

jQuery: click handler is not invoked when link is opened in new tab/window

Hi! I have noticed when user clicks on a link with, say middle button, or shift/ctrl+left button, click handler attached to hyperlink is not called. I have seen solutions to track mousedown event, but what I'd like is to track exact event of following a link. Are there any suggestions? Thanks ...

back button is working on emulator but it is not working in device in android

Hi all, am new to this android development. I have index page and am displaying every links in the same page using div concept. Now i want to use the back button for my application i have developed code to handle the div and it is working in the AVD(Andriod Virtual Device 5556) but if i upload the apk into my device it is not working. ...

OnmouseMove not work with SetTimeOut and Alerts in Chome

What's wrong with this code? It works in IE and FireFox, but Chrome does not work. The idea is that the function fnTimeOut will be triggered in 5 seconds after onmousemove (fnTimeOut was attach in onmousemove in document). It´s ok. But when, in Chrome, I click on the button "ok" to function fnAlert is triggered instantly. It should be s...

Access browser's page zoom controls with javascript

I want to assign the browser's (IE/FF) page zoom controls (Menu: View/Zoom/Zoom In_Zoom Out) to two large "(+)(-)" icons on the web page so that vision impaired visitors can use these controls conveniently. A lot of searching for a suitable script came up empty so here I am. Any code you know that will do this simply? All the best... ...

jquery binding verification

Is there a way in jQuery to know if an element already has an event bound to the click or doubleclick? ...

dynamically add/remove style in javascript

Hi All, Is there a way in any browser to add/remove class names? For example, if I have a div with class names and I just want to remove/add 'name2' is there a way to do that? Thanks, rodchar ...

Simple command javascript (window.close())

How assure the closing of the window in the firefox with window.close command? ...

Externalize Javascript in YAP

I am working on a Yahoo! App which requires certain external Javascript Frameworks to be loaded and used. Also in the Yahoo! App Best Practices Guide, it is also mentioned that the sources should be externalized, however, externalization isn't working for me. I am using the standard procedure to load the external JS file like the follow...

How to stop/override a Jquery TimeOut function?

Hi, I have a small jquery snippet that displays notification message at the top of the screen in response to user actions on a page. The notification is often displayed after Ajax actions with dynamic content inside it. For example: $("#mini-txt").html("Thank you!"); $("#mini").fadeIn("fast"); setTimeout(function() {$("#mini").animate...

How to restrict access to my web service?

I have http://example.com/index.html, which from within the HTML uses JavaScript (XmlHttpRequest) to call a web services at http://example.com/json/?a=...&amp;b=... The web service returns to index.html a JSON array of information to then be displayed on index.html. Since anyone can view the source code for index.html and see how I'm c...

How can I stop the flickering in Scriptaculous?

I'm running this script on a page which shows a box with more information when you roll over it. site for review The script works fine, except theres a flicker of the box before it actually scales. What is causing this? I use the same thing in the main navigation with the same flicking. Any ideas whats causing this? //work page sprin...

Integrating CKFinder with InnovaStudio WYSIWYG Editor

I use InnovaStudio WYSIWYG Editor, and I am trying to replace InnovaStudio's Asset Manager with CKFinder. There's a line in the editor configuration for what URL to use for the asset manager. I have pointed it at CKFinder. The part I can't get to work is getting the field to populate with the double-clicked file's path from CKFinder. It...

Preview an html page without opening it

On click a image how can another page be previewed in the same page without opening the actual page.And lets say the url /home/home.php?id=3 The preview should be in the preview div <img src="/home/app/img/toggle.gif" onlclick="show();" /> <div id="preview"></div> Thanks.. ...

What is the Difference between onclick and href="javscript:function name ?

Is there any difference between 1 : <a href="javascript:MyFunction()">Link1</a> and 2 : <a href="#" onclick="MyFunction()">Link2</a> ? Would one affect the page performance by any means ? ...

call a vb.net subrouting from a javascript function?

hi folks i have a subroutine called CheckDate() in the code behind. How would I call that subroutine from a javascript function? Cheers, -Jonesy ...

Test if element already has jQuery datepicker

I have a form with many input elements. Some are date fields with a jQuery UI datepicker alraedy attached: $("#someElement").mask("9?9/99/9999").datepicker({showOn: 'button', buttonText:'Click here to show calendar', duration: 'fast', buttonImageOnly: true, buttonImage: /images/calicon.gif' }); Then I have a key command bound to this ...

Html generate data and print from another page

In the below code, in a.html there is this code as, <div id="tableview"></div>//Data loaded dynamically <input type="button" id="printbtn" onclick="print()"/> <script> function print() { var data=$('#tableview').html(); dataobj.print(); } In ...

Fck Editor Multiple Editors

Hello, How would I be able to achieve something like this: have multiple textareas and only want one toolbar. What I want: <div id="Editor"> <!-- Toolbar will go here --> </div> <textarea>Some content...</textarea> <textarea>Some content...</textarea> ...