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
https://forums.phpfreaks.com/topic/222123-div-inside-div/
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
https://forums.phpfreaks.com/topic/222123-div-inside-div/#findComment-1149242
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
https://forums.phpfreaks.com/topic/222123-div-inside-div/#findComment-1149347
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
https://forums.phpfreaks.com/topic/222123-div-inside-div/#findComment-1149855
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.