I need to get the pixel height of a line of text with javascript.
I've written a gwt method that works in Firefox and Chrome and does ok with IE8. But it doesn't work at all in IE7. My code follows, if anyone knows a solution I'd appreciate it.
public static int getFontHeight() {
HTML sizeText = new HTML("Abcdefghij <br/>klmno<br ...
How do you programmatically select the text of an input field on iOS devices, e.g. iPhone, iPad running mobile Safari?
Normally it is sufficient to call the .select() function on the <input ... /> element, but this does not work on those devices. The cursor is simply left at the end of the existing entry with no selection made.
...
I have a JavaScript application that lets users move shapes around a drawing area, and I happen to be using the Google Closure library. In FF/Safari all is good. In IE, as graphic elements are moved, they get selected by the browser (both the moving element and other elements), showing colored dotted background around some elements in un...
Hey guys. There are a few entries here requiring solutions to do the opposite of this, and others vaguely related. In one of them, the poster asked how to do this on Mozilla Firefox. Actually though, firefox will always open the URL in a new tab when window.open() is called, unless you set the window's size within its parameters.
So Moz...
I'm trying to removed the added controls. Here's the mark-up that adds upload controls to the page:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="htt...
well the question is simple,
javascript is used where one want to do something on the client side purely
or wants to send something to the server in a manner that postback does not occur
but in vs08 controls asp.net c# i have seen that when the page is displayed in browser
the controls namely
gridview, formview, LINKBUTTON!!! all sh...
I would like to remove all instances of a .class in an html.
remove class "s"
remove <span class="s">some text</span> in html
Output
remove some text in html
What's the easiest way to do this?
...
Hi guys,
Say I have Div1 and Div2. I want to make that when a user is dragging around Div1, Div2 should also drag along. Any ideas how do I make it?
Here's what I got so far...
$(document).ready(function() {
$("#apDiv1").draggable();
$("#apDiv2").draggable(); //<- how do I link it do Div1 ?
});
EDIT --------------------------...
I have been looking into Node.JS and all the documentation and blogs talk about how it uses an event-loop rather than a per-request model.
I am having some confusion understanding the difference. I feel like I am 80% there understanding it but not fully getting it yet.
...
hello all, I would like to create a simple AIR app that show's a notification on the bottom right of the users screen. this app won't show all of the time, it will just show if I push a new notification to the users computer. I am doing this in Dreamweaver. It will open on Windows XP computers only.
So far I have found out how to show a...
i have two div elements ,box_1 and box_2:
<div id="box_1" style="position:absolute;top:0;left:0;width:500px;height:500px;border:1px solid gray;z-index:2;">
</div>
<div id="box_2" onclick="alert(1);" style="position:absolute;top:0;left:0;width:300px;height:300px;background-color:red;z-index:1;">
how to activate me?(do not inner #box_1,a...
Hi all,
I was trying to use YUI grid and i noticed something weird coming up on my webpage:
<img id="fvdkoff-target-image" style="border: medium none ; margin: 0px; position: relative; visibility: visible; color: transparent; z-index: 2147483647; left: 424px; top: 274px;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAUCAYAA...
I am using zend framework on windows. I want to implement ajax in my project first time. I searched for help and created a very simple ajax functionality.
IndexController.php
public function indexAction() {
}
public function oneAction() {
}
public function twoAction() {
}
index.phtml
<script type="text/javascript" src="js/jquery-1...
Hello,
I am using this to create a few classes and to set up some inheritance structure.
var ControlType = Class.extend({
init: function(){ },
html: function(type){
//Get template based on name of subclass
}
});
var YesNo = ControlType.extend({
init: function(){ },
html: function() {
this._super('...
like:
<img src="http://www.google.com/intl/en_ALL/images/srpr/logo1w.png">
i want get logo1w.png file size 7.3kb
how to implement it?
...
How can I use JavaScript to add a message like this to a web page:
Our office hours are 9am - 5pm (09:00 - 17:00) PST.
In your timezone, that's WWxx - YYzz (AA:00 - BB:00).
Where:
"WW" and "YY" are converted to the proper values for "hour" (on the 12 hour clock).
"xx" and "zz" are converted to either "am" or "pm".
"AA" and "...
function expandAll(table,val){
if (document.getElementById) {
var row;
var rown;
var tblname;
if ((tblname = document.getElementById(table + 'Tab')) != null) {
var totRows = tblname.rows.length;
if (val == 'show') {
for(i=0;i < totRows;i++){
rowid = table+ i;
if ((row = document.getElem...
Hi I have a form that users fill in . Acording to the level of access they have, I want to prevent some of my form being filled in.
If I have a text box I use this onfocus='blur() with a bit of php to check the users privileges .But this does not work for a checkbox. Can anybody suggest how I can prevent a user from checking a checkbo...
Are there any good HTML\CSS IDEs available for Linux? I don't mean a WYSIWYG editor; I pretty much just need text editor with syntax highlighting and a preview pane w/something similar to Firebug. Does anything like that exist?
...
Hi,
I can generate the controls but can't remove them. I'm trying to add a 'Link' which will call a function to remove dynamically created control. The control and link are next to each other. Here's the Java script and mark-up to create the control:
<script type="text/javascript">
$(function() { // when document has loaded
...