Thread: buttan onClick
View Single Post
Old 01-01-2013, 12:02 PM   PM User | #1
swenn
New to the CF scene

 
Join Date: Jan 2013
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
swenn is an unknown quantity at this point
buttan onClick

Hey there!

I've just started with all this website building stuff and now I'm stuck.

I'm struggling with a function that I cannot get to work. The thing is actually pretty simple, but I am out of ideas and so is Google.

What I want to do is: when the 'Login' button is clicked, there should appear an extension under the button, where users can fill in their log-in information.

Since I am a total beginner, I tried to work it out from a bit of code from W3Schools' website. Unfortunately, it didn't work, but anyway: here is what I have got at the moment.

Code:
<script type="text/javascript"> 
	function menu-dropdown() {
		document.getElementById("ddlogin").innerHTML="login";
	}
</script>
The code above was just a check, if it outputs anything, but nothing was shown.

I also tried to insert <form> right into "innerHTML="here";".

I'm sorry for being a total newbie, but I feel like I can't continue if this thing remains a mistery for me. So, please don't judge me too hard.

I will provide some pictures:


swenn is offline   Reply With Quote