javascript

JavaScript GUI Framework

I want to port a standalone application to web based which run within browser. Since there are extensive windowing, I plan to use http://www.extjs.com/ May I know besides the web GUI framework I mention above, is there any alternative? Preferable free and open source. ...

Extracting Query String From eExteranl

Is it possible (and appropriate) to open a new window to an external URL, have my users process a form on that site (which generates a query string with name/value pairs) and then parse the pairs of that query string back to my parent window so the values can be loaded into variables for subsequent use in a form on my site for further pr...

Targeting plain text with jQuery

I'm trying to isolate (and then manipulate) quote block formatted in common newsreader and email-client manner. The HTML: <p> Hello there! <br /> I'm great, how are you? <br /> <br /> Someone wrote: <br /> > Greetings, <br /> > How are you? </p> I need to target all the lines that start with >, and hide them as a ...

User jQuery to drag a DIV and drop in a TD ... and have the DIV "snap" into place

I am finishing up a rewrite of task management system, and am in the process of adding drag and drop capabilities. I want the user to be able to drag a task DIV from one column (TD) and drop it in another column (TD). I have this working correctly, save for some minor formatting issues. I have the TD with a class called droppable tha...

JQuery Ajax - How to Detect Network Connection error when making Ajax call

I have some Javascript JQuery code that does an Ajax call to the server every 5 mins, it's to keep the server session alive and keep the user logged in. I'm using $.ajax() method in JQuery. This function seems to have an 'error' property that I'm trying to use in the event that the user's internet connection goes down so that the KeepAli...

How to wrap with HTML tags a cross-boundary DOM selection range?

Right now I'm capturing users' text selections through s = window.getSelection() and range = s.getRangeAt(0) (browser's impls aside). Whenever a selection within a <p> is made, I can easily call range.surroundContents(document.createElement("em")) to have the selected text wrapped with an <em> tag. In this example, however, <p>This is ...

Inherit Color from Parent and Perform Color Shading in CSS

Is there a way in CSS to take the active color defined by a CSS class and either darken or lighten the color to be used in another CSS class? DEVELOPMENT SCENARIO: We have a dialog that uses a CSS style that defines its color as a shade of gray. In the dailog, we have buttons that use 2 different CSS styles that simulate the button up ...

What is the best way to jump from one textbox to another using the Microsoft client-side AJAX Library?

I'm trying to find a reusable way to set focus from one text box to another upon enter using ASP.NET, but using client-side JavaScript to do so. The only reason I mention this is to be done in ASP.NET, is due to the fact that client Id's of the controls that ASP.NET renders can be different than what was specified in the markup. ...

JavaScript: Check if a string has white space

Hello all, I am trying to check if a string has white space. I found this function but it doesn't seemt o be working: function hasWhiteSpace(s) { reWhiteSpace = new RegExp("/^\s+$/"); // Check for white space if (reWhiteSpace.test(s)) { //alert("Please Check Your Fields For Spaces"); return false; } return true; } Bt...

Using jQuery to "highlight" content under cursor

I'm trying to write some jQuery code that will highlight the element the cursor is currently hovering over by adding a border around it. Here is the code I have so far: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&g...

How to use Javascript's addEventListener() to override an HTML Form's default submit() behavior

How can I use addEventListener() to assign a handler to an HTML form's Submit button, similar to assignment to the button's 'onclick' attribute, without triggering the form's default submit() behavior? I have no trouble assigning a custom function to the 'onclick' attribute of the "Submit" button. The custom function executes a variety...

Is there a way to display javascript content in blog feeds

Does RSS/Atom have a semi-official method of including active (read:javascript) content in it's items? I know about RSS enclosures, but I'm presuming that's for true multimedia - ie mp3 and the likes. Say I have a bit of remote javascript I want to include in my post to display a dynamic graph etc, can this be done? Or flash, etc for ...

Understanding Javascript getElementById to find asp.net control in a sharepoint form.

This is for my Sharepoint edit form: I need to be able use the asp.net TextBox in my javascript: <asp:TextBox runat="server" id="ff17{''}" text="{@Container_x0020_Qty}" __designer:bind="{ddwrt:DataBind('u',concat('ff17',''),'Text','TextChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Container_x0020_Qty')}" /> I'm trying to read it in ...

is there a way to find the value in the cell before it was changed using javascript.

Hi, is there a way to find out the value in the cell before and after it is changed in javascript or jQuery? I am thinking I might have to use combination of events like onfocus and onblur. please let me know. Thanks, sridhar. ...

add client script to asp.net page dynamically

I want to add javascript to asp.net page dynamically. can anybody point me towards working example? i know it can be done by using Page.ClientScript.RegisterClientScriptBlock but i have no idea to use it. ...

Cannot get CSS Drop-Down above Flash File

I have searched everything and tried every method I can get my hands on and cannot get my CSS drop-down menus to display above my Flash file. You can go to: http://beta.riverlifefellowship.com and username is 'riverlife' and password is 'flow' (without the quotes on both). I am using swfObject and have the <param name="flashvars" value...

How can you tell if one div tag/element is over another?

Hi, Working on a drag and drop feature and I would like to know/have an opinion on how you can tell if an element, in this case a div tag, is position (via the drag) over another element? Thanks, R. ...

2d javascript array using json notation (help me clear up the confusion)

I am writing Tetris in JavaScript as practice, and i am somewhat confused by the array notation that i am using. Here's the array that i have that stores all my pieces. var pieces = [[[1,1], [1,1]], [[1,0], [1,0], [1,1]], [[0,1], [0,1], ...

writing out a null in javascript

This question is in follow up to this one: write binary data using JavaScript on the server. The problem there with just using Response.Write to write the string is that the string contains a null character which JavaScript recognizes as the end of the string. The string I'm trying to write starts with the following (written here in...

java script & ajax video player not work in php file

Hi All: PHP + java script code + flv player: I am trying to play a .flv video on a web page and i have the file name to play from mysql data base so i need to use php. In the code below there is a script that runs a video player (favideo from Adobe) this video player work fine when the web page have the .html extension and it wont work ...