Jump to content

jeffman

Members
  • Posts

    7,761
  • Joined

  • Last visited

Everything posted by jeffman

  1. Make sure something else has not messed up. I don't like that alert no longer works. Then try this: var resultat = $.ajax({ url: 'serveur.php?serie=' + serie, dataType: 'xml', async: false, success: function (data) { var noms = $(data).find('photographie'); alert(noms.length); }});
  2. One way is to create a header element (it can be a div or a header) and use the image as a background. The header will be the first element of your body. CSS for that might look like this: .header { background-image: url("myImage.jpg"); background-repeat: no-repeat;} But be careful. The image will not show completely if the height of the header is smaller than the height of the image. If that is a problem, set the height or min-height of the header to the height of the image (or more). You may also want to add padding-left to the header that is the width of the image (or a little more) so that the image is not covered by contents of the header, such as text.
  3. For that to work, the link and the span need to have the same dimensions. That probably means setting their display property to block or inline-block. And that might mean that having both the span and the link is not necessary. I don't know why you need both, so I can't be sure, but maybe you need only the link. BTW, is the link really a link, or are you just using it to trigger some JavaScript? If the latter, you might not need a link. You might only need the span.
  4. Yeah. The pathnames I suggested won't work for you. I could have looked again at your first post and known that. Sadly I have no knowledge of WAMP boxes, so I think I'm done with this topic. Good luck.
  5. Here is the password element from the hontour site. Notice the placeholder attribute: <input id="loginbar_password" type="password" placeholder="password" name="password"> That's all you really need. It doesn't work in older browsers, but this functionality is nice, not essential.
  6. What you're doing works, and I really don't want to mess with that. The more modern approach is more a philosophical choice than anything. Part of it says that elements have a purpose and shouldn't be manipulated into a different purpose. Like not using tables for layout. You've probably heard that. So semantically speaking, an <a> element should only ever be an anchor; it shouldn't just be a button to trigger some JavaScript. Another principle says we should isolate structure, style, and behavior from each other as much as possible. So we no longer have <font> tags like we used to, and CSS has taken over the role of old in-tag attributes like bgcolor and so on. Same with JavaScript. Modern developers don't put it in tags anymore. They keep all the scripting separate. I posted some stuff for a guy earlier today that shows one way that can look. Most of that won't apply to your situation, except for the way that the click handlers are attached to the buttons (which could just as easily be images or text spans). And to be completely honest (bless me, Father) the technique I show there isn't completely modern, since I'm not using the W3C recommended addEventListener method. As usual, IE is the reason. addEventListener doesn't work for IE versions before 9. element.onclick works everywhere, so it remains my personal preference. A lot of developers get past the seeming impropriety by using jQuery, which matches the technique to the browser version. As I said, it's not my place to upset a page that works and apparently validates. But you asked, and I'm a teacher by trade, so . . .
  7. It thinks you're passing a URL. If you want to execute code like that (a bit old-fashioned) write this: href="javascript: window.close();"
  8. Look in the paths I gave you. See if anything is there. If there is, change php.ini so the path has the correct value. If not, assume sendmail is not installed. If you have physical control over your server, install it. There are other email servers that might be installed, but I've never worked with anything but sendmail.
  9. You need to describe the problem more specifically. What steps have you taken to debug it? Are you using any of the developer tools built into your browser? Are you planting strategic alerts into the program flow to update you on variable values?
  10. It's a big project with lots of parts.
  11. This is about as simple as I can make it to show you the kind of things that must be done. Obviously you will adapt the technique to your application. <!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Hello</title><style type="text/css"> fieldset { display: none; }</style><script type="text/javascript"> function displayFieldset () { this.parentNode.getElementsByTagName("fieldset")[0].style.display = "block" } window.onload = function () { document.getElementById("edit0").onclick = displayFieldset; document.getElementById("edit1").onclick = displayFieldset; }</script></head><body><div> <input type="button" value="Edit" id="edit0"> <fieldset> <input type="text"> <input type="text"> <input type="text"> <input type="text"> </fieldset></div><div> <input type="button" value="Edit" id="edit1"> <fieldset> <input type="text"> <input type="text"> <input type="text"> <input type="text"> </fieldset></div></body></html>
  12. I was wrong. You want to find the sendmail_path. Execute the phpinfo() function. The output should have an item called sendmail_path. If not, PHP won't be able to find the sendmail program. Usual values are /usr/sbin/sendmail or /usr/lib/sendmail. Look in those places to see if sendmail is even installed. If it's not installed, find out how. (I don't know; it's normally there by default.) If it's installed, but the path is wrong or missing, change the path in php.ini
  13. Did you follow the link? It shows an example. If you don't understand, please ask a question. And remember, all I'm trying to do is find out if this is a better solution than iFrame. I don't know if it is. You could also explain here why you want an iFrame. Usually, it is to avoid pasting the same code over and over again. An include file would be a better solution to that.
  14. Sendmail is not on your server? Have you checked the include path?
  15. 1. How much JavaScript do you know? This is mostly a JavaScript project. Maybe AJAX if there's a lot of data involved. 2. Are you planning to hardcode the data into your document? Is it stored in a database? In an XML document? Doing as much preparation on your server before sending it to the browser could really speed things along. The data could even be stored in an easily editable "flat file," which would save you from having to update a lot of HTML every time you need to make a change.
  16. Before you try that, read this to see if using include files would work for you. In most situations, it is the better technique.
  17. You have 3 meta tags with an http-equiv attribute. This corresponds to an HTTP header. You are expected to pass the value of a recognized HTTP header. In your third one, you do. That's the Content-Type. In the first two, you don't. Maybe you originally copy/pasted that stuff from somewhere. Anyway, where the values are "description" or "keywords", change the attribute from http-equiv to name. That should fix it. The doctype thing is simple. XHTML follows the rules of XML. HTML doesn't have to. Those are the rules you were breaking. The C-Data fix dsonesuk pointed out would have handled it, but I realized you were basically conforming to HTML5 anyway, so it seemed simpler to move you to that.
  18. It's warning you that the message is not configured to be sent with a From: header. You can add headers as one of the parameters in the mail function, and I guess you can set a default value for that in php.ini. You should usually add a From: header, because spam filters often consider mail spam if it doesn't have one.
  19. Are you aware that the only reason your page fails to validate is because you are using an xhtml doctype? If you change the doctype to HTML5, this error disappears. <!DOCTYPE html><html>
  20. This is what spans were created for: <h1><span class="underline">Underlined heading</span> TEST</h1>
  21. As long as the link's background is the image, the link's text will be in front of the image somewhere. The easiest fix might be to put the text in a span, and use CSS to position the span relative to the link. <a id="btn1" class="button3" title="New Song" onclick="jwplayer(container).playlistNext();"><span class="caption">New</span></a> span.caption { position: relative; top: 68px;} You might have to tweak the top value.
  22. As Ingolme suggested, to make left or right coordinates work, you have to use some positioning mode other than the default mode. For some things this is necessary, but for a garden-variety page, it's best to position elements with margins and floats (if you need them). We're always fielding questions from people who use absolute positioning and suddenly discover their page is ruined if it loads into a display with a different resolution.
  23. I know what you want. I'm trying to help you do some of the work yourself.
  24. Use Notepad++ or some other editor with syntax highlighting. Load your document into Firefox and refresh the page every time you need to look at a change. It's a very efficient workflow.
  25. This example does something similar.
×
×
  • Create New...