PHP Classes

Problem with <form> tag

Recommend this page to a friend!

      phpMyDataGrid - AJAX Enabled Datagrid  >  All threads  >  Problem with <form> tag  >  (Un) Subscribe thread alerts  
Subject:Problem with <form> tag
Summary:There is problem while sorting, paging etc.
Messages:5
Author:Annappa Poojary
Date:2007-09-21 13:14:12
Update:2007-09-24 08:19:56
 

  1. Problem with <form> tag   Reply   Report abuse  
Picture of Annappa Poojary Annappa Poojary - 2007-09-21 13:14:12
Hi

Working with your class I had problems with the coding of page.

**********CODE*************************

<body>
<form method="POST" name="Sample6">
<?php
$objGrid -> grid();

$objGrid -> desconectar();
?>
</form>
</body>

If I place these PHP code inside the form (<form> </form> )tag, I am not able to do sorting, paging etc. If we click sorting means its simply hangs(ajax loading).

I am very grateful to you for the help

Thanks

  2. Re: Problem with <form> tag   Reply   Report abuse  
Picture of Gustavo Arcila Gustavo Arcila - 2007-09-21 14:02:46 - In reply to message 1 from Annappa Poojary
You must specify to phpMGD the form name

$objGrid->Form($formName, $doForm=[true/false](by default true if you want phpMDG do the form itself/false for your own form));

$objGrid->methodForm($methodForm[GET/POST]);

Regards

  3. Re: Problem with <form> tag   Reply   Report abuse  
Picture of Annappa Poojary Annappa Poojary - 2007-09-22 05:45:58 - In reply to message 2 from Gustavo Arcila
I tried u r suggestion. Still I had these issues.
The below code works fine in Mozilla Firefox. But same code wont works in IE 6 or 7. Initially it loads the filled grid perfectly. But if we do paging or sorting means it hangs.


This is my sample appliaction.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<?php
include("phpmydatagrid.class.php");

$objData = new datagrid;

$objData->form("MyTest", false);

$objData ->methodForm("POST");

$objData -> connectadb("localhost","root","","TestDB");

$objData -> tabla("Employes");

$objData -> datarows(3);

$objData -> FormatColumn("Name", "Name", 30, 30, 1, "50", "left");
.
.
.

$objData -> setHeader();
?>

</head>

<body>
<form method="POST" name="MyTest">
<?php
$objData -> grid();
$objData -> desconectar();
?>

</form>
</body>
</html>

Thanks for u r valuable suggestion.

  4. Re: Problem with <form> tag   Reply   Report abuse  
Picture of Gustavo Arcila Gustavo Arcila - 2007-09-22 16:03:06 - In reply to message 3 from Annappa Poojary
mmm code looks fine

I know IE does not allow a form inside a form, maybe you can check the html generated and see if this is hapenning.

if error persist, the only suggestion I can give to you is to create the form by using the phpMDG own function

Regards,

  5. Re: Problem with <form> tag   Reply   Report abuse  
Picture of Annappa Poojary Annappa Poojary - 2007-09-24 08:19:56 - In reply to message 4 from Gustavo Arcila
I will try to implement as like u suggested.
Thanks for u r valuable suggestions.