Deckhengst Posted December 22, 2006 Share Posted December 22, 2006 Hello,First at all: Sorry if my English is not perfect, but I don't speak (type) it very well. Thanks for your understanding.I'm having a problem with my guestbook in Internet Explorer. There's no problem with Firefox or Opera, but in Internet Explorer, the script doesn't works.The values of the textboxes are sended, but the buttons not. I' see that the page reloads, but it doesn't write the message in my database. There's only a problem when I have 2 buttons off the same type. With one button apart it works, but when I place all the buttons at once on the page, it doesn't works.Is there anyone who has a solution for this problem, it should help me a lot!Here's the code:[code]<?php$guestName = isset($_POST['guestName']) ? $_POST['guestName'] : '';$guestMail = isset($_POST['guestMail']) ? $_POST['guestMail'] : '';$showGuestMail = isset($_POST['showGuestMail']) ? $_POST['showGuestMail'] : 'true';$guestURL = isset($_POST['guestURL']) ? $_POST['guestURL'] : 'http://';$guestMessage = isset($_POST['guestMessage']) ? $_POST['guestMessage'] : '';$guestIP = ip2long($_SERVER['REMOTE_ADDR']);if(isset($_POST['writeMessage']) || isset($_POST['previewMessage'])) { include '../files/scripts/guestbook/controle.php'; if($guestControle == 'true') { if(isset($_POST['writeMessage'])) { include '../files/scripts/guestbook/write.php'; include '../files/scripts/guestbook/view.php'; } else { include '../files/scripts/guestbook/preview.php'; } }} else { include '../files/scripts/guestbook/view.php';}if($showGuestMail == 'false') { $guestCheked = ' checked="checked"';} else { $guestCheked = '';}echo'<script language="JavaScript" type="text/javascript" src="../files/scripts/insert_UBB.js"></script><form name="guestbook" method="POST" action="?page=guestbook"> <table> <tr> <td> Naam:* </td> <td> <input type="text" name="guestName" size="30" value="'.$guestName.'" tabindex="1"> </td> </tr> <tr> <td> E-Mail: </td> <td> <input type="text" name="guestMail" size="30" value="'.$guestMail.'" tabindex="2"> </td> </tr> <tr> <td> </td> <td> <input type="checkbox" name="showGuestMail" value="false"'.$guestCheked.' tabindex="3" /> E-mailadres verbergen voor bezoekers </td> </tr> <tr> <td> Website: </td> <td> <input type="text" name="guestURL" value="'.$guestURL.'" size="30" tabindex="4"> </td> </tr> <tr> <td> Bericht:* </td> <td> <img src="../files/styles/'.$siteStyle.'/buttons/UBB/bold.png" id="UBB" alt="Vet" title="Vet" onClick="javascript:bb(\'[b]\',\'[/b]\')" height="18px" width="23px"> <img src="../files/styles/'.$siteStyle.'/buttons/UBB/italic.png" id="UBB" alt="Cursief" title="Cursief" onClick="javascript:bb(\'[i]\',\'[/i]\')" height="18px" width="23px"> <img src="../files/styles/'.$siteStyle.'/buttons/UBB/underlined.png" id="UBB" alt="Onderlijnen" title="Onderlijnen" onClick="javascript:bb(\'[u]\',\'[/u]\')" height="18px" width="23px"> <img src="../files/styles/'.$siteStyle.'/buttons/UBB/striked_trough.png" id="UBB" alt="Doorstrepen" title="Doorstrepen" onClick="javascript:bb(\'[s]\',\'[/s]\')" height="18px" width="23px"> <img src="../files/styles/'.$siteStyle.'/buttons/UBB/superscript.png" id="UBB" alt="Superschrift" title="Superschrift" onClick="javascript:bb(\'[sup]\',\'[/sup]\')" height="18px" width="23px"> <img src="../files/styles/'.$siteStyle.'/buttons/UBB/subscript.png" id="UBB" alt="Subschrift" title="Subschrift" onClick="javascript:bb(\'[sub]\',\'[/sub]\')" height="18px" width="23px"> <img src="../files/styles/'.$siteStyle.'/buttons/UBB/link.png" id="UBB" alt="Link" title="Link" onClick="javascript:bb(\'[url]\',\'[/url]\')" height="18px" width="23px"> <img src="../files/styles/'.$siteStyle.'/buttons/email.png" id="UBB" alt="Email" title="Email" onClick="javascript:bb(\'[email]\',\'[/email]\')" height="18px" width="23px"> <img src="../files/styles/'.$siteStyle.'/buttons/UBB/image.png" id="UBB" alt="Afbeelding" title="Afbeelding" onClick="javascript:bb(\'[img]\',\'[/img]\')" height="18px" width="23px"> <img src="../files/styles/'.$siteStyle.'/buttons/UBB/list.png" id="UBB" alt="Lijst" title="Lijst" onClick="javascript:bb(\'[list]\',\'[/list]\')" height="18px" width="23px"> <a href="javascript:bb(\'\n[quote]\',\'\n[/quote]\')">quote</a> <br /><textarea name="guestMessage" cols="60" rows="5" tabindex="5">'.$guestMessage.'</textarea> </td> </tr> <tr> <td> Smilies: </td> <td>';include '../files/scripts/insert_smilie.php';echo' <a href="'.$siteURL.'/public_html/smilies.php" onclick="smiliesPopup=window.open(this.href,\'smilies\',\'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=400,height=500\'); return false;">[meer]</a> </td> </tr> <tr> <td> </td> <td> <input type="image" name="writeMessage" value="Verstuur" title="Verstuur" accesskey="v" tabindex="6" src="../files/styles/'.$siteStyle.'/buttons/submit.png" id="UBB" alt="Verstuur" /> <input type="image" name="previewMessage" value="Voorbeeld" title="Voorbeeld" accesskey="b" tabindex="7" src="../files/styles/'.$siteStyle.'/buttons/preview.png" id="UBB" alt="Voorbeeld" /> <button type="reset" name="resetMessage" value="Invoer wissen" title="Invoer wissen" accesskey="w" tabindex="8" style="background:#D1D1D1; border:hidden; cursor:pointer;"><img src="../files/styles/'.$siteStyle.'/buttons/reset.png" id="UBB" alt="Invoer wissen" /></button> </td> </tr> </table> </form>';?>[/code] Quote Link to comment Share on other sites More sharing options...
fenway Posted December 22, 2006 Share Posted December 22, 2006 Which buttons? Quote Link to comment Share on other sites More sharing options...
Deckhengst Posted December 23, 2006 Author Share Posted December 23, 2006 [quote author=fenway link=topic=119651.msg490330#msg490330 date=1166819393]Which buttons?[/quote]The buttons at the bottum of the script: <input name="writeMessage"> and <input name="previewMessage"> Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted December 23, 2006 Share Posted December 23, 2006 all I can say is that IE's support for png files was very porr before 7 came along . try saving those images as gif an see what happens. Quote Link to comment Share on other sites More sharing options...
fenway Posted December 26, 2006 Share Posted December 26, 2006 Really? You don't get the value of type=image? Not that I've ever tested this... Quote Link to comment Share on other sites More sharing options...
Deckhengst Posted January 4, 2007 Author Share Posted January 4, 2007 I've changed my method in GET and now I see that he send as value the path to the images. I've tried this with several sort of button's and its allways the same problem when I work with images. When I use just text, there's no problem. Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted January 5, 2007 Share Posted January 5, 2007 AHHHsorry didn't pick this up before. I think it is IE that when you use the image input type it transfers teh co-ordinates you cliked on teh image rather than a true value.put your method back to post and then use print_r($_POST); to view all the info sent - if you submit the page in FF you should get a different set of values for the image buttons than IE.Can I suggest you go and use a standard submit button? style it perhaps but use a standard button - some browsers do funny things to image inputs (I believe safari just replaces them with a blank apple glass button). Quote Link to comment Share on other sites More sharing options...
Deckhengst Posted January 5, 2007 Author Share Posted January 5, 2007 [quote author=ToonMariner link=topic=119651.msg497125#msg497125 date=1167955695]AHHHsorry didn't pick this up before. I think it is IE that when you use the image input type it transfers teh co-ordinates you cliked on teh image rather than a true value.put your method back to post and then use print_r($_POST); to view all the info sent - if you submit the page in FF you should get a different set of values for the image buttons than IE.Can I suggest you go and use a standard submit button? style it perhaps but use a standard button - some browsers do funny things to image inputs (I believe safari just replaces them with a blank apple glass button).[/quote]If there 's no other solution I'll use the standard button, but if perhaps someone else has a solution, it would even be better.Anyway, thanks a lot Deckhengst Quote Link to comment Share on other sites More sharing options...
weknowtheworld Posted January 9, 2007 Share Posted January 9, 2007 Just try $_GET and check that all variables come in the string in the address bar.. :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.