pambo Posted August 26, 2008 Share Posted August 26, 2008 Hi, i was wondering if anyone can help me with a rly strange problem..... i have a video player (javascript) with four buttons (php) which when pressed swap the video to another video.... The way it works, is that it posts a variable (the video name to itself) using a type hidden field in the form..... this works rly well on every browser, except internet explorer.... WHY?!?! im going crazy here.... can anyone enlighten me? here is the code: <? $videoNamePhp = "test.flv"; if (isset($_POST['submit1'])) { $videoNamePhp = $_POST["recipient1"]; } if (isset($_POST['submit2'])) { $videoNamePhp = $_POST["recipient2"]; } if (isset($_POST['submit3'])) { $videoNamePhp = $_POST["recipient3"]; } if (isset($_POST['submit4'])) { $videoNamePhp = $_POST["recipient4"]; } ?> <form method="post" action="<?php echo $PHP_SELF;?>"> <INPUT TYPE=hidden NAME=recipient1 VALUE="test2.flv"> <INPUT TYPE=hidden NAME=recipient2 VALUE="test.flv"> <INPUT TYPE=hidden NAME=recipient3 VALUE="test2.flv"> <INPUT TYPE=hidden NAME=recipient4 VALUE="tes.flv"> <input type="image" src="videobuttons/vidbuttons1.jpg" width="110" height="53" alt="submit!" value="submit" name="submit1" onmouseover="this.src='videobuttons/vidbuttonsover1.jpg'" onmouseout="this.src='videobuttons/vidbuttons1.jpg'" /> <input type="image" src="videobuttons/vidbuttons2.jpg" width="110" height="52" alt="submit2" value="submit2" name="submit2" onmouseover="this.src='videobuttons/vidbuttonsover2.jpg'" onmouseout="this.src='videobuttons/vidbuttons2.jpg'"/> <input type="image" src="videobuttons/vidbuttons3.jpg" width="110" height="53" alt="submit3" value="submit3" name="submit3" onmouseover="this.src='videobuttons/vidbuttonsover3.jpg'" onmouseout="this.src='videobuttons/vidbuttons3.jpg'"/> <input type="image" src="videobuttons/vidbuttons4.jpg" width="110" height="52" alt="submit4" value="submit4" name="submit4" onmouseover="this.src='videobuttons/vidbuttonsover4.jpg'" onmouseout="this.src='videobuttons/vidbuttons4.jpg'"/> <script type="text/javascript" src="swfobject.js"></script> <div id="flashcontent" align="center"><p style="font-weight:bold;font-size:14pt;">You need to upgrade your Flash Player to at<br>least version 8 to view this video content.</p><p><a href="http://www.adobe.com/flashplayer/">Click here to download the latest version of Flash Player</a>.</p></div> <script type="text/javascript"> // <![CDATA[ var videoName = "<? echo $videoNamePhp ; ?>"; var so = new SWFObject("flvplayer.swf?theFile=videos/" + videoName + "&defaultImage=graphic.jpg&theVolume=100&startPlayingOnload=no&popUpHelp=no&bufferSeconds=2&videoSmoothing=yes","flvplayer","240","208","8","#000000"); so.addParam("movie","flvplayer.swf?theFile=videos/" + videoName + "&defaultImage=graphic.jpg&theVolume=100&startPlayingOnload=no&popUpHelp=no&bufferSeconds=2&videoSmoothing=yes"); so.addParam("bgcolor","#000000"); so.write("flashcontent"); // ]]> </script> </form> Link to comment https://forums.phpfreaks.com/topic/121387-need-help-desperately-forminternet-explorer-problem-s/ Share on other sites More sharing options...
kenrbnsn Posted August 26, 2008 Share Posted August 26, 2008 Image submit buttons in IE do not set the value $_POST['submit_name'], but rather the x & y position of where they were clicked. All other browsers send those as well. Change your check to <?php if (isset($_POST['submit1_x'])) ?> Whenever you have problems with checking POSTed value, put <?php echo '<pre>' . print_r($_POST,true) . '</pre>'; ?> at the top of the processing script. This will dump what is being sent from the form. Ken Link to comment https://forums.phpfreaks.com/topic/121387-need-help-desperately-forminternet-explorer-problem-s/#findComment-625854 Share on other sites More sharing options...
pambo Posted August 26, 2008 Author Share Posted August 26, 2008 omg thank you so so so much! it worked...... and thanks for the tip on debugging forms..... ill definately keep that in mind.... i just had no idea why it worked everywhere except ie, i was rly clueless! thanks again i rly appreciate the help Link to comment https://forums.phpfreaks.com/topic/121387-need-help-desperately-forminternet-explorer-problem-s/#findComment-625863 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.