IE wont show contact form!

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
Xsis
Forum Newbie
Posts: 10
Joined: Tue Feb 07, 2012 10:38 am

IE wont show contact form!

Post by Xsis »

Hi Guys,

iv'e been trying to figure this one out all night, I have a ajax script in my background that gets new information and posts it on the content area of a page. (navigation).
works fine in all browsers.. BUT when I want my contact page shown, all browsers except for IE shows the damn page! why!?

Code: Select all

<div class="fs1" align="center"><div class="nicealign" id="cfh">
<div class="contact" align="center">Contact Form<br /></div>
<form method="post" action="content/send_contact.php">

<ul>Subject</ul><br />
<input name="subject" type="text" id="subject"/><info>What is the topic?</info>


<br /><br />
<ul>Message</ul><br />
<textarea name="message" id="message"/>
</textarea><info>Write content here</info><br /><br />

<ul>Name</ul><br />
<input name="name" type="text" id="name"/>
<info>Full Name</info><br /><br />

<ul>Email</ul><br />
<input name="email" type="text" id="email"/>
<info>Valid Email Address</info><br /><br /><br />
<input type="submit" name="submit" value="Submit" style="height:20px;color:#CCC; background-color:#131313; border:solid 1px #666; width: 70px; font-size:11px;"/>
<input type="reset" name="submit2" value="Reset" style="height:20px;margin-left: 15px;color:#CCC; background-color:#131313; border:solid 1px #666; width: 70px; font-size:11px;"/>
</form></fieldset>
<br /></div></div><br />
<br /><br />

as for the php code its:

Code: Select all

<?php $name = $_POST['name'];
	$email = $_POST['email'];
	$message = $_POST['message'];
	$topic = $_POST['subject'];
	$formcontent="From: $name \n\n Message: \n\n $message";
	$recipient = "send@mail.com";
	$subject = "$topic";
	$mailheader = "From: $email \r\n";
	mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
	?>


<meta http-equiv="refresh" content="5;url=http://yoururl.com">
<link rel="stylesheet" type="text/css" href="../css.css" />
<div class="infotool">
Your contact has been sent to our email, You'll be automaticly redirected in 5 seconds.<br /><br />
If not, press <a href="http://yoururl.com" target="_blank">here</a>
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: IE wont show contact form!

Post by social_experiment »

Xsis wrote:BUT when I want my contact page shown
Once the page is submitted or in general?
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Xsis
Forum Newbie
Posts: 10
Joined: Tue Feb 07, 2012 10:38 am

Re: IE wont show contact form!

Post by Xsis »

Nope, it's when i press on the navigation.

example, i press news *pop* goes the news and shows up.
but contact it says *pop* and nothing shows! it's annoying!

It wont show my form, but when I go to the direct link, it shows fine (ofc. without css).
but it's just weird that it shows everything else, just not this. remember all browsers works with my contact page, but not IE :dubious:
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: IE wont show contact form!

Post by social_experiment »

What does the complete code for the contact page look like; and the 'navigation' code
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Xsis
Forum Newbie
Posts: 10
Joined: Tue Feb 07, 2012 10:38 am

Re: IE wont show contact form!

Post by Xsis »

Well the complete code for the contact form is the one shown above, it's coded with Ajax/Jquery behind the scenes, so it calls forth different sites and includes them.



The Navigation.

Code: Select all

<a href="#page4"><img src="images/contactbut1.jpg" width="123" height="46" alt="Contact Button" /></a>


Jquery/Ajax code that directs over to loadpage.php

Code: Select all

var default_content="";

$(document).ready(function(){
	
	checkURL();
	$('ul li a').click(function (e){

			checkURL(this.hash);

	});
	
	//filling in the default content
	default_content = $('#pageContent').html();
	
	
	setInterval("checkURL()",250);
	
});

var lasturl="";

function checkURL(hash)
{
	if(!hash) hash=window.location.hash;
	
	if(hash != lasturl)
	{
		lasturl=hash;
		
		// FIX - if we've used the history buttons to return to the homepage,
		// fill the pageContent with the default_content
		
		if(hash=="")
		$('#pageContent').html(default_content);
		
		else
		loadPage(hash);
	}
}


function loadPage(url)
{
	url=url.replace('#page','');
	
	
	$.ajax({
		type: "POST",
		url: "load_page.php",
		data: 'page='+url,
		dataType: "html",
		success: function(msg){
			
			if(parseInt(msg)!=0)
			{
				$('#pageContent').html(msg);
			}
		}
		
	});

}


Code for loadpage.

Code: Select all

<?php

if(!$_POST['page']) die("0");

$page = (int)$_POST['page'];

if(file_exists('content/page_'.$page.'.php'))
echo file_get_contents('content/page_'.$page.'.php');

else echo 'There is no such page!';
?>
Post Reply