Jump to content
Sign in to follow this  
airman

My website, check it out?

Recommended Posts

Looks good to me. ^_^

 

 

 

As for Clay, I didn't understand a bit of this! :lol:

lol, sorry...you'd have to know a little bit of html/css to understand what I said, but airman got it and it certainly looks better now, so :P

 

"line-height" refers to the spacing between lines of text.

Share this post


Link to post
Share on other sites

I have a rollover image using a script i pulled from another website on there now. However, on THEIR website, the image loads immediately (cached). On my setup, the image is never cached and there is a significant delay. The images are small, (~40kb) so i'm not sure what the deal is. Am i missing something? Here is the script:

 

<script language="JavaScript"> 
<!-- // start hidden code 
our_image = new Image(); 
our_image.src = "images/premiere.jpg"; 
// done with hidden code --> 
</script>				
			<p>Here is a before photo of an image from a photoshoot in 2007.  Roll over it with your mouse to see what was changed.</p>
			<p><center><a href="#" onmouseover="button.src=our_image.src;" onmouseout="button.src='images/before.jpg';"> 
<img name="button" src="images/before.jpg" alt="Standard Beauty Retouch" border="0" height="600" width="402"></a> </center>

Share this post


Link to post
Share on other sites
I have a rollover image using a script i pulled from another website on there now. However, on THEIR website, the image loads immediately (cached). On my setup, the image is never cached and there is a significant delay. The images are small, (~40kb) so i'm not sure what the deal is. Am i missing something? Here is the script:

 

<script language="JavaScript"> 
<!-- // start hidden code 
our_image = new Image(); 
our_image.src = "images/premiere.jpg"; 
// done with hidden code --> 
</script>				
			<p>Here is a before photo of an image from a photoshoot in 2007.  Roll over it with your mouse to see what was changed.</p>
			<p><center><a href="#" onmouseover="button.src=our_image.src;" onmouseout="button.src='images/before.jpg';"> 
<img name="button" src="images/before.jpg" alt="Standard Beauty Retouch" border="0" height="600" width="402"></a> </center>

Not sure why you're using javascript for a simple rollover. Try something like this instead:

 

<img src="images/before.jpg" onMouseOver="this.src='images/premiere.jpg';" onMouseOut="this.src='images/before.jpg';" />

Share this post


Link to post
Share on other sites

i tried that and I had the same issue, there is a significant delay. i have the strictly html script up there now. i tried java because i thought it would cache the image, but i guess not.

Share this post


Link to post
Share on other sites
i tried that and I had the same issue, there is a significant delay. i have the strictly html script up there now. i tried java because i thought it would cache the image, but i guess not.

It caches it once it loads...if you want to "trick" the page into loading it right away, create a hidden div containing the picture...that way it'll load on pageload.

 

Eg.

<div style="display:none;"><img src="images/premiere.jpg" /></div>

Share this post


Link to post
Share on other sites

alright changed a little bit, and added a contact page - which is where i'm having trouble.

 

i snagged a PHP script and an html form for contact purposes - but i'm afraid it's not working. everything goes through with no error messages, but i've sent a few emails with it and they haven't been received yet...keep in mind i'm the furthest thing there is from a PHP programmer.

 

php: (send_form_email.php)

<?php
if(isset($_POST['email'])) {

// EDIT THE 2 LINES BELOW AS REQUIRED
$email_to = "[email protected]";
$email_subject = "Your email subject line";


function died($error) {
	// your error code can go here
	echo "We are very sorry, but there were error(s) found with the form your submitted. ";
	echo "These errors appear below.<br /><br />";
	echo $error."<br /><br />";
	echo "Please go back and fix these errors.<br /><br />";
	die();
}

// validation expected data exists
if(!isset($_POST['first_name']) ||
	!isset($_POST['last_name']) ||
	!isset($_POST['email']) ||
	!isset($_POST['telephone']) ||
	!isset($_POST['comments'])) {
	died('We are sorry, but there appears to be a problem with the form your submitted.');		
}

$first_name = $_POST['first_name']; // required
$last_name = $_POST['last_name']; // required
$email_from = $_POST['email']; // required
$telephone = $_POST['telephone']; // not required
$comments = $_POST['comments']; // required

$error_message = "";
$email_exp = "^[A-Z0-9._%-][email protected][A-Z0-9.-]+\.[A-Z]{2,4}$";
 if(!eregi($email_exp,$email_from)) {
  $error_message .= 'The Email Address you entered does not appear to be valid.<br />';
 }
$string_exp = "^[a-z .'-]+$";
 if(!eregi($string_exp,$first_name)) {
  $error_message .= 'The First Name you entered does not appear to be valid.<br />';
 }
 if(!eregi($string_exp,$last_name)) {
  $error_message .= 'The Last Name you entered does not appear to be valid.<br />';
 }
 if(strlen($comments) < 2) {
  $error_message .= 'The Comments you entered do not appear to be valid.<br />';
 }
 if(strlen($error_message) > 0) {
  died($error_message);
 }
$email_message = "Form details below.\n\n";

function clean_string($string) {
  $bad = array("content-type","bcc:","to:","cc:","href");
  return str_replace($bad,"",$string);
}

$email_message .= "First Name: ".clean_string($first_name)."\n";
$email_message .= "Last Name: ".clean_string($last_name)."\n";
$email_message .= "Email: ".clean_string($email_from)."\n";
$email_message .= "Telephone: ".clean_string($telephone)."\n";
$email_message .= "Comments: ".clean_string($comments)."\n";


// create email headers
$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);  
?>

<!-- include your own success html here -->

Thank you for contacting us. We will be in touch with you very soon.

<?
}
?>

 

and the html form:

<form name="contactform" method="post" action="send_form_email.php">
<table width="450px">
</tr>
<tr>
<td valign="top">
 <label for="first_name">First Name *</label>
</td>
<td valign="top">
 <input  type="text" name="first_name" maxlength="50" size="30">
</td>
</tr>
<tr>
<td valign="top"">
 <label for="last_name">Last Name *</label>
</td>
<td valign="top">
 <input  type="text" name="last_name" maxlength="50" size="30">
</td>
</tr>
<tr>
<td valign="top">
 <label for="email">Email Address *</label>
</td>
<td valign="top">
 <input  type="text" name="email" maxlength="80" size="30">
</td>
</tr>
<tr>
<td valign="top">
 <label for="telephone">Telephone Number</label>
</td>
<td valign="top">
 <input  type="text" name="telephone" maxlength="30" size="30">
</td>
</tr>
<tr>
<td valign="top">
 <label for="comments">Comments *</label>
</td>
<td valign="top">
 <textarea  name="comments" maxlength="1000" cols="25" rows="6"></textarea>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
 <input type="submit" value="Submit">   <a href="http://www.freecontactform.com/email_form.php">Email Form</a>
</td>
</tr>
</table>
</form>

 

any idears?

Share this post


Link to post
Share on other sites

Sorry, I code asp/vb.net and coldfusion, not php.

 

Where are you hosting the site? You'd probably have to open up SMTP or something to allow it to send out mail.

Share this post


Link to post
Share on other sites

i'll check around the control panel, but i'm not opposed to using any other languages if you happen to know of another one i can chop and throw on here. as far as i know, this hosting does it all...it's through webhost4life.com.

Share this post


Link to post
Share on other sites

Is anything showing up after you submit it? Is the success text showing up on the page? You're checking for a post variable called "email" but I'm not seeing an "email" variable in your html. Am I just overlooking it? If nothing is showing up on submit page at all you might not be getting into the if statement.

Share this post


Link to post
Share on other sites

i found out that their mail server requires smtp authorization, but i found a script on sourceforge that will work with it :)

Share this post


Link to post
Share on other sites
http://validator.w3.org/check?uri=http%3A%...ine&group=0

 

^ hmm only 7 errors. Not bad either good looking site and those errors look easy to clear up if you wish to validate.

 

weird. i checked the source code and none of those closing brackets are missing. what is?

 

The validator isn't highlighting in red the bits that need to be there (that seems to be the impression you are getting?).

 

Read the descriptions of the errors and you should get it. For example:

 

<div style="display:none;"><img src="images/premiere.jpg" /></div>

"The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element. "

 

That's saying that anywhere you use an image, if you don't set an 'alt' attribute for it, then it will throw up an error. The solution would simply be to add one, like this:

 

<div style="display:none;"><img src="images/premiere.jpg" alt="short description of what the image is in here" /></div>

 

XHTML Strict (the doctype you have set) will pick up any number of relatively small errors, though of course it is good practise to try and eliminate them all. :)

All the other errors appear to be problems with not closing open tags properly.

 

 

Your CSS appears to validate just fine at the moment. :)

 

Apart from that, and the fact that it's incomplete, it doesn't look too bad. :thumbs-up:

I might think more about logo design, but that can come later if necessary.

Edited by jammin

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×