#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void initDeck (int deck[]);
void showDeck (int deck[]);
void shuffleDeck (int deck[]);
int getBet ();
main()
{
int deck[52];
int playerBet;
char z;
initDeck(deck);
shuffleDeck(deck);
showDeck(deck);
playerBet = getBet();
//scanf ("%d\n", &playe...
How come when I do this:
<input type="text" style="width: 10px; padding: 2px"/>
<div style="width: 10px; border: solid 1px black; padding: 2px"> </div>
the input ends up 2 px wider than the div in both IE6 and FF3? What am I missing?
EDIT:
As many people have said, the border is the issue. If I set border: 0px on the input, it w...
I'm having trouble finding an elegant way to allow for date/time input in an html form. I am thinking of having drop down menus for year, month, day, hour, minute, second, millisecond that are populated with valid entries only. I could do this by hard coding values for each drop down menu, but I'm thinking there must be a more elegant wa...
Is it possible to get access to a file on my FTP doing the following?
<input type="file" name="final" id="final" value="http://www.blah.com.au/artwork/<?=$OrderID?>/<?=$ItemID?>/Final/Final.pdf">;
I know that this specifically didn't work for me, but is there a way to get the file from the FTP so I can send the informat...
Backspace is the browser hotkey for Navigate Back To The Last Page. I know that when an input has the focus this hotkey is disabled. But I have keyup and keydown events binded to this input, and something I wrote is causing this trouble.
Do you know the solution?
...
Hi, I am trying to write a simple web app in scheme and I am using Drscheme for the job. I am wondering if there is a way to input html code into a form which then outputs it in html format (into source)? Is there a library that does the job? Everytime I input something it turns out as a string, I need it to be read as html. Can someone ...
I am trying to accomplish something along the lines of this:
http://devblog.jasonhuck.com/assets/infiniteformrows.html
But... I want to display a dropdown select field, with values 1 to 20, and depending on which value gets selected in that field that's how many input fields I will display to a user to fill out on the page (without ref...
Hello,
I'm learning C++ and i'm getting some troubles when i'm trying to use a String in a ifstream method, like this:
string filename;
cout << "Enter the name of the file: ";
cin >> filename;
ifstream file ( filename );
Here is the full code:
// obtaining file size
#include <iostream>
#include <fstream>
using namespace std;
int...
Guys,
I want to create some text based on user input, and when user enter some text, the first word will automatically set backgroundcolor, but the other words still remain same (no background color), can I do this ?
Thanks
...
I'm having a problem with widths on input[text] fields in IE, all versions.
I have a div with an explicitly set width of 250px.
In this div, I have an input text field with width set to 100%. This input also has an internal left-padding of 10px.
In IE, it renders the width as 100% + 10px. I cannot figure out a technique for constraini...
When you hold "shift" and scroll with your mouse on a mac, it interprets your vertical scroll motion into horizontal scroll actions. This is my most missed feature when working on linux, and I would love to bring it to linux (since I have looked thoroughly and nobody else seems to have done so yet).
I hope this can be done with some sor...
In trying to get input from the arrow keys via curses (ncurses) it won't catch as KEY_UP etc. I used the keypad function with a true argument but getch still returns an escaped sequence. How do I sift through the values returned by getch() and grab the arrow keys specifically?
...
How can I get form inputs real time and use them to change the background color of elements?
I have an input field that will accept six digit hex values:
<input name="acct-bcolor" id="acct-bcolor" class="color" value="141414">
Thanks in advance.
-B
...
I need some help. I am trying to bind to the mousewheel event from JavaScript and I've successfully done that. But something doesn't work quite as I expected. When I am over an input the event doesn't fire.
I have tried to bind to the input's event for the mousewheel but the same thing happens, the event doesn't fire.
...
I have some HTML inputs and I need to run some javascript when the user exits them however I have always used onblur but a colleague has suggested ondeactivate.
I can't find much info about ondeactivate and thought it was an old method for old browsers. Will onblur run on older browsers?
...
How can I pass input from a text-type input element into a hidden input element in the same form on a site that has jquery installed?
...
I am looking to create an option within a form to choose a theme for the page. The options need to be displayed as images so the user can see what the theme looks like. What is my best way to implement this?
...
Hey all,
I'm messing with the CSS on an input box in CSS, to make the text bigger, adding a border, changing color, etc.
I've aligned the bigger text to fit nicely (vertically-aligned) within my input box using padding, but the little blinking text cursor is terribly aligned (hugs the bottom). I'm wondering if there is a way to adjust...
MY javascript: Updated Again.
$('.calc').change(function(){
var classArray = $(this).attr('class').split(',');
$.each(classArray, function(){
alert(classArray);
});
});
And the input:
<input type="text" class="calc R#r# C#i#" />
The pound signs are variables, I'm using ColdFusion.
What I need to be able to do ...
I'm currently working on a little chat/forum site that I roughed out in a weekend, and it has anonymous entries (i.e.: no usernames or passwords). This looks like it could be easy-cake for a spammer to ruin, but I don't want to bother the user with captchas or similar anti-spam inputs.
Are there any invisible-to-the-user alternatives t...