x_maras Posted May 19, 2009 Share Posted May 19, 2009 Hi, I 'm having a table which is show in 2 rows with 2 cells. In the first one there is a menu and in the second one is the place where the php files from the menu selection are being displayed. the code: <?php echo " <table> <tfoot> <tr> <td colspan='2' align='center'> <a href='" . HTTP . TESTLINK . $_SESSION['admin'] . "' target='_blank'> " . HTTP . TESTLINK . $_SESSION['admin'] . " </a> <br />(Test Link) <td> </tr> </tfoot> <tbody>"; if(isset($_SESSION['admin'])) { $sqlEnqueteName = "SELECT * FROM enquetes WHERE id='". $_SESSION['admin'] ."'"; $resEnqueteName = mysql_query($sqlEnqueteName); $enqueteName = mysql_fetch_array($resEnqueteName); echo " <tr> <td width='200' valign='top'> enquete: <b>". $enqueteName['name'] ."</b><br />"; include("menu.php"); echo " </td> <td valign='top' rowspan='2'>"; getPage($_GET['p']); echo " </td> </tr>"; } else { getPage($_GET['p']); } echo " </tbody> </table>"; ?> in the pages that appear in the right side of the table the are several drop down menus. In some of them I can choose a new enquete but the name in the left part needs a reload to appear. It works because every time the right value is being stored in the session, but it look pretty like this. I tried to use a javascript in order to reload the page every time that I press the buttons to select from the drop downs but this also doesnt look good because a message box appears and I have to press refresh in it. Any tips? Thank you. Link to comment https://forums.phpfreaks.com/topic/158728-have-to-click-twice-the-submit-button/ Share on other sites More sharing options...
Ken2k7 Posted May 19, 2009 Share Posted May 19, 2009 Do you have session_start() at the beginning of the script? Link to comment https://forums.phpfreaks.com/topic/158728-have-to-click-twice-the-submit-button/#findComment-837173 Share on other sites More sharing options...
x_maras Posted May 19, 2009 Author Share Posted May 19, 2009 yes I do, I just posted a part of the code, for not making a big post and showing you what I have made kind of because my English is not go. Link to comment https://forums.phpfreaks.com/topic/158728-have-to-click-twice-the-submit-button/#findComment-837279 Share on other sites More sharing options...
x_maras Posted June 4, 2009 Author Share Posted June 4, 2009 I kind of fix it but not with a nice way. I have a result anyway. But I thought maybe this will be fixed with ajax. i dont know ajax but I m I want to learn. Can you link me somewhere that I can find a solution to this problem with ajax maybe? Thanks Link to comment https://forums.phpfreaks.com/topic/158728-have-to-click-twice-the-submit-button/#findComment-849147 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.