...

View Full Version : contact form css



OGGordon
11-21-2009, 08:20 PM
Hey guys and gals,

I downloaded a contact form and it has it's own 3 css files. The main file is called mainform.php and I included that in my template as in <?php include(mainform.php); ?>

Is there any way to make the contact form gets its CSS values only from the 3 css files it came with or do I have to include all the css values into my main CSS file, which is from the template?

Excavator
11-21-2009, 08:31 PM
Hello OGGordon,
You should be able to add the lines
<link href="my1.css" rel="stylesheet" type="text/css" />
<link href="my2.css" rel="stylesheet" type="text/css" />
<link href="my3.css" rel="stylesheet" type="text/css" />
to the head of document your loading your .php from and the include will link to them.

OGGordon
11-21-2009, 08:37 PM
hey excavator,

will that infere with my other css file? because some of the values are the same such as h1 tags.

Excavator
11-21-2009, 09:44 PM
I see the problem.
Try something like this...
<?php
echo '<head>';
echo ' <link rel="stylesheet" href="your.css" type="text/css">';
echo '</head>';
require( "your.php" );
$Quote = new CQuote;
if( $Quote->Get( $strQuote ) == 0 )
echo $strQuote;
?>

Excavator
11-21-2009, 09:49 PM
Also found this -
<?php
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">';
echo 'body {
background-color: #330000;
}
h1 {
color: #FF6666;
}
h2 {
color: #FF99CC;
}
h3, h4 {
color: #CC9999;
}
h5, h6 {
color: #FFCCCC;
}
a {
color: #FF0033;
}
echo '</style>
</head>
<body>';
require( "your.php" );
$Quote = new CQuote;
if( $Quote->Get( $strQuote ) == 0 ) echo $strQuote;
echo '</body></html>';
?>

OGGordon
11-22-2009, 01:29 PM
I see the problem.
Try something like this...
<?php
echo '<head>';
echo ' <link rel="stylesheet" href="your.css" type="text/css">';
echo '</head>';
require( "your.php" );
$Quote = new CQuote;
if( $Quote->Get( $strQuote ) == 0 )
echo $strQuote;
?>

hey ex, Im kind of confused. But let me explain the files:

kontakt.php (template, include(mailform.php))
mailform.php (contact form)
main.css (css for contact form)

So if I were to plug in my file names for the above quote, is this correct?

<?php
echo '<head>';
echo ' <link rel="stylesheet" href="css/main.css" type="text/css">';
echo '</head>';
require( "kontakt.php" );
$Quote = new CQuote;
if( $Quote->Get( $strQuote ) == 0 )
echo $strQuote;
?>

Btw. I insert that code in mailform.php or?<?php

OGGordon
11-22-2009, 01:30 PM
Also found this -
<?php
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">';
echo 'body {
background-color: #330000;
}
h1 {
color: #FF6666;
}
h2 {
color: #FF99CC;
}
h3, h4 {
color: #CC9999;
}
h5, h6 {
color: #FFCCCC;
}
a {
color: #FF0033;
}
echo '</style>
</head>
<body>';
require( "your.php" );
$Quote = new CQuote;
if( $Quote->Get( $strQuote ) == 0 ) echo $strQuote;
echo '</body></html>';
?>

I could replace that just with my CSS values right?

Excavator
11-22-2009, 03:22 PM
I could replace that just with my CSS values right?

Yes, that would be attached CSS within the include.
The other solution would link a CSS file to your include.

Did you get one working?

OGGordon
11-22-2009, 03:33 PM
neither one seems to be working or I'm doing something wrong.

Here are both files:


<?php
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<!-- This notice must remain in place!
_______________________________________________________________
| |
| AUTHOR : Jeeremie { http://web-kreation.com } |
|DESCRIPTION : LightForm - Ajax Contact Form |
| DOWNLOAD : http://web-kreation.com/blog/?p=71 |
| VERSION : 1.0 |
| DATE : 2008.02.03 |
| EMAIL : info@web-kreation.com |
| CREDITS : Credits go to Moo Floor (www.moo.floor.ch) for |
| their fabulous FormCheck2 and to Badboy |
| (www.badboy.ro) his nice looking web form |
|_______________________________________________________________|
-->

<?php

//========
//LICENSE
//========

//The CSS, XHTML, PHP and design is released under Creative Commons Attribution v2.5:
//http://creativecommons.org/licenses/by/2.5/

//Use of this contact form is free of charge but the copyright notes in the footer must remain intact.
//I would appreciate if you send me the URI of your site if you use LightForm.

//FormCheck (http://moo.floor.ch/?p=18) is released under the MIT license:
//http://www.opensource.org/licenses/mit-license.php

//NiceForms (http://www.badboy.ro/articles/2005-07-23/niceforms_preview/) is released under no specific license. You are free to use and modify but you must provide credits.

//This said, let's see how to use this contact form:


//=============
//INSTALLATION
//=============

//Installation is straight forward:

//1. Download and unzip the file
//2. Copy all the files to your root directory


//==============
//CONFIGURATION
//==============

//IMPORTANT!!
//Put in your email address below:
$to = 'sa@mr-sa.com';


//User info (DO NOT EDIT!)
$name = stripslashes($_POST['name']); //sender's name
$email = stripslashes($_POST['email']); //sender's email
$website = stripslashes($_POST['website']); //sender's website

//The subject
$subject = "[Q8iEnG Site..] "; //The default subject. Will appear by default in all messages. Change this if you want.
$subject .= stripslashes($_POST['subject']); // the subject


//The message you will receive in your mailbox
//Each parts are commented to help you understand what it does exaclty.
//YOU DON'T NEED TO EDIT IT BELOW BUT IF YOU DO, DO IT WITH CAUTION!
$msg = "From : $name \r\n"; //add sender's name to the message
$msg .= "e-Mail : $email \r\n"; //add sender's email to the message
$msg .= "Website : $website \r\n"; //add sender's website to the message
$msg .= "Subject : $subject \r\n\n"; //add subject to the message (optional! It will be displayed in the header anyway)
$msg .= "---Message--- \r\n".stripslashes($_POST['message'])."\r\n\n"; //the message itself

//Extras: User info (Optional!)
//Delete this part if you don't need it
//Display user information such as Ip address and browsers information...
$msg .= "---User information--- \r\n"; //Title
$msg .= "User IP : ".$_SERVER["REMOTE_ADDR"]."\r\n"; //Sender's IP
$msg .= "Browser info : ".$_SERVER["HTTP_USER_AGENT"]."\r\n"; //User agent
$msg .= "User come from : ".$_SERVER["HTTP_REFERER"]; //Referrer
// END Extras

?>

<head>
<!-- Formcheck2 / Moo.Floor.ch -->
<!-- http://moo.floor.ch/?p=18 -->
<link rel="stylesheet" href="js/formcheck/formcheck.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/mootools.js"></script>
<script type="text/javascript" src="js/formcheck/formcheck.js"></script>
<script type="text/javascript">
window.addEvent('domready', function(){check = new FormCheck('third', {
display : {
fadeDuration : 500,
errorsLocation : 1,
indicateErrors : 1,
showErrors : 1
}
})});
</script>

<!-- NiceForms / BadBoy.ro -->
<!-- http://www.badboy.ro/articles/2005-07-23/niceforms_preview/ -->
<link rel="stylesheet" href="js/niceform/niceforms-default.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/niceform/niceforms.js"></script>


</head>
<body>

<?php
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">';
echo '*{
font-family: tahoma, verdana, "sans-serif";
margin: 0;
padding: 0;
font-size: 95%;
}

body{
background: white;
}

a, a:hover{
text-decoration: none;
color: #48f;
}
a:hover{
color: #33CCFF;
}

p{
font-size: 90%;
margin-top: 1em;
margin-bottom: 2em;
color: #333;
}

h1 {
color: #0099CC;
font-size: 1.6em;
}


/* Form */
form {
width: 400px;
border: 1px solid #EEE;
padding: 10px;
margin: 40px auto;
}

label {
display: block;
margin-top : 8px;
width: 100%;
background-repeat: no-repeat;
}

img {
border:0;
}

.blue {
color: #0099CC;
font-weight: bold;
}

/* footer */
.dwnld {
Display: block;
padding: 10px;
text-align: center;
width: 400px;
margin: 0 auto;
border: 1px solid #EEE;
background-color: white;
color: #999;
font-size: 1.4em;
font-weight: bold;
line-height: 50px;
background: url(../images/download.gif) no-repeat 40px 10px;
}

/* footer */
.footer {
Display: block;
padding: 10px;
margin: 40px auto;
width: 400px;
text-align: center;
border: 1px solid #EEE;
background-color: white;
color: #999;
}

.footer p {
color: #999;
}

/* Congratulation message */
.MsgSent {
Display: block;
padding: 10px;
margin: 40px auto;
width: 400px;
text-align: center;
border: 1px solid #EEE;
background-color: white;
}

.MsgSent h1 {
background: url(../images/MsgSent.gif) no-repeat 0 0;
padding-left: 20px;
height: 85px;
line-height: 85px;
}

/* Error message */
.MsgError {
Display: block;
padding: 10px;
margin: 40px auto;
width: 400px;
text-align: center;
border: 1px solid #EEE;
background-color: white;
}

.MsgError h1 {
background: url(../images/MsgError.gif) no-repeat 0 0;
padding-left: 20px;
height: 85px;
line-height: 85px;
color: #CC0000;
}

.MsgSent p, .MsgError p {
font-size: 1.3em;
color:#999;
}



echo '</style>
</head>
<body>';
require( "your.php" );
$Quote = new CQuote;
if( $Quote->Get( $strQuote ) == 0 ) echo $strQuote;
echo '</body></html>';
?>

<!-- The contact form starts here-->
<?php
if ($_SERVER['REQUEST_METHOD'] != 'POST'){
$self = $_SERVER['PHP_SELF'];
?>

<!-- Start HTML form -->
<form name="form" method="post" id="third" action="<?php echo $self;?>">
<h1>:::Contact us:::</h1>

<!-- Name -->
<label for="name"><strong><span class="blue">*</span> Name : </strong></label>
<input id="name" name="name" type="text" class="validate['required','length[3,-1]','nodigit'] textinput" />

<!-- Email -->
<label for="email"><strong><span class="blue">*</span> Email : </strong></label>
<input id="email" name="email" type="text" class="validate['required','length[5,-1]','email'] textinput" />

<!-- Website -->
<label for="site">Website : </label>
<input id="website" name="website" type="text" class="validate['url'] textinput" />

<!-- Subject -->
<label for="subject"><strong><span class="blue">*</span> Subject : </strong></label>
<input id="subject" name="subject" type="text" class="validate['required'] textinput" />

<!-- Message -->
<label for="msg"><strong><span class="blue">*</span> Your message : </strong></label>
<textarea id="message" name="message" type="text" class="validate['required'] textarea"></textarea>

<!-- Spam Check -->
<br>
<span class="blue">*</span><strong>Are you human? : <br/> <img src="captcha.php"> </strong>
<input id="captchacode" name="captchacode" type="text" size="5" class="validate['required'] textinput_small" />

<br /><br />
<input type="submit" class="buttonSubmit" value="Send it!" />

<!-- Niceforms: mouse over effect -->
<!-- Do not remove the line below -->
<div id="stylesheetTest"></div>
</form>


<?php
} else {
error_reporting(0);

if($_POST['captchacode'] != $_SESSION['captchacode'] OR $_SESSION["captchacode"]=='')
{
die("<div class=\"MsgError\">
<h1>Error!!</h1>
<p>Sorry , Error in the verification code, please try again!</p>
</div>");
}
if (mail($to, $subject, $msg))

//Message sent!
//It the message that will be displayed when the user click the sumbit button
//You can modify the text if you want
echo nl2br("
<div class=\"MsgSent\">
<h1>Congratulations!!</h1>
<p>Thank you <b><?=$name;?></b>, your message is sent!<br /> I will get back to you as soon as possible.</p>
</div>
");

else

// Display error message if the message failed to send
echo "
<div class=\"MsgError\">
<h1>Error!!</h1>
<p>Sorry <b><?=$name;?></b>, your message failed to send. Try later!</p>
</div>";
}
?>

</body>
</html>













<!-- This notice must remain in place!
_______________________________________________________________
| |
| AUTHOR : Jeeremie { http://web-kreation.com } |
|DESCRIPTION : LightForm - Ajax Contact Form |
| DOWNLOAD : http://web-kreation.com/blog/?p=71 |
| VERSION : 1.0 |
| DATE : 2008.02.03 |
| EMAIL : info@web-kreation.com |
| CREDITS : Credits go to Moo Floor (www.moo.floor.ch) for |
| their fabulous FormCheck2 and to Badboy |
| (www.badboy.ro) his nice looking web form |
|_______________________________________________________________|
-->




<?php
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<!-- This notice must remain in place!
_______________________________________________________________
| |
| AUTHOR : Jeeremie { http://web-kreation.com } |
|DESCRIPTION : LightForm - Ajax Contact Form |
| DOWNLOAD : http://web-kreation.com/blog/?p=71 |
| VERSION : 1.0 |
| DATE : 2008.02.03 |
| EMAIL : info@web-kreation.com |
| CREDITS : Credits go to Moo Floor (www.moo.floor.ch) for |
| their fabulous FormCheck2 and to Badboy |
| (www.badboy.ro) his nice looking web form |
|_______________________________________________________________|
-->

<?php

//========
//LICENSE
//========

//The CSS, XHTML, PHP and design is released under Creative Commons Attribution v2.5:
//http://creativecommons.org/licenses/by/2.5/

//Use of this contact form is free of charge but the copyright notes in the footer must remain intact.
//I would appreciate if you send me the URI of your site if you use LightForm.

//FormCheck (http://moo.floor.ch/?p=18) is released under the MIT license:
//http://www.opensource.org/licenses/mit-license.php

//NiceForms (http://www.badboy.ro/articles/2005-07-23/niceforms_preview/) is released under no specific license. You are free to use and modify but you must provide credits.

//This said, let's see how to use this contact form:


//=============
//INSTALLATION
//=============

//Installation is straight forward:

//1. Download and unzip the file
//2. Copy all the files to your root directory


//==============
//CONFIGURATION
//==============

//IMPORTANT!!
//Put in your email address below:
$to = 'sa@mr-sa.com';


//User info (DO NOT EDIT!)
$name = stripslashes($_POST['name']); //sender's name
$email = stripslashes($_POST['email']); //sender's email
$website = stripslashes($_POST['website']); //sender's website

//The subject
$subject = "[Q8iEnG Site..] "; //The default subject. Will appear by default in all messages. Change this if you want.
$subject .= stripslashes($_POST['subject']); // the subject


//The message you will receive in your mailbox
//Each parts are commented to help you understand what it does exaclty.
//YOU DON'T NEED TO EDIT IT BELOW BUT IF YOU DO, DO IT WITH CAUTION!
$msg = "From : $name \r\n"; //add sender's name to the message
$msg .= "e-Mail : $email \r\n"; //add sender's email to the message
$msg .= "Website : $website \r\n"; //add sender's website to the message
$msg .= "Subject : $subject \r\n\n"; //add subject to the message (optional! It will be displayed in the header anyway)
$msg .= "---Message--- \r\n".stripslashes($_POST['message'])."\r\n\n"; //the message itself

//Extras: User info (Optional!)
//Delete this part if you don't need it
//Display user information such as Ip address and browsers information...
$msg .= "---User information--- \r\n"; //Title
$msg .= "User IP : ".$_SERVER["REMOTE_ADDR"]."\r\n"; //Sender's IP
$msg .= "Browser info : ".$_SERVER["HTTP_USER_AGENT"]."\r\n"; //User agent
$msg .= "User come from : ".$_SERVER["HTTP_REFERER"]; //Referrer
// END Extras

?>

<head>
<!-- Formcheck2 / Moo.Floor.ch -->
<!-- http://moo.floor.ch/?p=18 -->
<link rel="stylesheet" href="js/formcheck/formcheck.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/mootools.js"></script>
<script type="text/javascript" src="js/formcheck/formcheck.js"></script>
<script type="text/javascript">
window.addEvent('domready', function(){check = new FormCheck('third', {
display : {
fadeDuration : 500,
errorsLocation : 1,
indicateErrors : 1,
showErrors : 1
}
})});
</script>

<!-- NiceForms / BadBoy.ro -->
<!-- http://www.badboy.ro/articles/2005-07-23/niceforms_preview/ -->
<link rel="stylesheet" href="js/niceform/niceforms-default.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/niceform/niceforms.js"></script>


</head>
<body>
<?php
echo '<head>';
echo ' <link rel="stylesheet" href="your.css" type="text/css">';
echo '</head>';
require( "your.php" );
$Quote = new CQuote;
if( $Quote->Get( $strQuote ) == 0 )
echo $strQuote;
?>
<!-- The contact form starts here-->
<?php
if ($_SERVER['REQUEST_METHOD'] != 'POST'){
$self = $_SERVER['PHP_SELF'];
?>

<!-- Start HTML form -->
<form name="form" method="post" id="third" action="<?php echo $self;?>">
<h1>:::Contact us:::</h1>

<!-- Name -->
<label for="name"><strong><span class="blue">*</span> Name : </strong></label>
<input id="name" name="name" type="text" class="validate['required','length[3,-1]','nodigit'] textinput" />

<!-- Email -->
<label for="email"><strong><span class="blue">*</span> Email : </strong></label>
<input id="email" name="email" type="text" class="validate['required','length[5,-1]','email'] textinput" />

<!-- Website -->
<label for="site">Website : </label>
<input id="website" name="website" type="text" class="validate['url'] textinput" />

<!-- Subject -->
<label for="subject"><strong><span class="blue">*</span> Subject : </strong></label>
<input id="subject" name="subject" type="text" class="validate['required'] textinput" />

<!-- Message -->
<label for="msg"><strong><span class="blue">*</span> Your message : </strong></label>
<textarea id="message" name="message" type="text" class="validate['required'] textarea"></textarea>

<!-- Spam Check -->
<br>
<span class="blue">*</span><strong>Are you human? : <br/> <img src="captcha.php"> </strong>
<input id="captchacode" name="captchacode" type="text" size="5" class="validate['required'] textinput_small" />

<br /><br />
<input type="submit" class="buttonSubmit" value="Send it!" />

<!-- Niceforms: mouse over effect -->
<!-- Do not remove the line below -->
<div id="stylesheetTest"></div>
</form>


<?php
} else {
error_reporting(0);

if($_POST['captchacode'] != $_SESSION['captchacode'] OR $_SESSION["captchacode"]=='')
{
die("<div class=\"MsgError\">
<h1>Error!!</h1>
<p>Sorry , Error in the verification code, please try again!</p>
</div>");
}
if (mail($to, $subject, $msg))

//Message sent!
//It the message that will be displayed when the user click the sumbit button
//You can modify the text if you want
echo nl2br("
<div class=\"MsgSent\">
<h1>Congratulations!!</h1>
<p>Thank you <b><?=$name;?></b>, your message is sent!<br /> I will get back to you as soon as possible.</p>
</div>
");

else

// Display error message if the message failed to send
echo "
<div class=\"MsgError\">
<h1>Error!!</h1>
<p>Sorry <b><?=$name;?></b>, your message failed to send. Try later!</p>
</div>";
}
?>

</body>
</html>













<!-- This notice must remain in place!
_______________________________________________________________
| |
| AUTHOR : Jeeremie { http://web-kreation.com } |
|DESCRIPTION : LightForm - Ajax Contact Form |
| DOWNLOAD : http://web-kreation.com/blog/?p=71 |
| VERSION : 1.0 |
| DATE : 2008.02.03 |
| EMAIL : info@web-kreation.com |
| CREDITS : Credits go to Moo Floor (www.moo.floor.ch) for |
| their fabulous FormCheck2 and to Badboy |
| (www.badboy.ro) his nice looking web form |
|_______________________________________________________________|
-->



When I try the first one, it gives me a parse error on line 254 which is "echo '</style>

and the second one doesn't even make the page load.

Excavator
11-22-2009, 03:52 PM
See if this site has a solution...
http://www.ntchosting.com/php/php-in-html.html#HTML_in_PHP_using_echo

I've never done this either so I'm not much help.

met
11-22-2009, 07:19 PM
wouldn't it just be easier to take the CSS from the contact form and paste it in to your main css, then give each element an ID of say, #my_contact_form

#my_contact_form h1
#my_contact_form p
#my_contact_form input

etc.

then just wrap said contact form in <div id="my_contact_form"></div>

or am i losing it

OGGordon
11-22-2009, 09:34 PM
hey met,

so I have included all 3 css files from the contact form into my main css file which is style.css

I made it exactly how you wrote, with the wrap around the entire thing and called it "mailform"

Then proceeded to add #mailform at every beginning of each values from the 3 css files

The form works now, but there are some issues. Like error msg's don't appear for some reason.

here's a working version of the form:

http://derderder.cwsurf.de/kontakt/mailform.php

If you click in a field and not type anything in it and skip it, you should be able to see a msg popping up. However that doesn't seem to work with this version:

http://testobject.cwsurf.de/kontakt.php

Sorry about the ads, its from the free server. Just click on "SCHLIESEN" at the top right corner of the ad.

OGGordon
11-22-2009, 09:37 PM
I put the wrap, <div id="mailform"></div>, after the <body> tag, which is correct right?

So like this:
<body>
<div id="mailform">

the form
</div>
</body>

And this is the CSS file I added to my main with the changes:



#mailform *{
font-family: tahoma, verdana, "sans-serif";
margin: 0;
padding: 0;
font-size: 95%;
}

#mailform body{
background: white;
}

#mailform a, a:hover{
text-decoration: none;
color: #48f;
}
#mailform a:hover{
color: #33CCFF;
}

#mailform p{
font-size: 90%;
margin-top: 1em;
margin-bottom: 2em;
color: #333;
}

#mailform h1 {
color: #0099CC;
font-size: 1.6em;
}


/* Form */
#mailform form {
width: 400px;
border: 1px solid #EEE;
padding: 10px;
margin: 40px auto;
}

#mailform label {
display: block;
margin-top : 8px;
width: 100%;
background-repeat: no-repeat;
}

#mailform img {
border:0;
}

#mailform .blue {
color: #0099CC;
font-weight: bold;
}

/* footer */
#mailform .dwnld {
Display: block;
padding: 10px;
text-align: center;
width: 400px;
margin: 0 auto;
border: 1px solid #EEE;
background-color: white;
color: #999;
font-size: 1.4em;
font-weight: bold;
line-height: 50px;
background: url(../images/download.gif) no-repeat 40px 10px;
}

/* footer */
#mailform .footer {
Display: block;
padding: 10px;
margin: 40px auto;
width: 400px;
text-align: center;
border: 1px solid #EEE;
background-color: white;
color: #999;
}

#mailform .footer p {
color: #999;
}

/* Congratulation message */
#mailform .MsgSent {
Display: block;
padding: 10px;
margin: 40px auto;
width: 400px;
text-align: center;
border: 1px solid #EEE;
background-color: white;
}

#mailform .MsgSent h1 {
background: url(../images/MsgSent.gif) no-repeat 0 0;
padding-left: 20px;
height: 85px;
line-height: 85px;
}

/* Error message */
#mailform .MsgError {
Display: block;
padding: 10px;
margin: 40px auto;
width: 400px;
text-align: center;
border: 1px solid #EEE;
background-color: white;
}

#mailform .MsgError h1 {
background: url(../images/MsgError.gif) no-repeat 0 0;
padding-left: 20px;
height: 85px;
line-height: 85px;
color: #CC0000;
}

#mailform .MsgSent p, #mailform .MsgError p {
font-size: 1.3em;
color:#999;
}

#mailform .tipsbox .tipsbox_top_left{
background : url('img/top_left.png') no-repeat;
_background : url('img/top_left.gif') no-repeat;
_background-position : 9px 8px;
}

#mailform .tipsbox .tipsbox_top{
background : url('img/top.png') repeat-x;
height : 17px;
_background : url('img/top.gif') repeat-x;
_background-position : 0px 8px;
}

#mailform .tipsbox .tipsbox_top_right{
background : url('img/top_right.png') no-repeat;
_background : url('img/top_right.gif') no-repeat;
_background-position : 0px 8px;
}

#mailform .tipsbox .tipsbox_left{
background : url('img/left.png') repeat-y;
width : 17px;
_background : url('img/side.gif') repeat-y;
_background-position : 9px 8px;
}

#mailform .tipsbox .tipsbox_right{
background : url('img/right.png') repeat-y;
width : 22px;
_background : url('img/side.gif') repeat-y;
_width : 9px;
}

#mailform .tipsbox .tipsbox_bottom_left{
background : url('img/bottom_left.png');
_background : url('img/bottom_left.gif') no-repeat;
_background-position : 9px 0px;
}

#mailform .tipsbox .tipsbox_mark{
background : url('img/mark.png') no-repeat;
height : 36px;
_background : url('img/mark.gif') no-repeat;
}

#mailform .tipsbox .tipsbox_bottom_right{
background : url('img/bottom_right.png');
_background : url('img/bottom_right.gif') no-repeat;
}

#mailform .tipsbox .tipsbox_inner, .tipsbox .tipsbox_inner_ie6{
background : url('img/inner.png');
}

#mailform .tipsbox .tipsbox_inner_ie6 {
padding : 4px;
}

#mailform .tipsbox .tipsbox_error {
background : url('img/error.png') no-repeat;
_background : url('img/error.gif') no-repeat;
width: 40px;
height: 40px;
margin-top: 5px;
float: left;
clear: left;
}

#mailform .tipsbox p, #mailform .tipsbox {
font-size: 1em;
font-family: tahoma, verdana, "sans-serif";
margin : 0;
padding : 0;
border : 0;
color : #FFF;
}

#mailform .tipsbox p {
padding-left: 55px;
line-height: 15px;
}

#mailform .tipsbox p span {
font-size: 1em;
font-weight: bold;
color: red;
line-height: 35px;
}


#mailform .error_f {
border : 1px dotted #666;
margin-top : 5px;
background-color : #EAEAEA;
}

#mailform .error_f p {
margin : 5px;
color : #A00;
}

#mailform .error_f p span {
font-size : 1.1em;
color : #000;
margin : 5px 0px 0px 0px;
}

/*##########################################
Name: Default styling for Niceforms v.0.9
Author: Lucian Slatineanu
URL: http://www.badboy.ro/
##########################################*/

/*Forms defaults*/
#mailform input, textarea {
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
color:#404040;
}
#mailform label {
color:#999;
cursor:pointer;
padding:0 0 4px 2px;
line-height:15px;
vertical-align:top;
}
#mailform label.chosen {
color:#333;
}

/*Transparent items*/
#mailform .transparent {
filter:alpha(opacity=0);
-moz-opacity:0;
opacity: 0;
border:0px solid #FFF;
background:#FFF;
z-index:10;
cursor:pointer;
}
#mailform .transparentFake {
background:none;
border:none;
}
#mailform .transparent2 {
z-index:10;
}

/*Radio buttons*/
#mailform .radioAreaUnchecked, #mailform .radioAreaChecked {
z-index:5;
position:absolute;
width:15px;
height:15px;
cursor:pointer;
}
#mailform .radioAreaUnchecked {
background:url(../../images/radio.gif) no-repeat left top;
}
#mailform .radioAreaChecked {
background:url(../../images/radio.gif) no-repeat left bottom;
}

/*Checkboxes*/
#mailform .checkboxAreaUnchecked, #mailform .checkboxAreaChecked {
z-index:5;
position:absolute;
width:14px;
height:14px;
cursor:pointer;
border: none;
}
#mailform .checkboxAreaUnchecked {
background:url(../../images/checkbox.gif) no-repeat left top;
}
#mailform .checkboxAreaChecked {
background:url(../../images/checkbox.gif) no-repeat left bottom;
}

/*Text inputs*/
#mailform .textinput, #mailform .textinputHovered {
width:236px;
height:15px;
background:url(../../images/input.gif) no-repeat left top;
border:none;
padding:4px 8px;
}
#mailform .textinputHovered {
background-position:left bottom;
}

/* Text inputs smaller */
#mailform .textinput_small, #mailform .textinput_smallHovered {
width:33px;
height:15px;
background:url(../../images/input_small.gif) no-repeat left top;
border:none;
padding:4px 8px;
}
#mailform .textinput_smallHovered {
background-position:left bottom;
}

/*Text areas*/
#mailform .textarea, .textareaHovered {
width:336px;
height:125px;
background:url(../../images/textarea.gif) no-repeat left top;
border:none;
padding:4px 8px;
}
#mailform .textareaHovered {
background-position:left bottom;
}

/*Selects*/
#mailform .selectArea {
width:200px;
height:21px;
background:url(../../images/select_bg.gif) repeat-x left top;
}
#mailform .selectArea .left {
width:8px;
height:21px;
float:left;
background:url(../../images/select_left.gif) no-repeat left top;
}
#mailform .selectArea .right {
width:21px;
height:21px;
float:right;
background:url(../../images/select_right.gif) no-repeat left top;
}
#mailform .selectArea .right a {
display:block;
width:21px;
height:21px;
}
#mailform .selectArea .right i {
display:none;
}
#mailform .selectArea .center {
width:160px;
margin-left:5px;
margin-right:20px;
color:#FFF;
padding-top:3px;
}

/*Selects drop-down*/
#mailform .optionsDivInvisible, #mailform .optionsDivVisible {
position:absolute;
margin-top:-1px;
margin-left:3px;
width:172px;
background:#6f7074;
padding:2px;
font-size:11px;
z-index:20;
}
#mailform .optionsDivInvisible {
display:none;
}
#mailform .optionsDivVisible {
display:block;
}
#mailform .optionsDivVisible p {
margin:0;
padding:0;
}
#mailform .optionsDivVisible a {
color:#F2F2F2;
text-decoration:none;
display:block;
padding:1px 4px;
border:1px solid #6f7074;
}
#mailform .optionsDivVisible a:hover {
color:#FFF;
background:#5F6062;
border-color:#cfd0d6;
}

/*Button*/
#mailform .buttonSubmit, #mailform .buttonSubmitHovered {
width:69px;
height:26px;
color:#FFF;
font-weight:bold;
padding:2px 5px;
background:url(../../images/button.gif) no-repeat left top;
cursor:pointer;
border:none;
}
#mailform .buttonSubmitHovered {
background-position:left bottom;
}

/*Test div - testing if stylesheets are enabled*/
#stylesheetTest {
position:absolute;
left:-999px;
width:10px;
height:10px;
}

met
11-22-2009, 09:51 PM
my only suggestion at this time is that the ajax/jquery/mootools (whatever) used to perform the validation and the effects was relying on the classnames NOT having #mailform in front of them

met
11-22-2009, 09:53 PM
i think there's also some general confusion..you have two doctypes for instance

and the

<script type="text/javascript" src="js/formcheck/formcheck.js"></script>


doesn't exist..wrong path maybe?

met
11-22-2009, 09:56 PM
try this brah



<!-- i bet if you take this line out the adds will stop <script type="text/javascript" src="http://www.cwcity.de/advertisements/layer/layer.php"></script>-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Aschaffenburg, Bayern - PHUGN.de - Heute schon gephugt?</title>
<base href="http://testobject.cwsurf.de/"/>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<meta name="keywords" content="classifieds,posts,ads,events,images,buy,sell,trade,real estate,apartments,personals,dating,xzero community classifieds,xzero classifieds,community classifieds,community,society,social networking"/>
<meta name="description" content="Classifieds for our community. Buy, sell, trade, date, events... post anything. XZero Community Classifieds."/>
<link rel="stylesheet" type="text/css" href="style.css"/>
<!-- This notice must remain in place!
_______________________________________________________________
| |
| AUTHOR : Jeeremie { http://web-kreation.com } |
|DESCRIPTION : LightForm - Ajax Contact Form |
| DOWNLOAD : http://web-kreation.com/blog/?p=71 |
| VERSION : 1.0 |
| DATE : 2008.02.03 |
| EMAIL : info@web-kreation.com |
| CREDITS : Credits go to Moo Floor (www.moo.floor.ch) for |
| their fabulous FormCheck2 and to Badboy |
| (www.badboy.ro) his nice looking web form |
|_______________________________________________________________|
-->
<!-- Formcheck2 / Moo.Floor.ch -->
<!-- http://moo.floor.ch/?p=18 -->
<script type="text/javascript" src="kontact/js/mootools.js"></script>
<!-- check this path its definitely wrong -->
<script type="text/javascript" src="kontact/js/formcheck/formcheck.js"></script>
<script type="text/javascript">
window.addEvent('domready', function(){check = new FormCheck('third', {
display : {
fadeDuration : 500,
errorsLocation : 1,
indicateErrors : 1,
showErrors : 1
}
})});
</script>
<!-- NiceForms / BadBoy.ro -->
<!-- http://www.badboy.ro/articles/2005-07-23/niceforms_preview/ -->
<script type="text/javascript" src="js/niceform/niceforms.js"></script>
</head>
<body>
<div id="top-wrap">
<div class="bg1">
<div id="header">
<div id="headwrap">
<div id="logo1"> this is the logo </div>
<div id="nav"> this is the nav </div>
<div id="search"> Suche
<form action="?" method="get">
<input type="hidden" name="cityid" value="1"/>
<input type="hidden" name="lang" value="en"/>
<input name="search" type="text" size="25" value=""/>
<br />
<img src="images/spacer.gif" height="2" width="2" alt="spacer" /><br />
<select name="catid">
<option value="1">Autos</option>
<option value="2">Motorrad</option>
<option value="3">Fahrrad</option>
<option value="4">Ketcar</option>
<option value="5">Scooter</option>
<option value="6">ideen welt</option>
<option value="7">heloo</option>
</select>
<input type="hidden" name="view" value="ads"/>
<button type="submit">Go</button>
</form>
</div>
</div>
</div>
<div id="midwrap">
<div id="pathbar"> </div>
<div id="datetimeregion">
<div id="logo"><a href="">Aschaffenburg, Bayern</a> </div>
Sonntag, 22 November, 2009 </div>
</div>
</div>
</div>
<div id="wrap">
<div class="bg1">
<div id="contentwrap">
<div id="middle">
<div id="center">
<div id="mailform">
<!-- The contact form starts here-->
<!-- Start HTML form -->
<form name="form" method="post" id="third" action="/kontakt.php">
<h1>:::Contact us:::</h1>
<!-- Name -->
<label for="name"><strong><span class="blue">*</span> Name : </strong></label>
<input id="name" name="name" type="text" class="validate['required','length[3,-1]','nodigit'] textinput" />
<!-- Email -->
<label for="email"><strong><span class="blue">*</span> Email : </strong></label>
<input id="email" name="email" type="text" class="validate['required','length[5,-1]','email'] textinput" />
<!-- Website -->
<label for="site">Website : </label>
<input id="website" name="website" type="text" class="validate['url'] textinput" />
<!-- Subject -->
<label for="subject"><strong><span class="blue">*</span> Subject
: </strong></label>
<input id="subject" name="subject" type="text" class="validate['required'] textinput" />
<!-- Message -->
<label for="msg"><strong><span class="blue">*</span> Your message
: </strong></label>
<textarea id="message" name="message" type="text" class="validate['required'] textarea"></textarea>
<!-- Spam Check -->
<br>
<span class="blue">*</span><strong>Are you human? : <br/>
<img src="captcha.php"> </strong>
<input id="captchacode" name="captchacode" type="text" size="5" class="validate['required'] textinput_small" />
<br />
<br />
<input type="submit" class="buttonSubmit" value="Send it!" />
<!-- Niceforms: mouse over effect -->
<!-- Do not remove the line below -->
<div id="stylesheetTest"></div>
</form>
<!-- This notice must remain in place!
_______________________________________________________________
| |
| AUTHOR : Jeeremie { http://web-kreation.com } |
|DESCRIPTION : LightForm - Ajax Contact Form |
| DOWNLOAD : http://web-kreation.com/blog/?p=71 |
| VERSION : 1.0 |
| DATE : 2008.02.03 |
| EMAIL : info@web-kreation.com |
| CREDITS : Credits go to Moo Floor (www.moo.floor.ch) for |
| their fabulous FormCheck2 and to Badboy |
| (www.badboy.ro) his nice looking web form |
|_______________________________________________________________|
-->
</div>
<div id="right">
<table width="100%">
<tr>
<td valign="top"><div><a href="-1_Bayern/" class="citylist_country">Bayern </a></div>
<a href="1_Aschaffenburg/" class="citylist_city">Aschaffenburg </a><br />
<a href="3_Wenig_Umstadt/" class="citylist_city">Wenig Umstadt </a><br />
<div><a href="-2_Hessen/" class="citylist_country">Hessen </a></div></td>
</tr>
</table>
</div>
<div style="clear:both;"></div>
</div>
</div>
</div>
</div>
<div id="footer-wrap">
<div class="bg1">
<div id="footer">
<div id="footermain">
<div id="menu1">
<h3>Community</h3>
<a href="hilfe.php">Hilfe</a><br />
<a href="tipps.php">Tipps</a><br />
<a href="/forum">Forum</a><br />
<a href="blog.php">Blog</a><br />
</div>
<div id="menu2">
<h3>Heute schon gephugt?</h3>
Wer oder Was<br />
Gästebuch<br />
<a href="kontakt.php">Kontakt</a><br />
Feedback<br />
</div>
<div id="menu3">
<h3>Folge uns!</h3>
<img border="0" src="images/facebook.png" width="48" height="48" alt="facebook" /> <img border="0" src="images/myspace.png" width="48" height="48" alt="myspace" /> <img border="0" src="images/twitter.png" width="48" height="48" alt="twitter" /> <img border="0" src="images/feed.png" width="48" height="48" alt="rssfeed" /> </div>
<div style="clear:both;"></div>
<div id="footersub"> Copyright &copy; 2009 PHUGN.de - Heute schon gephugt?
Alle Rechte Vorbehalten | <a href="terms.php">AGB</a> | <a href="privacy.php">Datenschutzrichtlinien</a> </div>
</div>
</div>
</div>
</div>
</body>
</html>



edit: yes its as i thought, the js is looking for classes etc without a parent id .you'll need to update the JS too i expect.



var FormCheck = new Class({
options : {

############## PERHAPS this will help ##################

tips_class: '#mailform .tipsbox', //tips error class
error_class: '#mailform .error_f', //div error class

OGGordon
11-22-2009, 09:58 PM
my only suggestion at this time is that the ajax/jquery/mootools (whatever) used to perform the validation and the effects was relying on the classnames NOT having #mailform in front of them

I erased the mailform but it doesn't seem to work. I guess I'll just stick to a simple php contact form. Thanks you Met and Ex for your help :thumbsup:

met
11-22-2009, 10:04 PM
I erased the mailform but it doesn't seem to work. I guess I'll just stick to a simple php contact form. Thanks you Met and Ex for your help :thumbsup:



it's also down to the fact your path to the script are screwed -

<script type="text/javascript" src="js/niceform/niceforms.js"></script>

does not exist @ http://testobject.cwsurf.de/kontakt.php

the path iirc was kontact/js/niceform/niceforms.js

fix the paths, fix the html and make a minor tweak to the JS, it's totally doable.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum