Jump to content

div inside div


Pavlos1316

Recommended Posts

Hello,

 

 

First of all I am using only divs in my site.

 

I am using js to open links inside my content div and is working fine.

 

Now I have a form that customers need to fill. when they fill wrong things they get error msgs.

 

How do I make the error msg to appear in my page instead of opening a new blank one?

 

Thank you

Link to comment
Share on other sites

:confused: where do I add that???

 

When I was using frames this was working:

 

if (!($Full_Name)){
include 'register.php';
echo "<font color=#00FFFF><font size=4><font weight=bold>Please enter your Full Name!</font></font></font>";
exit();
}

 

Now it doesn't. it opens the include 'file' in a blank page. How is it done using divs?

Link to comment
Share on other sites

This is my page.php that opens inseide

div id=contnent

:

 

<body onLoad="document.forms.order.cust_code.focus();">
<p class="text"><form action="order.php" method="post" enctype="application/x-www-form-urlencoded" name="order" id="order">
Κωδικός Πελάτη
<br />
<input name="cust_code" type="text" size="7" maxlength="7" id="cust_code" <?php if (isset($_POST['cust_code'])) { echo 'value="'.$_POST['cust_code'].'"'; } ?>/>
<br />
Κωδικοί Παραγγελίας<br />
<input name="order_code" type="text" size="5" maxlength="5" id="order_code" <?php if (isset($_POST['order_code'])) { echo 'value="'.$_POST['order_code'].'"'; } ?>/>
<br />
<br />
<img src="GenerateCaptcha.php?width=150&height=35&chs=5&font=AmericanParticipants"/>
<br />
<input name="providedCaptcha" type="text" size="19" maxlength="5" id="providedCaptchaId"  />
<a href="javascript:ajaxpage('pelatis.php', 'content');"><input name="Submit" type="submit" id="button" onclick="this.form.post" value="Submit" /></a>
</form></p>
</body>
</html>

 

And this is how I check if sthing is wrong:

 

if (!($order_code)){
include 'page.php';
echo "<font color=#00FFFF><font size=4><font weight=bold>Παρακαλώ εισάγετε τουλάχιστον μια (1) παραγγελία!</font></font></font>";
exit();
}

 

But either using the include command or not opens the specified echo in a blank page instead of inside my page.php!

Link to comment
Share on other sites

try this. it might work. hopefully :D

 

<?php
if (!($order_code)){
include 'page.php';
?>
<body onLoad="document.forms.order.cust_code.focus();">
<p class="text"><form action="<?php echo $_SERVER['PHP_SELF']?>" method="post" enctype="application/x-www-form-urlencoded" name="order" id="order">
Κωδικός Πελάτη
<br />
<input name="cust_code" type="text" size="7" maxlength="7" id="cust_code" <?php if (isset($_POST['cust_code'])) { echo 'value="'.$_POST['cust_code'].'"'; } ?>/>
<br />
Κωδικοί Παραγγελίας<br />
<input name="order_code" type="text" size="5" maxlength="5" id="order_code" <?php if (isset($_POST['order_code'])) { echo 'value="'.$_POST['order_code'].'"'; } ?>/>
<br />
<br />
<img src="GenerateCaptcha.php?width=150&height=35&chs=5&font=AmericanParticipants"/>
<br />
<input name="providedCaptcha" type="text" size="19" maxlength="5" id="providedCaptchaId"  />
<a href="javascript:ajaxpage('pelatis.php', 'content');"><input name="Submit" type="submit" id="button" onclick="this.form.post" value="Submit" /></a>
</form></p>
</body>
</html>
<?php
echo "<font color=#00FFFF><font size=4><font weight=bold>Παρακαλώ εισάγετε τουλάχιστον μια (1) παραγγελία!</font></font></font>";
exit();
}
?>

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.