javascript

Drupal - Feed Link Inside Tabbed Mini-Panels Go Wild - Thanks for SOS Help

A panel page created by two tabbed mini-panels using customized views of feedapi. http://arisey.com/template The feed link goes to the right external website in mini-panel view. However in the combined panel view, the feeds went wild and pointed to non-existing internal links, i.e arisey.com/template#ui-tabs-124. The html source cod...

how to execute ajax output script

i'm getting an ajax output success data. Where the data contains some html text and a script. But the script is not executing, how can i execute the script. lets say Ajax response obj is "something....alert("test");" the above code is my ajax response.The div is getting rendered, but the alert is not working. ...

Sorting <li> tags

I have a a and I would like to sort my list alphabetically (I don't want caps to matter) according to a class named "name". How would I do this? <ul class="column"> <li> <table> <tr> <td class="name" >Name of Item</td> </tr> <tr> <td>Content</td> </tr> <tr> <td>morecontent</td...

Get last visited site in another window using Javascript

I am creating a Firefox extension where I need to find out what was the last location visited in another window. Here is an example of what I mean. I present the user with a list of sites from a main interface window. The user clicks on one of the sites and a new window is opened to that site. From there, the user will navigate the si...

Enter Key Trap Event in FireFox

Code below works in IE, but not in FireFox. I have unsuccessfully tried all solutions proposed in link below. Function is invoked when ENTER is pressed. Alert fires if placed in first line of function. But, first if statement is not processed. Invoked via: onKeyPress="javascript:isEnter();" in control markup. function isEnter(evnt)...

Converting binary to decimal JAVA

whats a way to convert a binary string to a decimal integer without using Integer.parseInt ?? ...

Get values from original css file using jQuery

Hi all, I am running in to this situation. Basically my site has many templates of css and users can change the color dynamically using jQuery. Now, the way I did it was to use jQuery to modify the css property directly by selecting the classes. However, if users switch to a different template (also dynamically), I insert .css file in ...

Scriptmanager remove javascript

Hi, The ASP.NET ScriptManager control automatically inserts all kinds of inline javascript like PageRequest initialize. Is it possible to remove or move this to an external js file? Also, the scriptmanager always adds __DoPostback even when not used on the page, how can this be avoided or also moved to an external file? ...

Building a YUI component from a tree and a datatable

I want to build a component that is composed of a treeview and a datatable, in a layout similar to the Windows Open Dialog. I am using a custom treeview and a custom datatable, derived from YUI's own, but I know they work because they work on their own (and they only perform configurations and add custom events). I tried various ways, ...

keyboard select not working in safari

I am trying to make a auto complete box using ruby on rails, jquery and a plugin that combines the two called jrails_auto_complete. It works fine in FF but in safari 4 the keyboard select doesn't work. I would love to try and fix this for my application but cannot seem to do it. I don't know much java script, maybe someone can help. Is t...

JQuery: Hover function, how to add a delay...

Hi there, I have some JQuery that pops up a JQuery Dialog (http://docs.jquery.com/UI/Dialog) box when you hover over an image like so: $(document).ready(function() { $("img").hover(function() { $("#dialog").dialog(); }); }); I have 2 questions 1. When i close the dialog and then hover over an image again the di...

Problem with Javascript onchange event in Ruby on Rails.

I nave this pice of code in index.html (upload controller) This an example. <p> <label for="picture_city">City:</label> <%= form.select :city, Picture::CITIES, :onchange => remote_function(:url => {:action => 'update_universities'}, :with => '') %> </p> When i go to upload/index the form loads well and no errors. But when i see g...

check if a single character is a whitespace?

What is the best way to check if a single character is a whitespace? I know how to check this through a regular expression. But I am not sure if this is the best way if I only have a single character. Isn't there a better way (concerning performance) for checking if it's a whitespace? If I do something like this, I would miss white s...

Javascript Incompatibility with Mozilla

The below javascript is working fine in IE but not in Mozilla. We have a header checkbox,onClick of which all the other checkboxes in the page gets selected/unselected. Can anyone help? <script language="javascript"> function SelectAll() { var frm = document.forms[0]; var j = frm.elements.length; var checkAll = docu...

ASP.NET session in Javascript

I have the following code invoked from a button click - js event function onOkReason() { alert("called"); var session = $('<%=Session["A"]%>'); if (session == null) { <%Session["A"]%> = "1"; alert("1"); } else { <%Session["A"]%> = null; alert("2"); } alert(session)...

AC_FL_RunContent not working after UpdatePanel postback

I have some javascript in a repeater item which calls AC_FL_RunContent to load and show a flash file (in each repeater item) when a link is clicked (link is part of repeater item). I have a paged datasource showing the first page of video links. Five items on each page. The show video links work fine on initial page when there hasn't b...

Javascript alert not defined . . .

I am creating a javascript xpcom component Its source is as follows- Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); function callback() { } callback.prototype = { classDescription: "My Hello World Javascript XPCOM Component", classID: Components.ID("{3459D788-D284-4ef0-8AFF-96CBAF51BD35}"), contractID...

Splitting a form into tabbed pages using dojo

I have a form that as more than a 100 fields across 5 categories of which only 3 fields are necessary and the rest are autofilled or set to default values. Earlier I was using a dijit.TitlePane to split the sections and hide the other remaining sections. I have now decided to switch to a tabbed model as I would like to distribute my UI...

Easiest way to temporarily store key-value pairs in a form using JQuery

How can I temporarily store an array of string values most elegantly in a form? I have a form, where a user can edit an article - and add tags, which are simply string values. I don't want to persist it until the user actually saves the entire article, so I need to be able to temporarily ...: Display the list of selected tags Add a t...

javascript password generator

What would be the best approach to creating a 8 character random password containing a-z, A-Z and 0-9? Absolutely no security issues, this is merely for prototyping, I just want data that looks realistic. I was thinking a for (0 to 7) Math.random to produce ASCII codes and convert them to characters. Do you have any other suggestions? ...