5 Replies - 5762 Views - Last Post: 18 June 2011 - 02:58 PM

#1 cnrimgr1   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 14-June 11

I am confused on how to create my enter button

Posted 14 June 2011 - 06:08 PM

Ok i have tried everything i can think of now i am turning to "The forum " for help

<body background="http://www.w3villa.com/vijay/fiverr_testing/img/background33.jpg"> 
<form id="form1" name="form1" method="post" action="">
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  [b]<p>
    <input  name="B1" type="submit" class="enter" id="B1" value="ENTER " >
  </p>
  <p>&nbsp;</p>
   
    <center>
      
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p><a id="B2" class="exit" href=" <input name=" type="button" 
value="EXIT " B2?></a></p>[/b]
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p></center></form></body></html>




the bolded portion is my buttons but they are just Enter and Exit at the moment . what i want to do is make them clickable and make them go to my main site .. www . notabooteens . info i am creating enter and exit pages to try to keep minors off my site ... so after i get this solved i will be creating 23 other pages for my other sites .

Is This A Good Question/Topic? 0
  • +

Replies To: I am confused on how to create my enter button

#2 Dormilich   User is offline

  • 痛覚残留
  • member icon

Reputation: 4278
  • View blog
  • Posts: 13,573
  • Joined: 08-June 10

Re: I am confused on how to create my enter button

Posted 14 June 2011 - 10:29 PM

first, delete all those <p>&nbsp;</p>, positioning is the job of CSS (e.g. margin, padding or position), not of meaningless paragraphs.

second, either use a link (<a>) or a button. ah, yes, and you can’t put an HTML element inside an attribute either.

example
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
	<head>
		<meta http-equiv="content-type" content="text/html;charset=utf-8">
		<title>Entry page</title>
		<style type="text/css">
form {
	text-align: center;
	padding: 10em 0;
}
		</style>
	</head>
	<body>
		<form action="enter.html">
			<button type="submit">Enter</button>
		</form>
		<form action="exit.html">
			<button type="submit">Exit</button>
		</form>
	</body>
</html>

This post has been edited by Dormilich: 14 June 2011 - 10:30 PM

Was This Post Helpful? 0
  • +
  • -

#3 obiejess   User is offline

  • New D.I.C Head

Reputation: 6
  • View blog
  • Posts: 9
  • Joined: 18-June 11

Re: I am confused on how to create my enter button

Posted 18 June 2011 - 09:50 AM

Um, i can tell you one thing, use CSS- not just empty paragraphs!
Was This Post Helpful? 0
  • +
  • -

#4 cnrimgr1   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 14-June 11

Re: I am confused on how to create my enter button

Posted 18 June 2011 - 12:09 PM

View Postobiejess, on 18 June 2011 - 09:50 AM, said:

Um, i can tell you one thing, use CSS- not just empty paragraphs!




ok i am not a programmer sorry .

i see that i should use
<form action="enter.html">
<button type="submit">Enter</button>
</form>
<form action="exit.html">
<button type="submit">Exit</button>
</form>


where do i put the www.xxxxxxxxxxx.com for the enter button so when they click it they go to www.xxxxxxxx.com ( my site )

or on the exit button where do i put the www.xxxxxxxx.com for them to be directed off the site !?
Was This Post Helpful? 0
  • +
  • -

#5 Tarkenfire   User is offline

  • D.I.C Regular
  • member icon

Reputation: 115
  • View blog
  • Posts: 314
  • Joined: 04-May 11

Re: I am confused on how to create my enter button

Posted 18 June 2011 - 02:09 PM

...I'm gonna be blunt here. If you don't know how to use CSS, you shouldn't be trying to make a "button", much less an HTML website.

On another note, CSS is not a programming language; it's barely a markup language.

But if you feel so inclined to continue:

Don't use the buttons on a form unless you're collecting data, use a hyperlink, as the person above said, it follows the format of
<a href="yoursitehere.com">Hyperlink text here.</a>

This post has been edited by Tarkenfire: 18 June 2011 - 02:10 PM

Was This Post Helpful? 0
  • +
  • -

#6 WantToBeJavaGuru   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 25
  • Joined: 08-June 11

Re: I am confused on how to create my enter button

Posted 18 June 2011 - 02:58 PM

Hey there cnrimgr1. Ive had many unplesant experiences with layouts. I mean hey it took me for every just to learn the phyics of a webpage how css behaves and so forth.

Here's a time saver and a croud pleaser. Look into PHP's include() function to handle you various layouts.

1. Create a new sub directory ideally called includes, in the directory your images and css sub directorys are.
2.in new directory create as many webpage.php.html pages you need.
3. place all standard markup code that will need to re use convenietly in these files.
2. on each webpage where you need to keep using the same design over and over, delete the html code and call the function
include

example:

include( <?php include(includes/nameoffile.php.html); ?>  
< --- looks into directory for your php and calls the html code from in that file to your webpage, where the fuction has been called.

so essentially you will have very neat webpages well structed web pages, something like this:

<HTML ..........and so on

      <head>             
      </head>
      <body>
            <?php include(includes/banner.php.html); ?>
            <?php include(content/banner.php.html); ?>
            <?php include(footer/banner.php.html); ?>
      </body>
      </html>


Now you can just have one button, in a html.php file. and test a condition of the name of that webpage
to dynamically get the hypertext reference

(pseudo design only sorry im not familiar enoughto continue)
example:

<button id="..." name="..." <?php
IF webpage IS webpage name tag <a></a> AS www...
// test as many conditions as you wish

look into php SERVER_NAME i think this may put you on the right track to get the name of each webpage.

I hope this broadens your knowledge. :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1