I have three input boxes for entering a telephone number on a webpage:
XXX XXX XXXX
I need JavaScript that moves the user between the boxes as you type. After the third character, it moves you to the second box, etc...
In the past, I've had trouble with the backspace. When I clicked backspace from the second box, it puts me in the f...
I have a WebBrowser control and I want to save the whole page viewed to image (any web page).
I tried using IHTMLElementRender interface but it didn't work for all web pages. Maybe I'm doing something wrong because sometimes the snapshot included the scrollers and sometimes it was just partial.
Do you have a working example that can save...
I'd like to find a better way to output console messages to an HTML page. This method seems to be pretty slow.
<html>
<title>Logging test</title>
<head>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function log(s) {
if(!log.start) {
var date = new Date();
log.count = 0;
_log("0", "log() started at " + ...
Duplicate: Convert XML/HTML Entities into Unicode String in Python
How do you convert HTML entities to Unicode and vice versa in Python?
...
What does the slash mean here: "font-size: 100%/120%"?
...
Alright, I'm trying to buy into the idea that html tables should not be used, and that divs should be. However, I often have code that resembles the following
<table>
<tr>
<td>First Name:</td>
<td colspan="2"><input id="txtFirstName"/></td>
</tr>
<tr>
<td>Last Name:</td>
<td colspan="2"><input type="text" id="txtLastName"/></td>
<...
I'd like to have the browser act as if the user had pressed the Tab key when they click on something. In the click handler I've tried the following approaches:
var event = document.createEvent('KeyboardEvent');
event.initKeyEvent("keypress", true, true, null, false, false, false, false, 9, 0);
this.input.focus()[0].dispatchEvent(event)...
We have some html that looks like this:
<form id="MyUserControl" runat="server" method="post">
<script language="javascript" src="javascript.js"></script>
The javascript file contains something like this:
document.write('<object id="MyUserControl" ');
document.write('classid="MyUserControl.dll#MyNamespace.MyUserControl"');
documen...
I would like to scan a specific select tag for all the option-tags values and content in PHP. So that from this
<select>
<option value="donald">duck</option>
<option value="david">moose</option>
</select>
<select id="something"> <!--ignore this one -->
<option value="sdfas">fs</option> <!-- ignore this one -->
...
I would get somethin...
I have a bunch of automatically generated divs that have a number for their id. Whenever I use this.id to fetch the id it outputs nothing. However when the Id is text only it outputs the id properly. How could I fix this? Anything Helps. Thanks
Edit:
$(".draggable").draggable();
$("*", document.body).click(function (e) {
...
How do you do a file upload in an HTML form without running into mojibake?
I have a form that has three fields:
a file field
a required text field
a text field which accepts Japanese characters
I've set up my HTML form with the attribute enctype='multipart/form-data'. But when the form submission fails due to the missing required f...
Ok, get this.
I have been assigned to write an html form to be EMAILED to clients so that they can fill it in and submit it FROM THE EMAIL CLIENT! apparently emailing a link to the existing form on our website is not good enough.
I am still trying to get my head around this as it seems almost void of common sense, but anyways, my guess...
In my page source I put: <!-- A comment -------->
and ASP.Net converts it to: <!-- A comment -------->
so by the time it gets to the browser, my comment is visible.
It doesn't do it to all comments and if I add in another comment it sometimes makes the comment go away.
Anyone seen this before? How can I fix it?
...
I'm trying to use css borders to visually group my sections, but the border that is drawn for my second section encompasses the first, so it looks horrible. How can I make the borders right.
My code:
My first div is float left, and its border shows up correctly, encompassing only the area it needs. It has mostly input elements down the...
I'm looking to implement a web interface with a number of items which can be selected and dragged around to position them, either in groups or singly. Rather like the Windows Desktop, really.
We're using JQuery already, so additions to that would be first choice. JQuery UI Draggables and Selectables individually do much of what we wan...
hi
i want to print a table of report on an a4 size paper , but only a part of table is getting printed , few columns are being left out ...
can anybody please tell me what might be the problem,
i tried to srink to fit but , it becomes too small to read ...
...
I'm writing a PHP script to grab text box data from a submitted form. These are simple text boxes and I don't want to accept any HTML tags. I think I should at least use strip_tags() and addslashes(). Anything else? I wouldn't mind restricting the input to alphanumerics, should I use a regular expression to seek out nonstandard characte...
Hi,
I have a quick question.
Is it possible to do something like this?
The options are generated dynamically based on foreach loop. I want the loop to stop where the $_GET['t'] equals the $k and make it selected.
<option value="http://domain.com/<?php print $k; ?>/" <?php if ($k == $_GET['t']) print 'selected'; ?>><?php print $v; ...
There are some attributes in HTML which are "boolean" - browsers treat them as "true" if they are present, regardless of the value. An example of such an attribute is selected on the <option> tag. Another is checked on <input type="checkbox">.
If you have a call to setAttribute() for such an attribute, there seems to be no value you can...
I would like to style all of the radio buttons with the same name in a form easily in a nice Prototype or jQuery-style shortcut.
$('billship').select('name:shipType') or something like that.
Does such a shortcut for form field names exist?
...