Jump to content

sleepyw

Members
  • Posts

    81
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

sleepyw's Achievements

Member

Member (2/5)

0

Reputation

1

Community Answers

  1. Problem solved....was a combination of a minor CSS issue (z-index) and an order issue with the PHP generating some of the images.
  2. Just to show multiple rows and the behavior of how the last item in each row doesn't show the overlayed icon:
  3. This is driving me nuts. I've stripped the code down to the most basic elements. I've looked online at other examples. But I cannot get this to work. I basically have a big image gallery, and in the bottom-right corner of each thumbnail, I want to overlay a small clickable icon. However, the last image of a row (for example, if I have 3 rows of images, the last one on the right of each column) will not show the icon. If I try it with just one image, nothing shows up at all for an overlay. Here's the code: <div style='text-align: center; padding: 5px; margin: 0px; margin-right: 0px; float: left; width: 120px; position: relative;'> <img src='images/hires.png' style='position: absolute; top: 40px; left: -60px;'> <img src='images/folder_orange.png'> </div> <div style='text-align: center; padding: 5px; margin: 0px; margin-right: 0px; float: left; width: 120px; position: relative;'> <img src='images/hires.png' style='position: absolute; top: 40px; left: -60px;'> <img src='images/folder_orange.png'> </div> The resulting page looks like this: I've played with the code so many ways, but can't figure this out. Anyone?
  4. Hi again requinix! OK...I need to edit my post. It actually did work, but now the bullet point character is not being accepted when it previously was (I think that's the \u2022). Edit #2: I moved the \u2022 up further into the regexp and it's working now. Run into this a lot where the order is critical, but not sure what the order is supposed to be. Thanks again for your help!
  5. I'm using the frmvalidator.addValidation code (with the associated validator.js file) and I cannot for the life of me find anywhere how to include an allowable character of a line break to the regexp. For example, I might have something like: frmvalidator.addValidation("Notes","regexp=^[A-Za-z0-9\u005F\ \.\-\@\,\%\*\!\?\$\&\'\#\+\=\:\;\(\)\u2022]{1,300}$","Notes can only contain the following non-alphanumeric characters: ,'?!/*&%$#@:;_+=@"); But if a user enters a line break, it won't accept it. I've tried adding \u000D, \u000A, \u000C, U+000D, \r\n, \n ..... nothing works. Am I missing something really obvious?
  6. Ack - can't edit my above post anymore. Tinkering a little...I think it's working now....will report back. UPDATE: yes - it's working! Thank you both for your assistance!
  7. OK, thanks again to both of you! I think I made the changes you both suggested. It's not likely someone would start an email address with the "@" symbol, so I'm not too concerned with that. Good news is I'm not getting the implode error anymore. Bad news is the result is coming out wonky. As a test, I typed in the names John Smith and Lisa White. The out put was "John.Smith,.Lisa.White@xyz.com". And if there is any email address with "@" in it, it ignores the whole function and just uses the original string as-is. So obviously, I'm missing something that separates each recipient--it's checking the entire string. Do I need to put [$key] in the strpos and/or str_replace? Here's what I changed the code to: $exploded_new_recipients = explode(';', $recipient); // separate each item into new var $recipient foreach ($exploded_new_recipients as $key => $recipient) { // remove beginning and end white space from each $recipient = trim($recipient); // if item does not include @, replace the space with a '.' and add end email domain if ((strpos($recipient,'@')) == false) { $new_recipients = str_replace(" ", ".", $recipient) . "@xyz.com";} else {$new_recipients = $recipient;} // update var $exploded_new_recipients[$key] = $new_recipients; } // put string back together with ', ' between each value $final_email_list = implode(', ', $exploded_new_recipients);
  8. Well, I have to admit I'm lost and getting an error on the implode function (although I'm sure most of the rest of this is probably wrong, too). Here's what I have (including comments to show what I'm trying to do). The current $recipient will likely have semicolons separating each name/email address, which explains the explode ';'... $exploded_new_recipients = explode(';', $recipient); // separate each item into new var $recipient foreach ($exploded_new_recipients as $key => $recipient) { // remove beginning and end white space from each $recipient = trim($recipient); // if item does not include @, replace the space with a '.' and add end email domain if ((strpos($recipient,'@')) == false) { $new_recipients = str_replace(" ", ".", $recipient) . "@xyz.com";} else {$new_recipients = $recipient;} // update var $exploded_new_recipients[$key] = $recipient; } // put string back together with ', ' between each value $final_email_list = implode(', ', $recipient);
  9. Thank you again for taking the time to reply! Let me see if I can piece this together (I'm not super proficient with PHP). If I run into issues, I'll post the code I'm working on and hopefully you will still be around to point me in the right direction.
  10. Thank you, requinix. That makes sense, but what will hang me up if the foreach. I don't think I know how to do that...although the rest I think I could manage.
  11. I'm having a probably server-side issue that I cannot fix, so I need to find a workaround. I have a page designed to allow people to enter their report and email it to a list of people (it will vary each time). There are 2 ways people can enter an email recipient: full email address or first and last name (which is how you find people in the corporate Outlook Exchange accounts). So when the recipient field is entered, it may contain a mix of full email addresses or just first and last names (separated by commas). For example, here's my original array of email recipients: $recipient = "bob.smith@abc.com, John Smith, Barb Johnson"; The problem is with the first and last names. When the email sends, it adds the entire domain of the server to the email address. For example, if the server I'm using is "test.server.xyz.com" and I enter "John Smith", when the email gets sent, it sends to "John.Smith@test.server.xyz.com" instead of just "John.Smith@xyz.com". So I'm wondering if there's code that would search an array using mixed email addresses, locate just the ones with first and last names, and fix them. How would I code this so it ended up as: $new_recipients = "bob.smith@abc.com, John.Smith@xyz.com, Barb.Johnson@xyz.com"; Thanks in advance! Note: I've asked IT if they can fix something on the server end to correct this, but I'm not counting on their help, so looking for a workaround.
  12. I appear to have found the issue from some outside help....swapping the quotes again (single/double quotes) seemed to work when I tried it again. Previously it gave me errors. @gristoi Yeah I saw the single quote, but that was my trascription error here, not in my actual code. $Domain had a result, as I tested it when echoing the data back to make sure something was actually there.
  13. I've been baffled by this for 2 days now and cannot figure it out after exhaustive searches. I'd like to think I'm doing this correctly, but cannot get it to work. I'm trying to use a variable within a query WHERE statement, and it shows 0 results. If I directly hardcode the text instead of using the variable, it works. The variable is pulling from a $_GET, and if I echo that variable, it is showing the correct text. Here's my code: $Domain = $_GET['Domain']; $result = mysql_query(SELECT Code, Title, Domain, Status FROM tablename WHERE Domain="$Domain" ORDER BY Code'); If I swap out "$Domain" for direct text, like "ABC", it works. I have tried swapping out the quotes and single quotes throughout the statement, removing the quotes around $Domain, concatenating the statement separately....all yield erros or the same result. And as stated, if I echo $Domain, it shows "ABC" (or whatever it's supposed to show), so i know it's pulling correctly from the $_GET. Anyone know what I'm doing wrong?
  14. OK - I temporarily removed the banner and was able to read the error (typical syntax error I missed). It appears as though your suggestion is working! Muchas gracias, kind sir!
  15. Barand - it's not working. The entire page is coming back blank (I can't see if there's an error because of a banner at the top lkely covering it). And I'm not sure what you mean by "normalized" my data. The table is a project list, and each column is a person that worked on the project. The 3 columns represent different roles, and people can be in any of the 3 columns. I'm not sure if that has anything to do with what you mean or not. EDIT: I see you reworked the code a little, and I modified mine, but the result is the same (an entirely blank page, except for the banner).
×
×
  • 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.