Jump to content

ToonMariner

Members
  • Posts

    3,342
  • Joined

  • Last visited

Everything posted by ToonMariner

  1. you should not have to input fields inside ONE label... the onblur event of the label element will never be triggered as it is not a control that can take focus. I would suggest that you use some unobtrusive javascript to detect if either of the two controls in question have lost focus - if so call a function...
  2. you can't redefine a constant - if you try to do so it will fail. if that php code is showing when you run the page then either the php engine is not running or the script is not being recognized as a php file.
  3. This can be achieved - with the extensive use of ajax. But that is pretty much the only way to achieve it. The way to do it would be generate all the page content bar the flash player in an ajax request and update the html accordingly. This sounds like a big deal BUT if you plan you app properly the same code can be used both in the ajax request and in the normal page generation...# Beauty of that is no need for any different pages to be served for bots...
  4. well I aint perfect lol The principle was sound... disappointing you have to use '_blank' what errors did teh code I posted return? I have never run the code so I don't know what it would do...
  5. margin: 0 auto; would be my choice of centering a page.
  6. well - some pages should open in a new window (and the user should be informed that they will open in a new window!!!) but it is definitely something that should be solely controlled by javascript as it is a document effect...
  7. yes I would restrict this to javscript though... give the div a unique id (if its just one div you want to do this on in a page) or a class if you have a couple of divs you want to make this happen... I will use the class example... <div class="external-links"> ... [links] ... </div> now the javascript... window.onload = checkExternalLinks(); function checkExternalLinks() { var divs = document.getElementsByTagName('div'); var links = Array(); var i = 0; for(var x=0; x<divs.length; x++) { if (divs[x].className == 'external-links') { links = divs[x].getElementsByTagName('a'); for(i=0;i<links.length;i++) { links[x].onclick = function() { return newPage(this); }; } } } } function newPage(obj) { window.open(obj.href); return false; } Try that...
  8. You may want to add the modifier that treats a new line as white space (or does it do that by default???) just in case it goes over to a new line...
  9. cron job sending about 5000 at a time (or forking the script http://www.welldonesoft.com/technology/articles/php/forking/) On a cron basis: I'd run it every 5 mins or so until list has been completed - sounds like a monthly news letter type thing so the whole thing would be done in less than 4 hours - obviously the list can increase and you won't be bothering too many people all at once... Others will have different (probably better) solutions to offer.
  10. ob_start() & ob_end_flush(); will help short term - better (IMO) to code with the need for them though.
  11. You can't take a sample from the track client side - you will have to let them upload the entire track and then use mencoder to extract a sample - just google mencoder or mplayer - I know it says movie stuff but it does handle audio too!!! You will need to be able to use exec in your scripts and be able to install mencoder on your server..
  12. I would do a preg replace for this - then you can specify a whole range of replacements in two arrays - keep them manageable. The need for the preg_repalce is that the format may not be EXACTLY the same - which is waht str_replace needs; you couold get the odd extra space in the content. $find = array ( '/fine[ ]+and[ ]+sunny/i' , '/cold[ ]+and[ ]+wet/i' ); $replace = array ( '<img src="fineandsuny.jpg" width="20" height="20" />' , '<img src="coldandwet.jpg" width="20" height="20" />' ); $str = preg_replace($find, $replace, $data); echo $str; Something along those lines will be the bunny... Its all about ensuring you match the correct format of information - this could be made easier if the elements that contain them have a class or id that is consistent and you could then simply grab contents of relevant elements... Good luck - post back if you still need a bit of help.
  13. <a href="/url/to/current/script.php?var=1" title="Value 1" onclick="return showHint(this.href);">Value 1</a> with this javascript... function showHint(val) { var urldata = val.slice(val.indexOf('?')); var varvals = urldata.split('='); alert('Value is ' + varvals[1]); return false; } Now you could make this kind of javscript even less invasive by using javascript to add the onclick eventhandler- this is difficult in ie as you would have to faff about for hours simply because someone at Microsoft implemented their addevent fucntionality on a friday afternoon - they got to a point where it actually did something and said 'eureka! - time for the pub' they couldn't be bothered to check if it was useful or not....
  14. .button_apply_now , .button_training , .button_answers { position: absolute; left: 8px; top: 3px; margin: 0px; padding-left: 1.7em; cursor: pointer; } .button_apply_no { padding-left: 1em; } .button_training { padding-left: 1.8em; } .button_answers { padding-left: 1.7em; }
  15. just right clicking would have told you - or disabling flash and reloading the page....
  16. you can use the accept attribute to specify what it should allow but again this cannot be relied upon and I have never used it so don't know how it acts on differing operating systems/browsers indeed I have read that some browsers completely ignore it... <input type="file" accept="image/jpeg, text/css, image/png" />
  17. what ever you want to do - give up - it can be circumvented - the only thing you can do reliably is to check teh mime type of teh uploaded file - if that is ok continue if not tell the user. You can enhacne this with a nasty javascript check to see what the file extension is (but don't actually trust this) - if its not what you expect then you can prevent the upload.
  18. this is how the browser renders your commands - sorry but not that much you can do with out adding extra html containers to put bottom borders on them.
  19. this doesn't work cross browser... a:hover:before { content: ">"; }
  20. ToonMariner

    frames

    only if you had just 100px of vertical space inteh view window....... the answer to the OP is yes - just don't use frames - design your site in sections (divs) and where possible have each section of the page driven by its own portion of code...
  21. Dulcet - you completely missed the point there didn't you???? My point was that yes you provide the adequate content and style or IE [6] and then use the new fab technology for those that support it... One of my first points was this was a matter of education... When you are faced with a client who thinks you should be able to achieve pixel perfect accuracy in every browser that you know is impossible then they need educating. Point them towards the likes of Zeldman or Clarke and then ask them if they are demanding the best practices to be implemented when building their site or are they bringing an ideology to the table that does NOT help the development of a good, cost effective, user focused site....
×
×
  • 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.