有时空帖子对象 - Joomla JRequest :: get('post');

时间:2014-03-15 07:19:24

标签: javascript joomla

我正在使用表格从在线游戏传输数据。但非常扼要有时邮政对象是空的???表单由javascript提交,并设置了一个值。

每隔3-5次点击一次,发送的表格在" post"宾语。我在自定义joomla组件的MVC中使用此代码。

 <form method="post" action="/index.php?option=com_findme&amp;view=pair&amp;Itemid=40&    amp;lang=de" id="pair" name="pair">
<div class="ImagesSecondRow">
<div class="ImagePaneSmall">
<input type="image" onclick="mysubmit('clickeditem','1382378814')" value=""     src="http://www.dualda.com/media/com_findme/userimages/2356/thumbs/2356.jpg" onmouseout="outUserimage()" ;="" onmouseover="overUserimage('http://www.dualda.com/media/com_findme/userimages/2356/thumbs/2356.jpg')" class="ImagesInputPair" id="thumbimages" name="thumbimages">

</div>

<div class="ImagesSecondRow">
<div class="ImagePaneSmall"> 
<input type="image" onclick="mysubmit('clickeditem','1382377841')" value="" src="http://www.dualda.com/media/com_findme/userimages/1383/thumbs/1383.jpg" onmouseout="outUserimage()" ;="" onmouseover="overUserimage('http://www.dualda.com/media/com_findme/userimages/1383/thumbs/1383.jpg')" class="ImagesInputPair" id="thumbimages" name="thumbimages">
</div>

<div class="ImagesSecondRow">

<input type="image" onclick="mysubmit('clickeditem','1382378691')" value="" src="http://www.dualda.com/media/com_findme/userimages/2233/thumbs/2233.jpg" onmouseout="outUserimage()" ;="" onmouseover="overUserimage('http://www.dualda.com/media/com_findme/userimages/2233/thumbs/2233.jpg')" class="ImagesInputPair" id="thumbimages" name="thumbimages"></div>

<div class="ImagesSecondRow">
<div class="ImagePaneSmall">
<input type="image" onclick="mysubmit('clickeditem','1382378778')" value="" src="http://www.dualda.com/media/com_findme/userimages/2320/thumbs/2320.jpg" onmouseout="outUserimage()" ;="" onmouseover="overUserimage('http://www.dualda.com/media/com_findme/userimages/2320/thumbs/2320.jpg')" class="ImagesInputPair" id="thumbimages" name="thumbimages">    </div>
</div>

<div class="ImagesSecondRow"><div class="ImagePaneSmall"><input type="image" onclick="mysubmit('clickeditem','1382379029')" value="" src="http://www.dualda.com/media/com_findme/userimages/2571/thumbs/CU7WyX4Z.jpg" onmouseout="outUserimage()" ;="" onmouseover="overUserimage('http://www.dualda.com/media/com_findme/userimages/2571/thumbs/CU7WyX4Z.jpg')" class="ImagesInputPair" id="thumbimages" name="thumbimages"></div>

<input id="clickeditem" type="hidden" value="" name="clickeditem"> 
<input type="hidden" value="1394821467" name="timekey">

<input type="hidden" value="0" name="timeout">
<input type="hidden" value="0.516067" name="pageloadtime">
<input type="hidden" value="com_findme" name="option">
<input type="hidden" value="pair" name="view">

</form>

<script type="text/javascript">


    function overUserimage(userimg){

    if (document.images)

      document.images["emptyuser"].src = userimg
     }

function outUserimage(){
   if (document.images)
      document.images["emptyuser"].src = "images/findme/empty_user.png"
}


        function mysubmit(elementname,value)
        {
            //�ndern des formular elements
            document.getElementById(elementname).value = value;
            //alert(elementname + ': ' +      document.getElementById(elementname).value);

            document.pair.submit();
        }


 </script>

传输后,我使用JRequest :: getVar检查变量。但有时它们是正确的,有时是空的

0 个答案:

没有答案