HTML Novice(Can Somebody Help)

Associate
Joined
14 Apr 2006
Posts
681
Location
Scotland - North Ayrshire
Guys,

I am a total HTML Novice:confused: I was wondering if any kind sole in here could possible help me out with something i am trying to achive.

I need to create a webpage with a simple form on it that when a yer submits the form form the page it resets the form and enter the information submitted into something like a spreadsheet.

I have managed to create the form I want to use with the help of several online sources but I need help in the following areas :

  1. Making the initial Value in the input box disappear when clicked
  2. Adding a submit button to the webpage to allow users to submit the form
  3. Entering all submitted vaules to a spreadsheet elsewhere local to the machine and resetting the initial form on the webpage
the code that I have just now can be found here http://www.lamo-uk.co.uk/htmlform/AgentFeedback2.zip

Any help that anybody can provide with this would be great.

Thanks in advance,

Mark L
 
Ok, simple stuff hehe,
1. you need to make a script event for the onClick event on the textbox, something like if window.event.value == "default"
window.event.value = ""
should do.
2. Add a button inside the form that says something like <Button Name="Name" Action="Submit">Button Name</Button> it might be SubmitForm I can't remember off the top of my head.
3. That isn't too simple, I know how to do it in vbScript, but its not simple to do, certainly interesting, you can set the document page to be of type "application/vnd.ms-excel" then put a HTML table on the page that will load up the page in excel...

Shout if I've been too brief!!
 
depends on where you want your spreadsheet to be. I'm guessing you want the information to be submitted for your perusal, in which case, there's no point doing it in javascript - you'll need a server-side scripting language like PHP or ASP. To be honest, if you're only an HTML novice then you have a few things to decide before you're creating spreadsheets (that's not to say it's not easy, just if you've not seen PHP/ASP then it might be a bit daunting!)

Have a look at some different languages - I'd say choose from python, PHP, Ruby (on Rails), ASP or ASP.NET then let us know and people can help you from there.
 
Ok, simple stuff hehe,
1. you need to make a script event for the onClick event on the textbox, something like if window.event.value == "default"
window.event.value = ""
should do.
2. Add a button inside the form that says something like <Button Name="Name" Action="Submit">Button Name</Button> it might be SubmitForm I can't remember off the top of my head.
3. That isn't too simple, I know how to do it in vbScript, but its not simple to do, certainly interesting, you can set the document page to be of type "application/vnd.ms-excel" then put a HTML table on the page that will load up the page in excel...

Shout if I've been too brief!!

depends on where you want your spreadsheet to be. I'm guessing you want the information to be submitted for your perusal, in which case, there's no point doing it in javascript - you'll need a server-side scripting language like PHP or ASP. To be honest, if you're only an HTML novice then you have a few things to decide before you're creating spreadsheets (that's not to say it's not easy, just if you've not seen PHP/ASP then it might be a bit daunting!)

Have a look at some different languages - I'd say choose from python, PHP, Ruby (on Rails), ASP or ASP.NET then let us know and people can help you from there.

I think I'm in over my head here and trying to get to complex to quickly at my level.

I think I will need to re-think the best way of doing this for my needs.
 
1.
Code:
<input type="text" name="txtTest" value="Please enter a value..." onfocus="setDefaultValue(this, 'Please enter a value...')" onblur="setDefaultValue(this, 'Please enter a value...')" />

<script language="JavaScript">
	function setDefaultValue(oField, szDefaultText) {
		if (oField.value == szDefaultText) {
			oField.value = ""
		}
		else if (oField.value == "") {
			oField.value = szDefaultText
		}
	}
</script>

2.
Code:
<input type="submit" value="Submit" />

3. Although it's possible to amend a spreadsheet on the entry of a web form, it's far easier, faster and better practise to use a database - for which you'll need to use a server side language (like ASP or PHP) not HTML. For a small site Access is more than capable enough. A quick google for some tutorials in whatever language your hosting plan uses should give you a few things to go on.

*edit*
Dayum i type slow :)
 
cool thanks. I'm going to do a bit of reading on other languages and play around with this.

I might be back in here for some help if thats cool. I just can't seem to get my head around learning this stuff although I would like to.
 
Back
Top Bottom