Jump to content

ShadowMage

Members
  • Posts

    3,476
  • Joined

  • Last visited

Everything posted by ShadowMage

  1. Why don't you use a left margin instead?
  2. That makes sense. Essentially, window.open() mimics the behavior of clicking a link. Perhaps a more appropriate label for that attribute would be target instead of name. And an explanation that it is actually the target for the window, but that one can use custom named windows as a target. You mean something like this:<a target='TestWindow' href='http://www.w3schools.com'>W3Schools</a> That seems to work. At least in FF. Then again, the target attribute is deprecated...
  3. Actually, as far as I can tell, providing a name for the window does absolutely nothing. You cannot access it by that name through any means that I know of.It does work, however, and is more useful to be able to specify where the window will open with _blank or _self.
  4. If you want speech bubbles, you might try Googling CSS arrows or CSS speech bubbles or something to that effect. If you want more customized or fancy looking bubbles (like a thought cloud for example) you could use a background image instead of the CSS arrow approach. Either way, it can all be done with pure CSS. EDIT: Actually, it looks like you can get pretty customized without resorting to images. Check out this demo page:http://nicolasgallagher.com/pure-css-speech-bubbles/demo/There are links to the tutorial and the fully commented CSS on that page as well.
  5. I guess that would work. Not any more work than what I was doing. Are you talking about making these changes to the working copy and committing them to the repo? I actually did everything through the repo browser (in Tortoise) but reversing the process seems to have done the trick. Thanks for your guidance, boen. Very much appreciated!
  6. I know. But you're not supposed to make changes to tags right? Occasionally, bugs appear that require immediate attention. I can't make these changes to the trunk (or a new branch created from it) because there could be other under-development changes that have been committed and merged with the trunk. How do you recommend I handle these changes? Is there a special way to do that? Or do I just copy my development files back into the root of trunk and delete the two branches?
  7. I think I may have hosed my repository but I'm not sure. Hopefully somebody can help, because I'll be losing a fair bit of data if I have to restore my repo from backup. It's a really long story, but here's the gist of it: I wasn't happy with how I was handling the merging, tagging, and exporting of my live and development versions. In my repo, the trunk was basically my development version, which meant that when minor bugs occurred in my live version, I couldn't use the repo to make changes. It got messy fast. So I restructured the trunk to have two branches: live and development. Here's the problem. I have several branches (created from the original trunk) and now I've completed one of them (let's call it Comments) and need to merge it with my development branch of the trunk. When I tried to switch to the development trunk branch to reintegrate the Comments branch, I got this error: 'file:///C:/.../SkyPrice/trunk/Beta' shares no common ancestry with 'K:/.../SkyPrice_WIP' Is there another way to merge the two or am I stuck? As I said, if I have to restore my repo I'll lose a significant amount of data (though I could find a workaround) because I've made a lot of changes to the branches I have since change the repo structure. Help please? Thanks.
  8. They aren't really the same. For example:$varOne = null;Technically, $varOne is set, but it is set to null. $varTwo is not set at all. The isset function just considers null to be the same as not set. EDIT: Too slow, JSG beat me...
  9. I don't consider that a pro. When I see that sort of thing I consider it a mess. CSS was created for a reason. Transitional allows for a lot of sloppy coding practices. The only real benefit I see with Transitional is the iframes, but as you mentioned, those are allowed in HTML 5 so there is absolutely no reason to use Transitional. Strict, AFAIK, provides better cross-browser support than Transitional. Strict also forces you to be more disciplined with your coding practices, which is always a good thing. I think HTML 5 also enforces a lot of the same rules, but lifts others, like the self closing tags (they are optional now). Personally, I wish the self-closing tags were still required, because I think this:<img src='something.jpg' alt='something'> is sloppy and confusing. It's an opening tag with no closing tag. EDIT: I just remembered that the self-closing tags are XHTML not HTML. Either way, I still wish they were required.
  10. Being a dairy farmer, I find this analogy to be quite amusing...
  11. I have to admit that I too am often taken by surprise sometimes with the cache in FF. Especially when it comes to PHP. I would say that 98% of the time, changes I make in PHP are immediate and do not require any steps other than hitting refresh. The other 2% require that I clear the cache. Perhaps it is some header or something in certain files (as I tend to work on a great number of different files pertaining to various reports and such). Though, sometimes it seems that only certain changes are not taking effect. Where one change comes through but something else doesn't and when I clear the cache everything works as expected.
  12. I was going more for logical thinking being the ability to take an idea/concept and break it down into the necessary components, how the different components work together, and the logical flow of the program. I guess this fits under the "problem solving umbrella" but I was thinking of problem solving in the stricter sense of solving particular issues that arise with your code. Writing code is the easy part (once you understand the data and control structures). Figuring out why your code didn't do what you expected is the part that can get a little tricky. Right. But it's logical thinking that tells you which structures and operations you'll need. You need to think about which ones would make the most sense. For example, if you need to print a list of items, logic says use an array and a loop. EDIT: Here's another great example, I just ran into. It's PHP but the same concepts apply:I have three different arrays to which data is added to in a loop. At one point I need to figure out which array to add data to. Well, I know about variable variables, and I know about if and switch statements. Variable variables made the most logical sense to me so that's what I used:switch($strStructCalcs) { case 'N': //Calcs needed $whichArr = 'arrCalcsNeeded'; break; case 'O': //Calcs out $whichArr = 'arrCalcsOut'; break; case 'R': //Calcs recieved default: //No calcs needed $whichArr = 'arrAvailJobs'; break;} $t = count($$whichArr);$$whichArr[$t][$Prod_Dwg_By] = $tmpProdDwgBy;$$whichArr[$t][$Submit_Change_Drafter] = $strDrafter;$$whichArr[$t][$Parts_For_Open_Lines] = $strPart;$$whichArr[$t][$Est_Prod_Hours] = $TotalEstProdHours;$$whichArr[$t][$Act_Prod_Hours] = $TotalActProdHours; I was a little surprised when the above didn't work. But that's where the problem solving comes in, and led me to the solution: $$whichArr[$t][$Prod_Dwg_By] = $tmpProdDwgBy; should be ${$whichArr}[$t][$Prod_Dwg_By] = $tmpProdDwgBy;
  13. A very good point. This is part of "mastering" any language. You need to know how and where to look for answers to problems you encounter. I don't think the developer exists who does not, at some point, need to refer to a manual or reference for one thing or another.
  14. Is that even possible? :PI've been doing web development for a few years now, and there are lots of things I'm still learning. And I think that will always be true. I do have to emphasize one point that Ingolme made though: I've had several college courses on programming in general (including Java, C#, and Visual Basic courses) and these courses have helped immensely because they built the foundation required for any kind of programming: logical thinking and problem solving. You need to be able to think through and sketch out your program flow and be able to find and correct errors when they arise. Syntax errors, errors that (usually) prevent your code from functioning, are generally easy to correct because the interpreter/compiler tells you exactly where the error is. It's the logical errors, the errors in how your code functions, that require deeper thinking and good problem solving skills.
  15. For example:$arrCountries = array('Afghanistan', 'Bulgaria', 'Canada', 'Denmark', 'England', 'France', 'Germany', 'Italy', 'Spain', 'United States');foreach ($arrCountries as $country) { $sel = ''; if ($dfield == $country) { $sel = " selected='selected'"; } echo "<option value='".$country."'".$sel.">".$country."</option>";}
  16. ShadowMage

    passwords as...

    Good point. Also a good point. Hadn't really thought about that, but I guess that makes sense. Leave it to JSG to enlighten us.
  17. I thought the :checked selector was new in CSS 3 and according to this it is. The opacity can be "fixed" by using the filter property in the older IE versions, but AFAIK, there is no alternative to :checked.
  18. ShadowMage

    passwords as...

    I wouldn't use an auto-increment field as the primary key for a user table. Simply because it's unnecessary. A user cannot (or should not) have the same username as another user, so why not use that as the primary key? If you're using email as the username then, yes, make that the primary key.
  19. About what? Creating custom checkboxes? Dsonesuk pretty much covered it, although I hadn't thought about the CSS approach. Either way, you still need two images (or one sprite image) and use CSS or JavaScript to change it. JavaScript would use the onclick event while CSS would use the :checked selector. JavaScript will be supported by older browsers, where the CSS would not. However, JS can be disabled.
  20. That too.
  21. Most CSS properties (in my experience, anyway) have little or no effect on inputs, especially checkboxes and radio buttons. You can create custom checkboxes using images and JavaScript, but that's about it, unfortunately. @nicheWhile a round checkbox may look like a radio, it does not behave like one. Checkboxes allow for multiple options to be checked, but radios only allow for a single option to be checked.
  22. Are the options hard coded, or are they populated using dynamic data and a loop? Either way, you'll need to use an if statement to check the value before printing the option. The difference is that with hard coded values, you have to have an if statement for each option, but in a dynamic loop you can put one statement to check the value on every iteration. <select name='datafield'><?php$sel = '';if ($dfield == 'opt1') { $sel = " selected='selected'";}echo "<option Value='opt1'".$sel.">Opt1</option>";?>...
  23. Check out this link:http://us.php.net/manual/en/language.operators.comparison.php#language.operators.comparison.ternary I would use a span rather than a div, but yes. Use the ORDER BY clause to change the way the records are sorted. Assuming that r_date is the date the record was added you could adjust your query like so:$req_query = "SELECT * FROM requestes ORDER BY r_date DESC"; If r_date is not the date you entered the record, you could use another field like the id (if the id is an auto-incremented field). The point is, you need to have a way to track the order in which the records were entered.
×
×
  • Create New...