Jump to content

powens

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Everything posted by powens

  1. Those who are familiar with JQuery UI, I don't understand why this is not sortable. This is as simple as I can make it - I'm trying to apply this to a dynamic detailed list on a page, but If I can't get this working... I've got no hope. <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery UI Test Page</title> <script type="text/javascript" src="UI/js/jquery-ui-1.8.7.custom.min.js"></script> <script type="text/javascript" src="UI/js/jquery-1.4.4.min.js"></script> </head> <body> <script> $('#fruit_sort').sortable(); </script> <ul id="fruit_sort"> <li id="fruit_1">Apple</li> <li id="fruit_2">Orange</li> <li id="fruit_3">Pear</li> </ul> </body> </html> Thanks!
  2. I'm praying there's a function somewhere out there that: generates a html form based on the fields of a particular table within a DB (namely mySQL) generates the appropriate form input based on the fields type or notes (ie. for field: avatar_img, it knows to generate a file input) uses the POST method to submit generates and submits SQL insert query to database In addition to that, a similar function that generates a form that allows the editing of records. It doesn't take too long to write these each time myself, but if there's a function that you provide the formname, database driver, table name, whether your form is to insert or edit, that would be quite nifty i think. ie. generateForm(addUser, mySQL, tUsers, insert) Seen any such thing? Many thanks.
  3. Problem solved. Thank you David and others.
  4. Thanks for the replies, things are happening here. Whether positive/negative I'm not too sure. I've altered the 'prev' button to: if ($monthly == 1) { $monthly = 12; $yearly=$yearly-1; } else { $monthly=$monthly-2; } Which now changes the month successfully. However, when in January, it correctly takes it back to December of the previous year, but it sticks at this point. Where I'm expecting it to again shuffle down the months, 11, 10, 9, 8 etc. I don't have much confidence in the fact that its $monthly-2.. strange.
  5. default page url is: cal.php?m=12&y=2010 'next' when clicked = cal.php?m=1&y=2011 again, cal.php?m=2&y=2011 again, cal.php?m=3&y=2011 'prev', when clicked doesn't shift from the default. I'm expecting it to be: m=11&y=2010. Odd?
  6. Neither my 'next' or 'prev' buttons show any information in the status bar when hovered, I presume this has to do with it being a Div onclick event, rather than a hyperlink. - even so, next works. prev doesn't. :-\
  7. Hi, I'd really appreciate some guidance regarding the GET method. Thus far I've developed a calendar that displays a month at a time. I've created a 'next' button (div) that onclick - it submits values via GET. This works well. <div onclick="location.href='cal.php?m=<?php if ($monthly == 12) { $monthly = 1; $yearly++; } else { $monthly++; } echo $monthly?>&y=<?php echo $yearly?>'" id="nextMonth" class="nextMonth next"></div> The complication comes with the 'prev' button, which I thought would be the reverse of the next button (logic wise). <div onclick="location.href='cal.php?m=<?php if ($monthly == 1) { $monthly = 12; $yearly--; } else { $monthly--; } echo $monthly?>&y=<?php echo $yearly?>'" id="prevMonth" class="nextMonth prev"></div> Can you see any reason why this 'prev' button does not work? FYI, This reads GET and initiates the page $m = !empty($_GET["m"]) ? $_GET["m"] : ''; $y = !empty($_GET["y"]) ? $_GET["y"] : ''; if ($m) { $monthly = ($m); $yearly = ($y); } else { $now = time(); $cur_month = date("n", $now); $cur_year = date("Y", $now); $monthly = $cur_month; $yearly = $cur_year; } Thanks.
×
×
  • 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.