javascript

Facebook Connect / Graph - problems in Internet Explorer with fb:login dialog (not closing)

Hi there, I am trying to get the facebook connect stuff working on my localhost. In FireFox and Chrome it works perfectly. In Internet Explorer: an error appears in the connect dialog. This is: Invalid Argument The Facebook Connect cross-domain receiver URL (http://static.ak.fbcdn.net/connect/xd_proxy.php#?=&cb=f1e33405f2824e9...

Count number of lines in CSV with Javascript

I'm trying to think of a way to count the number of lines in a .csv file using Javascript, any useful tips or resources someone can direct me to? ...

Is RightJs (right-rails) ready for rails3

Hello, I'm wondering if right-rails(rightjs) is ready for rails3? I'didn't found any replacement for the default public/javascripts/rails.js Thanks ...

transition background-image/css change on hover?

I have a thumb nail inside another div, when the thumbnail is hovered I want the parent div to fade/transition to the background of the thumbnail, then fade back to the original image after hover. I have this so far which changes the parent background to that of the thumbnail and back but with no transition. $(document).ready(function(...

Typing Text effect not working

I'm writing a script to take an array of strings, split them by characters, and print them out to the screen. This is what I have and for some reason it is not doing anything. Any ideas? function autowrite() { var write_text=["Your Memories","Your Thoughts","Your Photos"]; var split_text = Array(); var i; ...

Jeditable doubling up on linebreaks every edit

I'm using var retval = value.replace(/<br[\s\/]?>/gi, '\n'); To strip the <br> tags from the textarea and nl2br('$_POST('newValueHere')') to insert into my database and to return back to jeditable to display the edits. The only problem I'm having is that each click on the editable field seems to make all the <br> tags be written twic...

Problems with contenteditable in Firefox

Hello, I am working on a Javascript WYSIWYG editor in Firefox. I am using a div with the contenteditable attribute set to true in order to accomplish this (I cannot use a contenteditable iframe for this particular project). This contenteditable div is nested in another div that is not contenteditable. I am encountering the following t...

LDAP authentication with Javascript

Is it possible to authenticate against a LDAP Auth enabled web site using Javascript alone? website here: http://vl3.co.uk/moodle ...

Microsoft JScript runtime error Object doesn't support this property or method

So i am trying to call this function in my javascript but it gives me the error of "Microsoft JScript runtime error Object doesn't support this property or method" and i cant figure out why. It is occuring when trying to call hmacObj.getHMAC. This is from the jsSHA website: http://jssha.sourceforge.net/ to use the hmac-sha1 algorithm en...

repositioning a <p> from a jQueryUI dialog to centerstage for CSS Print

I'm using a jQueryUI Dialog command to popup a <p> and wish to print just the text of the <p> using the media="print" declarative html code:: <div class="jPajxDialog"> <p class="print"> Some Text </p> <div> I have tried: CSS code:: @charset "UTF-8"; body {visibility:hidden;} .print {visibility:visible;} .noprint {visibilit...

How can I shade a region between two lines in flot?

I have had a lot of success creating graphs with Flot. However, I can not seem to figure out how one would go about shading in a region between two lines using the library. My goal is to be able to create shaded regions as illustrated below: I found this plugin, but it appears that it can only shade a range of values of a line, as ...

Javascript Function like Objects i.e. "$" can be used as a function e.g. $() as well as an object $.

Questions in the title. I've always wondered and failed to find out from the jQuery source. How this is done. To reiterate. In jQuery: how does the "$" become a function e.g."$()" as well as an object "$." I can create it one way OR the other like so... var $ = function(){ return {each:function(){console.log("Word")}} } // $.each(...

How can I determine img width/height of dynamically loaded images in IE?

My markup is a simple div element with id 'load'. Using jQuery I then load a list of image elements into this div: $('#load').load('images.html', { }, function() { $(this).onImagesLoad({ selectorCallback: function() { ....do something.... } }); }); where images.html is a list like this: <img src='1.jpg' caption='im...

Making a select choice result in a popup in javascript

So this is using javascript and HTML. For example: <select name='test' > <option value='1'> <option value='2'> <option value='3'> </select> If someone chooses option value 2 (from the dropdown) I want a popup to appear. However if they choose option value 1 or option value 3 (from the dropd...

Javascript HERE-doc or other large-quoting mechanism?

Is here a convenient way to quote a large block of HTML that has both single and double quotes in JavaScript? Is there anything like a HERE-doc <<EOF, a multi-quote character """, or custom delimiters q{}? Any creative or inventive solutions to this problem? ...

Global jQuery dialog variable not working properly

When I call the function, the dialog doesn't work. If I move the dialog construction into the showtimes_list function, everything works fine. I thought that variables declared outside a function were global in context? var dialog_list = $("<div></div>").dialog({ autoOpen: false, modal: true, height: 300, width: 720, }); fu...

jquery - loading inline javascript via AJAX

I have thrown together a quick prototype to try and establish a few very basic truths regarding what inline JavaScript can do when it is loaded with AJAX: index.html <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt; </head> <body> <script type="tex...

Call a KeyDown Event

All I need is to be able to click a button and have it do the KeyDown event for Enter, I've tired doing KeyDownCheck(13); and similar things, and I can get into the KeyDown event, but I can't get it to recognize that I want Enter, and it doesn't go to any specific key. All Enter does is call another function, but when I try to call the ...

Using Javascript in Adobe Reader

Hi, I am currently using the following script for a few documents: var pp = this.getPrintParams(); pp.interactive = pp.constants.interactionLevel.automatic; this.print(pp); How do I add another command, say document.close() so that it reads the print function and then follows the close document last? Do I simply add the close command...

How can I accept a hash mark in a URL via $_GET?

From what I have been able to understand, hash marks (#) aren't sent to the server, so it doesn't seem likely that I will be able to use raw PHP to parse data like in the URL below: index.php?name=Ben&address=101 S 10th St Suite #301 I'm looking to pre-populate form fields with this $_GET data. How would I do this with Javascript (or ...