I am just learning html, and I have a load of questions, some of which, may not even be answered. I was wondering, you know how on a normal site you click on a text box and the text clears out automatically? Well I wanted to know how to do that on one of my text boxes. Ok so I want public to comment on my site, so inside the
tags, I place
But once you click on the text box, you have to back out the Type your comment here. How do I make it so as soon as someone clicks on the comment box, the type your comment here clears out, or at least highlights so when the user types the comment, the type your comment here will be overwritten?My next question is that my form isn’t working. I’ve tried getting public to surrender and send from outlook prompt, yahoo, att mail, and nothing works.So this is the form I used. I’d rather you just right what’s incorrect with it, and place the complete code in its original form with the corrections, than tell me what’s incorrect with it in small segments. method="post">
Month of birth.
Ok, you get the point. Let’s get to the excellent stuff now.
What is your favorite sport to play out of the choices provided??
basketball baseball tennis
Please comment on my form.
upload a photo of yourself.
My next question is how do you make one of those “type the characters in the picture you see or hear” boxes? Those are rather cool, but if it takes more than html code, which it probably does, just let’s say I wanted the characters to be lhRiC3oz9
How would I make a box with those characters? Would you need to get a screenshot of the picture and upload the .gif file to the ma?tre d’h?tel? Or what?
Next question: How would I make a print this page link? Let’s say I type up an article, but there’s all this stuff in front of it that I don’t want the laser printer to print. How would I go about doing that?
Next question: How would I make an article I typed up open in a new window or tab? In additional terms, how would I make a link that says open in a new window or tab?
Ok I reckon I’ve questioned enough for today. The most vital questions are the text box selection, and the form send by e-mail not working.
Excellent luck answering all these questions. Best answer goes to whoever gets my form to work properly, in additional terms, it will send an send by e-mail to me once someone presses the send button.
wait, what ?
Seriously…
http://www.w3schools.com/
Each web coding tutorial you could maybe want. Free, and updated to contemporary standard regularly.
send by e-mail me!
If you really want a user to fill out your form – then your form action needs to be to a ma?tre d’h?tel side language (i.e. php) speech which would catch the form vars – process them – and send send by e-mail. This is much more complex than html..
Would you need to get a screenshot of the picture and upload the .gif file to the ma?tre d’h?tel?
yes – once again, requires a ma?tre d’h?tel side language though to really check the captcha code.
click here to open new window/tab
PLEASE READ
HTML: The Complete Reference
all your answer in this book
I reckon I can answer a few of these:
1. I’m pretty sure to clear out text in a dialog box, you need to know a bit of javascript
2. Not so sure
3. Again, I reckon it has to do with javascript, something along the lines of (this is in English, you’d have to learn how to write it in javascript):
Make a random number;
Load the picture’s address using that number;
Load the corrosponding text;
Either that or their’s a website where those kind of images are hosted
4. I reckon you might want to make the same page (a copy of the page) with the same content without all of the styles, images, javascript, etc.
5.Try this:
That will make it open in a new window.
I hope that helps, I know how daunting HTML can be.
Answer for question 1: Use Javascript functions and the onfocus() and onblur() HTML attributes for the HTML INPUT tag.
Here’s the solution for that:
function resetIfNeeded(fld)
{
// Verify the field exists
if (fld)
{
if (fld.value.indexOf(“:”) != -1)
{
// Store off the contemporary defaulting value into the “title” attribute
fld.title = fld.value;
fld.value = “”;
}
}
prepareEmail();
}
function resetPromptIfNeeded(fld)
{
// Verify the field exists
if (fld)
{
if (fld.value == “”)
fld.value = fld.title;
}
prepareEmail();
}
function prepareEmail()
{
// Get the main document form
frm = document.forms[0];
// Start out subject info
theSubject = “mail from”;
// Start out body info
theBody = “To whom it may concern:”;
fname = “”;
lname = “”;
// Verify the form is found
if (frm)
{
if (frm.firstname)
{
if ((frm.firstname.value != “”) && (frm.firstname.value.indexOf(“:”) == -1))
fname = frm.firstname.value;
}
if (frm.lastname)
{
if ((frm.lastname.value != “”) && (frm.lastname.value.indexOf(“:”) == -1))
lname = frm.lastname.value;
}
// Build the subject
if (fname != “”)
theSubject = theSubject + ” ” + fname;
if (lname != “”)
theSubject = theSubject + ” ” + lname;
// Build the body
if ((fname != “”) || (lname != “”))
theBody = theBody + “nnnSincerely,nn”;
if (fname != “”)
theBody = theBody + ” ” + fname;
if (lname != “”)
theBody = theBody + ” ” + lname;
// Set the send by e-mail subject
if (frm.subject)
frm.subject.value = theSubject;
// Set the send by e-mail body
if (frm.body)
frm.body.value = theBody;
}
}// prepareEmail()
Answer for question 2:
The “mailto:” command should work, but if will start up the defaulting mail client on the person’s computer. Not send it from the website directly. The HTML above handles setting the text, although I didn’t end huge in the rest of the fields for the form (in the prepareEmail() function).