Jump to content

sciencebear

Members
  • Posts

    60
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

sciencebear's Achievements

Member

Member (2/5)

0

Reputation

  1. I have an onClick function that I only want to run on the first click. (For example, if the user clicks away and then clicks back I don't want it to run again.) How can I do this?
  2. Thank you very much! Your solution worked perfectly, and I also appreciate pointing out my failure to close those div tags-a careless mistake on my part. I do generally try to write for FF first, but this specific instance when I added that element I noticed it worked in IE but not in FF.
  3. This problem occurs in Chrome as well.
  4. Hi everyone. I'm doing a mockup of a new design for my site and I'm having a bit of a problem getting something to align in Firefox. It works fine in IE7, but it doesn't work at all in Firefox. The site is linked below: http://veffle.com/newlayout.php The problem I'm having is to the right of the lorem ipsum, with the speech bubble with the "8" inside. I want it to align centered with the items below it, but it's aligning to the left. Any help?
  5. Hey everyone. I'm doing a mockup of a new layout, and I can't seem to get the z-index right. You can see the site here: NEVER MIND-just needed to add position:relative; Basically, the div called "atab" should have a white background that I want to cover up part of the left border on the "main" div. I'm pretty sure I set the z-indexs right, but it still doesn't seem to work. Any help? This is my CSS [though you should be able to see in in the source of the site] body { background-image: url(images/bg.gif); } .shell { width:890px; text-align:center; margin-right:auto; margin-left:auto; } .navtabs { background:#FFFFFF; width:25px; float:left; border-top:1px solid #000000; border-left:1px solid #000000; border-bottom:1px solid #000000; z-index:1; } .main { background:#FFFFFF; width:862px; float:right; border:1px solid #000000; min-height:500px; z-index:0; } .itab { background:#FFFFFF; height:42px; width:25px; border-bottom:1px solid #000000; } .atab { background:#FFFFFF; height:42px; width:26px; border-bottom:1px solid #000000; z-index:2; } .btab { background:#FFFFFF; width:25px; height:42px; }
  6. That worked exactly how I needed it to. Thank you very much!
  7. Hi again. I was able make a function GetWidth() that returns the variable I need. I can make it show in html by using this code: <script type="text/javascript">document.write(GetWidth())</script> However, I need to use that value in PHP. How can I define that as a PHP variable? Edit: I am only using it to define the width of a div tag (It's not just 100%, GetWidth performs some other operations to the browser width). If there's an easier way to do this without PHP, I could do that as well.
  8. Hi all. I need some help. I need to get the width of a user's browser and then turn it into a php variable. I'm not exactly sure how to do this. Any help?
  9. I have a certain table that looks a little like this: <table> <tr> <th rowspan="3">[75x75 image]</th> <td colspan="2">[text 1]</td><td rowspan="3">[side text]</td> </tr> <tr><td>[text 2]</td></tr> <tr> <td width="25px">[table with single cell and a 25x19 background]</td> <td>[row of 19x19 images]</td> </tr> <tr><td>[bottom text]</td></tr> </table> I hope you can imagine my aim with this table. However, there are a few issues. Firstly, text 1, text 2, and table with the row of images wind up being taller than I want, with blank space at the bottom. I've tried several variations on padding, spacing, etc. to no avail. Secondly, for some reason the row of images is displayed so that the tops of the images are in line with the middle of the table in the td before it, however I want the tops to be aligned and no combination of vertical-align tags seems to work. Any help?
  10. Thanks! I had to change it a little because of the way my table was set up (date and time in separate columns) but the below code works great. Thank you very much! SELECT *, COUNT(type) FROM updates GROUP BY user,type,date, ((60/30) * HOUR(time) + FLOOR(MINUTE(time) / 30)) ORDER BY id DESC
  11. I have a certain table, updates, with columns id, user, type, date, and time. I am trying to group them and get a count of how many in each group by user, type, and within a certain time period. However, I can't seem to get the last part to work. I can group them by user, type and day with the following query: SELECT *,COUNT(type) FROM updates GROUP BY user,type,date ORDER BY id DESC However, like I said, I need to do the same thing except narrow down the time frame. The problem is that I can't just do "GROUP BY user,type,time" because that would only do updates at the exact same second. I want to group updates that are the same user and type and about 30 minutes apart. Any suggestions?
  12. Hmm... I got close with this: This does what I want except the time period is an entire day instead of only 20-30 minutes apart.
  13. I'm trying it right now. Unfortunately, that only results in a row for each different type once, and gives a user along with the total count for that type for every user. I'm not sure how I would implement that to do what I need.
  14. Doesn't count count all the elements though? Perhaps I was not being specific enough. I only want to do something different if there are more than one consecutively, so if there was another instance at a different time I don't want to change it. If there's not a plausible way to do that, all the entries have time stamps attached to them. I could settle for doing something different if the time stamps are with a certain amount of time, even if not consecutive, but I don't know how I'd do that either.
  15. I'm running a query that grabs all the info from several rows of a table called updates. Updates has a column called "type," among other columns. For simplicity, we'll say the types are a, b, c, d, and e. There is also another column, user, which says which user is attached to which update. The query takes each row in order from most recent to least. It works great. However, I want to do something different if there are more than one of a specific type from a certain user in a row. Like this type user a 1 b 2 c 1 c 1 d 1 d 2 e 1 I would like to instead of showing: "1 did a" "2 did b" "1 did c" "1 did c" "1 did d" "2 did d" "1 did e" Show something like this: "1 did a" "2 did b" "1 did c twice" "1 did d" "2 did d" "1 did e" Any suggestions? Sorry if I'm not making a lot of sense. If you have questions, I can try to answer them.
×
×
  • 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.