javascript

Simple javascript variables question

Can anybody tell me why this line isn't working? window.open('entertainers/drilldown.php?state=' + varlocation + '?p=','performers_frame') I know it's simple, and I know iframes suck but i am not familiar with javascript variables. Thanks in advance! Ryan ...

Click on link, add text to textarea?

Let's say I have this javascript: <script language="javascript" type="text/javascript"> function addtext() { var newtext = document.myform.inputtext.value; document.myform.description.value += newtext; } </script> and I want to enable it so I can click on some html link that says "add text" and I want the text to be @ . $usern...

Download Javascript generated XML in IE6

I'd like to use Javascript to make IE6 download a file. It'll be created on the fly using Javascript. This file doesn't exist on a webserver. Here's a small example: <!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" xml:...

JQuery attributes

Hi, the following is my HTML DOM element... <input type="text" style="width: 200px;" id="input1"/> I want to keep the date value in it..But somewhere i need to specify that it is going to hold date value in the Dom element.. How can i do so..Please suggest me ...

Quick jQuery question: What's the way to get all elements of a queried set EXCEPT the first?

I forget offhand. ...

Are there any code libraries that validate/convert blog comments to XHTML strict?

I am working on a website in PHP where people can make comments similar to a blog, and I only want particular tags to be allowed. Are there any pre-built libraries that process comments and produce valid XHTML Strict code? I would need to do this in JavaScript so I can generate a live preview like Stack Overflow, plus in PHP before savin...

Quick jQuery question: Stopping event propagation?

I have a set of elements that respond to mouseUp events, and inside of them are child elements that respond to mouseUp events as well (all via. jQuery). How do I make it so when a child's mouseUp event occurs from a user mouse click the child's parent's mouseUp event doesn't also occur in jQuery? ...

Regarding cell click in datagrid

hi guys, I have a datagrid.Its 1st column is ClientType.On clicking each cell in the first column i.e ClientType,that value is shown in textbox named txtClientType.For that i used the following code. Private Sub dtGridsearch_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles dt...

Save <canvas> contents to be redrawn in later animation frames?

I am drawing a graph on a <canvas> that requires expensive calculations. I would like to create an animation (when moving the mouse across the canvas) where the graph is unchanging, but some other objects are drawn over it. Because the canvas will have to be redrawn a lot, I don't want to perform the calculations to render the graph fo...

Lightwindow

Has anyone used LightWindow control from stickmanlabs? I want to do some client side validations within the lightwindow and feels it doesn't support that looking at documentation. I used 'Working with Forms' part of the documentation to bring it to a point where the loaded html postbacks to a php successfully. I'm ready to accept the f...

Need to cancel click/mouseup events when double-click event detected

How is this done? ...

How does a script fallback gracefully when Google Gears access is denied by user?

This is a two part question, if I may. First, I need to find a way to make my script to fallback gracefully when a user denies access to Google Gears. This is the way I do it now: try { var workerPool = google.gears.factory.create('beta.workerpool'); } catch (e) { this.gears_forbidden = true; return; ...

MochaUI: 'A is null' when adding columns

I've just downloaded MochaUI, and I'm playing around trying to build an interface. I've successfully created windows, but I'm having trouble when it comes to layouts with columns. I've included all of the libraries in the same order as the demo, and this is in my init code: window.addEvent('domready', function(){ new MochaUI.Colum...

signed applet gives AccessControlException: access denied, when calling from javascript

I have an easy self-signed an applet (done with keytool and the jarsigner): public class NetAppletLauncher extends JApplet { private static final long serialVersionUID = 1L; public void init() { exec("notepad c:/hello.txt"); } public void exec(String command) { try { // launch EXE and grab stdin/stdout and stderr Proc...

Javascript regex multiline flag doesn't work

I wrote a regex to fetch string from html, but it seems the multiline flag doesn't work. this is my pattern and I want to get the text in h1 tag. var pattern= /<div class="box-content-5">.*<h1>([^<]+?)<\/h1>/mi m = html.search(pattern); return m[1]; I created a string to test it. When the string contains "\n" the result is always nul...

Format numbers in javascript

Is there a simple way to format numbers in javascript, similar to the formatting available in C# (or VB.NET) via ToString("format_provider") or String.Format()? ...

problem with dom createelement and innerhtml

/*************** javascript *****************/ function here(getValue) { alert(getValue) } function aaa() { document.getElementById('asd').innerHTML = '<input type="text" name="textfield" onkeyup="here(this.value)" />' } function aaa2() { var temp = document.getElementById('asd').innerHTML document.getElementById('a...

How to use the jquery.rotate and jquery.cycle plugins together

I have a series of photos (3 series actually) that need to cycle, which the jQuery cycle plugin does nicely for me. My problem is I also want to rotate them (rotate as in turn) by a few degrees each in varying directions on page load, to achieve a 'scattered' look. jQuery Rotate does this nicely too ... my problem is I can't get both r...

Why can't I add a string containing a script tag to innerHTML in IE

Hi, I'm trying to do the following (I'm using the prototype library): var div = document.createElement('div'); div.innerHTML = '<script src="somescript.js"></script>'; $('banner').insert(div); In IE, div.innerHTML property is always equal to "" after I set the property in the second line. This snippet is inside a function which is o...

jQuery Lightbox/Modal Windows for a Pop-Up Web Screen

Hi, Within my web application, I was thinking of creating a pop-up screen of a page for a user to do some processing in. I basically want this page to be like a drill-down window of displaying detailed reords based on a button you press from a top-level summary record. Instead of a pop-up, I was thinking of a jQuery lightbox feature /...