Jump to content

pakiman

New Members
  • Posts

    8
  • Joined

  • Last visited

pakiman's Achievements

Member

Member (2/5)

0

Reputation

  1. <table width="400px" align="center"> <tr> <?php if ($rand ==1) { ?> <td width="33%"> <form method="get"> <button name="data" type="button" onclick="getData()">Click</button> </form> </td> <td width="33%"> </td> <td width="33%"> </td> <?php } if ($rand ==2) { ?> <td width="33%"> </td> <td width="33%"> <form method="get"> <button name="data" type="button" onclick="getData()">Click</button> </form> </td> <td width="33%"> </td> <?php } if ($rand ==3) { ?> <td width="33%"> </td> <td width="33%"> </td> <td width="33%"> <form method="get"> <button name="data" type="button" onclick="getData()">Click</button> </form> </td> <?php } ?> </tr> </table> This is on the server page for the data. It's not allowing me to change where the submit button will be.
  2. This works perfectly. I am just wondering is it possible to have the random number change with each submit?
  3. So I am trying to run ajax to submit without refreshing with mid as the mapID and random as the string to see if the user refreshed. But when I press the button it does nothing. I have my <div id=summary></div> but nothing comes up. Can someone help <script type="text/javascript" src="http://ajax.googleapis.com/ajax/ libs/jquery/1.3.0/jquery.min.js"> <script type="text/javascript"> function getData() { $.ajax({ url : "/map_data.php?mid=1&random=2040187", type : "post", success : function(data) { $('#summary').html(data); } }); } </script> <form method="POST"> <button name="data" type="button" onclick="getData()">Click</button> </form> <?php $order=$_Get['mid']; echo $order; ?>
  4. Thank you soooo much. Something so basic that I totally forgot. Thanks again man.
  5. That the question I have
  6. So while your on items/ the search box works but when you use the items/buy... it does not work
  7. So I am creating a website that the individual would like to have his website as /shop/123 instead of shop.php?id=123. I have been using .htaccess and it's working to show it that but it's blocking my other scripts from working RewriteRule ^items/p/([0-9]+)/?$ /items.php?page=$1 It is blocking this from being used <input type="text" class="search" id="inputSearch" /> <div id="divResult"> </div> It's blocking my javascript from running and its this $(function(){ $(".search").keyup(function() { var inputSearch = $(this).val(); var dataString = 'searchword='+ inputSearch; if(inputSearch!='') { $.ajax({ type: "POST", url: "search.php", data: dataString, cache: false, success: function(html) { $("#divResult").html(html).show(); } }); }return false; }); jQuery("#divResult").live("click",function(e){ var $clicked = $(e.target); var $name = $clicked.find('.name').html(); var decoded = $("<div/>").html($name).text(); $('#inputSearch').val(decoded); }); jQuery(document).live("click", function(e) { var $clicked = $(e.target); if (! $clicked.hasClass("search")){ jQuery("#divResult").fadeOut(); } }); $('#inputSearch').click(function(){ jQuery("#divResult").fadeIn(); }); }); Can anyone help me with this?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.