Jump to content

aggrav8d

Members
  • Posts

    68
  • Joined

  • Last visited

    Never

Everything posted by aggrav8d

  1. the jQuery CSS hover fix adds the class "hover" to any li that I hover the mouse over, in effect replacing the :hover tag in CSS. I believe this is the same javascript you're talking about.
  2. http://gih.reverb-marketing.com/pages/home The menus work in everything but IE6. I added a jquery version of the CSS :hover fix and tested it in firefox. Unfortunately, the fix doesn't help IE6. Please, can you tell me how to fix this? I'm tearing my hair out here. Thanks!
  3. I wasn't really clear in my initial post, there's a lot of intricacies to my situation that I didn't spell out. I'm marking this solved anyways because I think I need to go back and redesign. Thanks.
  4. Say you have a store that sells cars. You want to be able to add, remove, and edit cars. The tricky part I can't figure out is an easy way to preview changes to a car before you hit save. Opening a new window is not a problem. Posting to the new window is also not a problem. Making the system understand that I want it to show the temporary version of the Car and not the last saved version is my problem. How would you do this? On a related topic, when a user starts to create a new instance of something do you save it immediately to the database and delete it again if they hit cancel OR do you wait for them to hit SAVE before you write to the database? I can see advantages to both methods.
  5. sawade, I had it both ways at various times. Neither has worked. TheFilmGod, the order_form link/achor pair has nothing to do with the input at the bottom that submits the form. id tags have nothing to do with link/achor pairs. Please don't drink and post.
  6. It was there the first time I posted the question. <div class='belly_item belly_item_wide add_to_cart'> <div class='top'> <div class='bottom'> <div class='belly_content tall'> <a name='order_form'></a> <form action='' method='post'> <table class='order_options'> <thead> <tr><td colspan='2'>Please select from the following list of options:</td></tr> </thead> <tbody> Any idea why the browser jumps back to the top of the page when I click the "add to cart" button at the top of the page? It should jump to the bottom and STAY THERE.
  7. How is that going to help? It's totally screwing up the intent of the buttons. The TOP add to cart should cause a jump to the BOTTOM add to cart. There shouldn't be any need for the top one to submit a form and go through PHP and a redirect.
  8. http://polycase.reverb-marketing.com/dc-34f.php when I click the "add to cart" button on the top left of the page it should jump down to the order form on the bottom right. it jumps down and then (unexpectedly) jumps back to the top of the page. What did I do wrong?
  9. Any idea what system they used to poll the promoting site? most file*() commands are right out and I can't count on curl to be available.
  10. Hi, phpfreaks. I'm looking for a nice way to automatically update copies of my CMS as they become available. I see a lot of CMS leave it in the hands of the maintainer - from checking for updates all the way to patching the system. Is this really the best way? Surely there's a method that can simplify this for everyone. Please give me the benefit of your experience.
  11. http://dev.mysql.com/doc/refman/5.1/en/fulltext-search.html This may answer your question.
  12. foreach($array1 as $a) { $b=$array2[rand()%count($array2)]; // $a / $b is now your random pair? }
  13. No. location: <new loc> will not work if you echo first. Try instead a javascript command to redirect after a short delay, such as the one seen here: http://www.tizag.com/javascriptT/javascriptredirect.php
  14. also 2x check that in your production code you don't do something like <? // Start snipit 1 $sql = "SELECT * from <table>"; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)) { // do stuff with $row } mysql_free_result($result); // too early... mysql_data_seek($result, 0); // BOOM! while ($row = mysql_fetch_assoc($result)) { // do other stuff with $row }
  15. For simplicity's sake let's assume there's only one admin and that the students have a fixed, unchanging number of fields they can edit. You'll have a table students and then a table students_info, which has id, student_id, updated, and the info. When updating a student's info your easiest solution is to INSERT a new record instead of an UPDATE. that way when the admin logs in to check for changes you can say "which student_info have updated since X" and then you can get student_info (where updated<=X) and compare field-by-field to student_info (latest version). Whatever doesn't match has been updated. Alternately you can store each piece of student_info data as a separate entity (id, student_id, field_id, field_value, updated) and then scan for all student_info updated since time X. In this second method you can use either the UPDATE or INSERT methods. If you use UPDATE you won't be able to roll back a user's changes but you also run less risk of causing your student_info_id to roll over.
  16. You can also cheat by loading your values into an array called $_POST and then including "insert_data.php"... but I don't recommend it.
  17. use $row=mysql_fetch_array() to get your values. then you can $row['your_column_name'] to get the value. then you can create a table with columns named receivermail, amount, uniqueID, note, etc.
  18. Technically you can put statements between the switch() and the first case:. Realistically, nobody does it.
  19. echo "<div class='float:left;width:50%'><ul>"; use $x=mysql_num_results() to find out how many cities you got back. loop $x/2 times to put the first list. then echo "</ul></div><div class='float:left;width:50%'><ul>" and repeat the loop for the second half. then echo "</ul></div>";
  20. onthespot: yeah, if you want to send them to another page then you don't need the javascript. You can use kingphilip's solution to get the truncated string and use a regular query to get the full string on the other page.
  21. What I understand you to mean is that you are pulling a set of comments from a database and you want to show a truncated version of those comments, with a link to show more. $res=mysql_query("SELECT * FROM ".TBL_COMMENTS." ORDER BY commentdate DESC LIMIT 5") or die(mysql_error); while($row=mysql_fetch_assoc($res)){ $comment=$row['comment']; if(strlen($comment)>$your_max_length-3) { $x=$your_max_length/2; $short_c=substr($comment,0,$x-3).'...'.substr($comment,-$x); echo "<p onclick='javascript_reveal_full_comment();'>$short_c</p>"; echo "<p class='hidden_full_comment'>$comment</p>"; } else { echo "<p>$comment</p>"; } } This is off the top of my head, but should do the trick. You have to supply your own CSS and javascript.
  22. $cat = mysql_real_escape_string($_GET['cat']); $r = "SELECT * FROM poj_products WHERE cat='$cat'"; $get_items = mysql_query($r); $results = mysql_fetch_assoc($get_items); mysql_free_result($r); // please be tidy echo '<a href="'.$sitelocation.$results['url'].'?item_desc='.$iresults['id'].'>view details/order</a>';
  23. Yes, that was the first place I looked. I tried wp-syntax, syntax highlighter, and SyntaxHighlighter Evolved. All garbled my PHP. Any other suggestions? Is there some way to use highlighter that I'm not finding in the readmes?
  24. please show us some code so we have a better understanding of what you mean.
  25. I'm sure more than a few of you run blogs with PHP code on display. I've been searching for a syntax highlighter that will handle HTML and PHP. So far I've tried 4 different highliters and they all have the bad habit of htmlspecialchar()ing my code to make it unreadable. Do any of you know of an easy to use plugin that won't have this problem? 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.