Jump to content

Adam

Moderators
  • Posts

    5,717
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Adam

  1. CKeditor will replace the textarea you see with an editable iframe, so you can view rich text. You will still be inserting into the textarea, but you just won't be able to see it. Use the CKeditor API to insert the text/html. http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#insertHtml http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#insertText
  2. Yeah, you're looping through and concatenating each. Try adding a condition around it: if (radio[i].checked) { var cta = radio[i].value; break; }
  3. var pta = opener.document.parent_window_formname.editor1('editor1'); You haven't named the parent form, and I'm not sure what you're trying to access in the parentheses? I can't remember off the top of my head, but I think you can just get the value property of the a radio. I'll have a look.. Edit: "of a radio group" I meant.
  4. That will trigger a notice when the variable isnt set.
  5. What's the problem with it? You can access forms like that.
  6. Provided you're not breaking the Same Origin Policy, then it's no problem. The window object stores a reference to the parent in window.opener. Remember that any "global" variable or function is actually just stored within the window in JavaScript, so window.opener is essentially the path to the "global" scope of the parent.
  7. Is this a solution to a problem you have, or are you just going to release it?
  8. Nope, ActiveX controls are IE specific, thankfully. http://support.mozilla.org/en-US/kb/ActiveX
  9. Umm.. What do you expect us to do with it?
  10. You're missing brackets around your else-if expression and you have a semi-colon after the if expression. In future please provide context to your question; what's not working, what error messages are you getting, etc.
  11. You can do this with a little DOM event trickery. Knowing that events bubble up through the DOM tree, the idea is to bind a click event to the document that will always hide it, but then another event on the menu wrapper that will intercept events bubbling up and stop the propagation. That way any click events originating from within the menu, will travel up the DOM tree until they hit the wrapper's click handler and then stop. Any click events originating from outside of the menu will travel all the way up to the document and so hide the menu. Just be sure to only bind this behaviour when the menu is showing, and then unbind it when it's hidden.
  12. Is that a joke?? You've just posted the same code, but with about 10 lines of white-space between each line..
  13. That will be because of the broken "From" header I suspect.
  14. You can avoid all that headache by having an Apache* VirtualHost for each site. Using a virtual host you just configure the DocumentRoot to point to the root directory of the website, access it through a URL such as "http://myvirtualhost.local" and all paths in the HTML can then just be prefixed with a slash: "/directory1/directory2/stylesheet.php". * If you're not using Apache there's equivalents for most web servers.
  15. No I wouldn't do that, the 'hidden' email address will be visible to the recipient.
  16. Ah, apologies there's an IF statement in your code that checks for $from_name, and only if present defines those headers. Otherwise it defines a different header (which also looks to have problems). I would move the Bcc header to just before the mail() call, so that it will always be present.
  17. Or perhaps even better would be an additional isset-esque function: $bar = issetdefault($foo->bar, false);
  18. Just before the mail call, could you do a var_dump of $headers and post us what's shown in the source?
  19. Why did you post a load of PHP code then? Looks like you're using a Chat object to send it. Could you post the code for that..
  20. #2 is the best way in terms of line-breaks by the way. The problem with PHP_EOL is that it uses the convention of the server PHP's installed on. Meaning if it's a unix/linux based OS it will be "\n", but for Windows it will be "\r\n". Using just "\n" could break the email if it's received on a Windows server. "\r\n" will work on both however, so using it just ensures the headers will always be readable.
  21. When did JavaScript come into this? str_replace is a PHP function. You would need to use JavaScript's String replace() method. Although with a standard textarea, all the user will see is the HTML (not the image), and then you'll end up storing it in the DB. Just replace it server-side using PHP as you output the text. If you have an issue with your PHP, please clearly explain what's not working.
  22. "BCC" should be "Bcc" - headers are case-sensitive. Sorry didn't spot that last time.
  23. What's not working?
  24. Headers are 1 per line, so you need a line-break after the previous header, otherwise the string will contain:
×
×
  • 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.