Jump to content

ToonMariner

Members
  • Posts

    3,342
  • Joined

  • Last visited

Everything posted by ToonMariner

  1. http://www.webtoolkit.info/css-clearfix.html
  2. when trying to force the focus onto an element within a page its only useful to do so on one the user can interact with - so some kind of form element (input, textarea etc.) or a link. This should be done in an unobtrusive manner... Give the element you wish to set the focus on an id (remember id's must be unique) like so <input type="text" name="username" id="username" /> in the head section of the page place a script tag to an external js file which contains... window.onload = setInitialFocus; function setInitialFocus () { document.getElementById('username').focus() } Lovely stuff...
  3. this is due to the block level nature of your elements. text should really go in a p tag but lets stick to what you have... If you add float: left to your div style then it will only take up as much space as it needs - instead of filling the horizontal space available...
  4. that is because type is a deprecated attribute of the ol tag - just give it a class or an id to style it instead. ol should contain li elements NOT TABLES - TABLES ARE FOR TABULAR DATA. on a slightly different point - don't scared of breaking out of php - it can really help you see things better AND improve efficiency... Now - I don't like you html but that is another matter but you code could be written like so <center> <form action="mark_spec.php"> <ol type="a"> <?php while (list($key,$value) = each($answers_array)) { ?> <table width="400" cellspacing="0" cellpadding="2"> <tr> <td valign="top"> <li> <font size="-1"> <input type="radio" name="answer" value="' . $value . '"></font>'; </td> <td valign="top"> <font size="-1"><?php echo $value; ?></font> </li> </td> </tr> </table> <?php } ?> </ol> <input type="submit" value="Check Answer"> </form> </center> Now please go an produce some html that actually means something - I can see wat you are trying to do - suffice to say you are not going the right way about it - have a go at producing VALID and MEANINGFUL markup and then we might be able to help you a little more...
  5. really? I would check the documentation - not very useful if you can't verify a purchase automatically and quickly. If they don't offer that then I would switch providers just on this basis!
  6. dptr had it.... $qry = "DELETE FROM `Members` WHERE `Member_ID` IN (" . implode(',', $_POST['checkbox']) . "; $qry = mysql_query($qry);
  7. alternatively you can just put ini_set('error_reporting', E_ALL); at the start of your script...
  8. Jesus H Darkness... I did acknowledge your correct stipulation in you code - what your FAILED TO DO was generate an array of the database results to run array_unique on... If you look at my code you may spot '[]' in there somewhere - the giveaway of creating an array...
  9. NEVER RELY ON JAVASCRIPT html is your true friend javascript may not be around to help out! PS i concur with dptr - passing the previous url (or something that would allow you to get it like an id to a page in the database) is the best option.
  10. NO he wanted the number of UNIQUE records NOT just the mysql_num_rows.... So tell us - how can he get the number of unique items in the result if he is NOT going to use DISTINCT and doesn't create an array so that it can actually be interrogated for unique values???? PLEASE look at the code I posted once more - you'll see its correct....
  11. does the ideal site not offer a redirection on completion of transaction??? So when the user has paid they are redirected back to your site with either a complete or failed note - you can then use that to display a congrats page and clear out the cart or an error page stating the payment failed. Waiting ion the email could cause you problems - you could check the inbox for emails from ideal and clear carts when the users order number is detected - but email CAN take a while to get through....
  12. $_SERVER['HTTP_REFERRER'] be aware not all clients send this info!
  13. ??????????? yes php can do this - providing you know what the templates should be and what content requires manipulation you can do what you want - either write the code generated to a file or to the screen - it matters not. YOu could even write php to write another php script provided you have defined what you want it to accomplish - thats the hard part - coding it is a piece of piss...
  14. problem with your solution Darkwater is that no array is actually generated... if including distinct in the query produces the desired result and permits any other interaction required then that would be the best solution. If however the rest of the data set is required for other jobs then creating an array of results would be necessary... (I use mysql_fetch_assoc - for the simple reason that I rarely find returning fields by a numerical index very useful..) $cres = mysql_query($cquery) or die(mysql_error()); while($row = mysql_fetch_assoc($cres)) { $cfields[] = $row["customfields"]; echo $row["customfields"]; } $unique_records = count(array_unique($cfields)); yes this is what darkwater said but the array $cfields was never actually created....
  15. position:fixed; this don't work in IE6 so you'll need a bit of javascript to help out...
  16. kyle... download this nice little app to help you write yur css... http://www.newsgator.com/download/products/ts3lite.exe not putting it as a url just in case exe links are frowned upon - been here for years and still never really read the guidelines If you don't link following links to exe then simply google 'topstyle lite' the first link I think is the page for downloading the full version - don't download the trial version, scroll down a little more and you'll see a link for the lite version
  17. look at overflow in css - don't bother with the colour thing - it only works in ie so its pointless
  18. its no big deal cooldude... its essentially just the reverse of plugin detection - you put an image inside an object tag of a swf file - if flash is available then the swf plays if not user sees image... I actuallythink that what is being asked here is a legitamate exercise in imporving user experience - something java/javascript shoudl be used for...
  19. no - php can't do anything for you here apart from set a javascript variable with the path of the movie file. Transfer speed can only be detected client side NOT server side... Once the detection is complete if the lower threshold for you movie is exceeded then you can replace teh html of the parent element of teh img tag awith an object tag for the movie...
  20. java/javascript is the only method you will get for detecting the current data transfer speeds - I would sggest you serve an image by defaul and use javascript to replace that with a movie if the detected transfer rate is sufficient.
  21. YES! Use the images as a background-image... Just like I said in my first reply... Set the background of the link (anchor tag) to the image of your choice - give it a width and height (make sure its a block level element - display: block; or float: left;) and hide the text using one of the two methods I stated previously. Give the link tag a title... eg. <ul id="main-nav"> <li><a href="/a/page.html" id="linka" title="This shows on hover after a while">The Link Text</a></li> <li><a href="/another/page.html" id="linkb" title="This shows on hover after a while">The 2nd Link Text</a></li> </ul> css... ul#main-nav li { float: left; } ul#main-nav li a { display: block; text-indent: -9999px; } a#linka { background: transparent url(path/to/imagea.jpg) no-repeat 0 0; } a#linkb { background: transparent url(path/to/imageb.jpg) no-repeat 0 0; }
  22. You add the title attribute to your anchor... The 'best' method (or at least the one I prefer to use is to give 'image' links a bit of accessibility treatment. Set the background anchor to the image of choice - make anchor a block element and set width and height according to image size - 'hide' the text by either text-indent: -9999px; OR placing anchor text in a span which you can position: relative; left: -9999px. If you use the latter you have to do a bit more magic in 'compliant browsers' to hide the text-decoration..
  23. I don't think you are quite ready yet... have a read up on how data(information) is passed between pages via a browser
  24. IMO you should NOT use variables as configuration settings - instead use constants; after all configuration settings are constants... My config files take the guise of... <?php define ( 'SETTING1' , 'setting1value'); // comment on constants meaning ?> the beauty of using constants over variables lies in the memory use involved - constants are more efficient.
  25. the second argument for the preg_replace should be a string or an array of strings... You can't use a function in there...
×
×
  • 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.