Jump to content

obsidian

Staff Alumni
  • Posts

    3,202
  • Joined

  • Last visited

Everything posted by obsidian

  1. Nope, IE6 and FF2. I've attached a SS of what I'm seeing in IE6 (identical to what I get in FF2 currently)... [attachment deleted by admin]
  2. If I'm not mistaken, Adblock adds the !important attribute to the styles of their tabs which means it overrides anything previously set, so unless you have a way to declare a style after Adblock has been applied and overwrite them with another !important declaration, I don't know that you can do it...
  3. They look the same to me in both FF and IE... I'm assuming you are playing with them currently?
  4. This does not give you any control over the space between the borders, though.
  5. Try something like this for double outlines right on the border: HTML: <div class="image-holder"> <img src="whatever.jpg" border="0" /> </div> CSS: .image-holder { border: 1px solid #000000; padding: 2px; float: left; } .image-holder img { border: 1px solid #000000; } Notice that by changing the padding on your image-holder div, you can change the space between the borders. If you want to go with the double border and still have space around the image, you'll need to try something slightly more complex: HTML <div class="image-holder-out"> <div class="image-holder-in"> <img src="whatever.jpg" border="0" /> </div> </div> CSS .image-holder-out, .image-holder-in { border: 1px solid #000000; padding: 2px; float: left; } You may also be able to get your additional space by adding padding to the image itself, but this can get a bit hairy in some browsers. Hope this helps!
  6. You are having this issue because you are using relative (fixed) positioning. By definition, this causes your element to be placed where you define, and it will not change when the browser is resized. Also, there is no point in using both a fixed placement and a float. If you describe what you are wanting to achieve, I'm sure we can help you. Try something like this in the meantime: HTML <body> <div id="wrapper"> <div id="nav">asdfasdfasdf</div> </div> </body> CSS #wrapper { width: 900px; margin: 15px auto; } #nav { float: left; height: 250px; width: 145px; background-color: #efefef; }
  7. If you are wanting to store the values of the form without actually submitting the form, it cannot be done with only PHP. PHP can only receive a form submission and process the values. If you are wanting to retrieve the values and store them, you will either need to do so with a cookie or via an AJAX request. With the later, you would scrape the values you need and post them to a "save" script that would set your session variables for you.
  8. Have you tried accessing the name attribute directly? I know that you can retrieve the name value doing this, and I set the name value this way in our CMS at work: var ele = document.createElement('input'); ele.name = 'cats[]';
  9. Therein lies the key, I believe. Rather than rehashing all of what was previously stated, keep in mind that, as should be observed with any technologies, you must have a reason to use it and then decide on the implementation. It is entirely wasteful to simply use a technology to say you have used it. Come up with a project that could be better suited with the use of AJAX, implement it properly (and minimally), and you should have a much better understanding of how it works. In my opinion, one of the ways to tell an experienced, well rounded developer is his ability to decide when not to use a technology... this is one of the reasons that Flash still has a bad rep in many cases: people went overkill and used it in situations where it has no business being used.
  10. What's wrong with just setting the value manually when the element is created? var ele = document.createElement('input'); ele.setAttribute('name', 'cats[]'); Then, add your element to your form.
  11. In the context of a select field, you have to target the option's value instead: onchange="edit_cat.hidden_category.value=this.options[this.selectedIndex].value;"
  12. Yes. Also, if you are ordering them DESC, your index also has to be declared as DESC or you will have to have a filesort, even with forcing the index, too.
  13. What I'm saying is that if the covering index covers all fields, as you mentioned in your OP, the order of the index is not what you are requesting in your ORDER BY. If you force an index that only covers the columns you are ordering by, you are almost certainly going to get a significant reduction in execution time since the results are already in the exact order you are requesting them.
  14. I have had to deal with this exact topic for the last several months at work. There are two schools of thought on the matter, and they have both been touched on here already, so I won't get into depth with it. In my mind, it comes down to this: if the content of the animation can be left entirely out of the DOM and therefore out of SEO content, use flash. However, if you are writing up an animation for content that needs to be available to spiders as part of the DOM, flash obviously will not work, and you need to use JavaScript to the best of your ability. That being said, there are some points where (in my opinion) one or the other should always win out. If you are doing a simple image rotation or animation (gallery or whatever), flash should really be the poison of choice... even for dynamically loaded galleries - just use XML for your data set. On the other hand, if you have to have physical text/content that needs to be markup within the animation, your obvious choice will be JavaScript (at least until Flash fully supports CSS). If you do not use JavaScript for this type of layout, you will end up having to implement Flex and some other things that can be quite overkill for simply animating a content block. Now, on the topic of tools, I have to agree that mootools has some interesting effects, but it is a bloated toolset when compared to some of the other libraries available. I would definitely recommend jQuery for 99% of the client side coding that needs to be done. It is light enough for you to create your own objects and animate stuff however you see fit. Check out the animate method that can so easily be implemented into your code base. In addition, the jQuery object has a fadeIn() and fadeOut() method that allow for that type of animation as well. All in all, this is by far the best tool out there for lightweight performance boosters. I just finished publishing a Slideshow component into our company's internal CMS that implements jQuery to allow for fully customized animation between dynamic content blocks within a page. Including full JSDoc documnetation, the entire JavaScript file is only about 400 lines long... I love jQuery
  15. When you query for your images, just check the count of your returned records. If it is less than 1, display "no images". <?php $sql = mysql_query(/* Your images query goes here */); if (mysql_num_rows($sql) < 1) { echo "NO IMAGES"; } else { // Loop over and display the images. } ?>
  16. Not sure, but I believe that it is ordering twice: once for the f.x and once for the f.timestamp. Because the combination of them may not be covered specifically in one index, you may be able to index just those two columns, force that new index and remove your filesort. Try indexing just the x and timestamp columns and try the query again.
  17. Which "those employers" are you referring too? I've been in discussions with companies offering all different pay scales for the same type roles, sadly. You do have to be somewhat picky, but for an experienced developer, I have seen everything from $35K + benefits for a FT position to $115K + benefits. Oh, and those two salaries I mention were at jobs 50 miles apart, too
  18. Be on the lookout for John Resig's new book as well: Secrets of the JavaScript Ninja. It looks extremely promising.
  19. Keep in mind that the principle of the dynamic menu is really the same whether you use hover or click for the event. I would recommend you write up a JavaScript class for your menu element to handle all the nuances of the control. Here is a base that should get you started on your way. Keep in mind that the mouseover and mouseout events are handled a little differently in browsers, but what I have here works well in both FF and IE: CSS: body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #454545; } #popup { border: 1px solid #aaaaaa; padding: 2px; display: none; position: absolute; top: 50%; left: 50%; height: 100px; width: 300px; margin-top: -50px; margin-left: -150px; background-color: #ffffff; } #popup p { border: 1px solid #ffffff; background-color: #aaaaaa; padding: 42px 100px; color: #ffffff; text-align: center; margin: 0; } HTML: <div id="popup"><p>Hi there!</p></div> <p><a href="#" id="menu-trigger">Click me!</a></p> JavaScript: function popup(id, t_id) { this.ele = document.getElementById(id); this.trigger = document.getElementById(t_id); this.is_over = false; var o = this; this.hide = function() { if (this.is_over == false) { this.ele.style.display = 'none'; } }; this.show = function() { o.ele.style.display = 'block'; }; this.setOver = function() { o.is_over = true; }; this.setOut = function() { o.is_over = false; }; this.ele.onmouseover = this.setOver; this.ele.onmouseout = this.setOut; this.trigger.onmouseover = this.setOver; this.trigger.onmouseout = this.setOut; this.trigger.onclick = this.show; // Set up to handle any clicks outside our bounds var x = (document.onclick) ? document.onclick : function() {}; document.onclick = function() { x(); // Any previously assigned click handles -- allows for multiple objects, too o.hide(); }; } var mypopup; window.onload = function() { mypopup = new popup('popup', 'menu-trigger'); }; With a little tweaking, you would easily be able to assign this type of object to your menu structure. The nice thing about handling your JavaScript in objects like this is that you would easily be able to assign multiple menu style occurrences within your window.onload assignment simply by adding another object for each. Good luck!
  20. Another spot that scope resolution really chokes IE is in the declaration of variables. Since you are reassigning your ins variable within the loop, you may need to actually declare it as a var for IE to properly pick it up: Change these lines: ins = tmp[x]; arrvalue = tmp[x]; To this: var ins = tmp[x]; var arrvalue = tmp[x];
  21. First of all, with this type of data, you really should never enter it all into a single column like this. When you are using a relational database, you are much better off to use the DB as it is intended. You really should create a table with a column for each of the values you are wanting to store and then make the current column simply a reference to your new table. If, however, there are some odd constraints in the system requiring you to use this method, I would recommend just assigning all the values you need stored into an associative array and then serializing it to store as text in your database. This way, you don't have to worry about the different characters you may choose as a delimiter affecting your storage or retrieval. On the other side, all you have to do is retrieve the records and run unserialize on the data. Hope this helps.
  22. If you are looking for someone to write this for you, you need to post in the freelancing forum. If you are looking for some help in understanding techniques, feel free to continue this thread.
  23. Nightslyr has the right of it, but keep in mind you may have to play with the specificity of the JavaScript selector when you retrieve your words. As it is, the code posted assumes that every span in the document is a word you are after. So you may have to do a little more formalization to determine that you only retrieve the WORDS you are looking for. Another idea would be to forget the whole span thing and let JavaScript parse the whole text block for you, counting the words as you go. In other words, you could retrieve the P tag, grab all the child elements and then run your counter as you parse over all the children.
×
×
  • 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.