Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. Ingolme

    More curly braces?

    That's not proper CSS syntax, as far as I can tell. The validator displays errors even when testing CSS level 3.
  2. What language are you using to make this? PHP or Javascript? Javascript has split(), PHP has explode(). Simply using parseFloat() won't solve the problem, you need to do each and every one of the steps I told you.
  3. Javascript cannot password protect a site. You need a server-side language like PHP, ASP.NET or Java. There's also .htaccess password protection methods, though you can only have a limited number of "accounts" with that.
  4. You've constructed the query on this line: $sql="INSERT INTO orders(cufrist_name,culast_name,phone,mobile,address,email,product_cod,product_namee,product_bod,gheymatevahed,etebaregheymat,mizanesefaresh,tedadehaml,payment,tarikhsefaresh,color) VALUES ('".$cufrist_name."','".$culast_name."','".$phone. "','".$mobile."','".$address."', '".$email."','".$product_cod."','".$product_name."','".$product_bod."','".$gheymatevahed."','".$etebaregheymat."','".$mizanesefaresh ."',,'".$tedadehaml."','".$payment."','".$tarikhsefaresh."','".$color."')"; But you haven't actually queried the database. You need to use mysql_query() to execute the query.
  5. I already pointed out an algorithm that could convert the coordinates for you. All you need to do is wrap it in a function. It can be done in PHP as well, just change split() for explode() and parseFloat() with floatval().
  6. I don't know what you're asking for, can you point out something specific you need help with?
  7. Something must be wrong in your code. Go checking the data line by line to see what is happening to it. We could help with the process if we could see some of the code.
  8. Ingolme

    New Box model

    Outline has always been around if I remember correctly, it doesn't add anything to the box, neither outside or inside, it just overlays what's around it, I think. Internet Explorer didn't support this property back then so people didn't use it. The outline property doesn't interfere with the box model, it won't change its size or reposition it. Try this example and set the outline as thick as you want, it won't change the box's size or position like border or margins would. http://www.w3schools.com/css/tryit.asp?filename=trycss_outline
  9. You haven't defined EventSource() in this line: var source=new EventSource("demo_sse.php");
  10. There are two ways to center something vertically. The first one is to set the position to "absolute", set the top property to 50%, set the left property to 50% and then give a negative left margin of half the width of the box and a negative top margin of half the height of the box. This method requires the box to have a set width and height. Example: .box { width: 500px; height: 400px; position: absolute; left: 50%; top: 50%; ; margin-top: -200px;} The second example might not work in older versions of Internet Explorer, I might be remembering it incorrectly. Display the parent of the box as a table cell and set its vertical-align to middle. .parent { display: table-cell; height: 100%; vertical-align: middle;}
  11. You can make the gradient the background of a box and create two boxes with white borders and position them to the bottom left and bottom right to cover up the part of the gradient you don't want to see. Here's an example of a CSS triangle: div {width: 0;height: 0;border: 50px solid;border-color: transparent red red transparent;} <div></div>
  12. The message sounds like it doesn't want a <simpleType> element inside the <schema> element. The code looks correct to me, besides missing a cosing </schema> tag, though you probably have that after the rest of the code. Make a copy of your document and remove everything but the first <simpleType> element to see if it still complains.
  13. I would disagree that experienced Javascript developers don't understand Javascript's scope and execution contexts, but this may be helpful to some of the beginners, as W3Schools doesn't make it entirely clear.
  14. I assume 05.16 and 21.88 represent minutes. Each minute is 1/60th of a degree. I'll put this in steps to make it easier to understand. 1. First you need to separate the string into three pieces. Javascript's split() function will do that. Your data is now an array, so treat it like one, each piece will have an identifier [0], [1] or [2] 2. Use parseFloat() to turn the first two pieces into numbers. 3. Since each minute is 1/60th of a degree, we multiply it by 1/60th, or what's the same: divide by 60. 4. Now we can add the result to the degrees, which was the first part of the string. 5. Finally, we just need a few if() statements to check whether the value should be positive ("N" or "E") or negative ("S" or "W"). Just multiply the result by -1 if the third part of the string is "S" or "W" I hope you're able to turn this into code.
  15. Personally, I would set a min-width to the topmost container of the page. This will prevent things from vertically stacking when they shouldn't. Make the min-width as wide as the actual page content. There also seems to be a problem on your page that when the screen is too small, some of the header content is out of view, setting min-width would also fix that.
  16. I think something's missing in your post, but I assume what you mean is that you want to be able to have images and other content in the popup box. The alert() function can't do that, it's just for text. What most developers do is create an HTML element and use CSS to place it in front of the page to make it look like a dialog box. It's a bit more complex so you need a moderate level of Javascript knowledge. Since this is so common there are probably libraries built that do this for you already. I don't know any particular one, maybe jQuery has one implemented. Searching for "modal dialog javascript" on a search engine will probably find some of them.
  17. Do you know if PHP is running at all? Try making PHP print something to see if it works.
  18. Which tutorial are you having trouble with? Javascript, PHP or ASP?
  19. This looks like a hack to me. Conditional comments, I believe, are more reliable.As written in the article:
  20. On the forum HTML isn't parsed.<html> On your website, the only HTML solution is to substitute the characters with entities < >. If you don't want to do it manually you'll have to automate the process with PHP.
  21. In the place of "this" you need to put a reference to the element you're trying to access. Unless I can see some of the code I can't say much more.
  22. A server-side language, such as PHP, is the best way. HTML doesn't do anything on its own.
  23. They gave you an image, you have to try to code an HTML page and use CSS to make it look like the image. Photoshop won't do this for you. The only thing you need photoshop is to cut out some pieces of the image to use as background for some HTML elements. Start off with the basics and go building up the page. <!DOCTYPE html><html> <head> <title></title> </head> <body> </body></html>
  24. If you intend to use HTML 5 elements and attributes you have to use the HTML 5 doctype. They go together. HTML 5 is going to continue being a draft until around 2020, but the W3C and the WHATWG told developers to start using it already.
  25. Xpath and SQL are not related to eachother in any way.
×
×
  • Create New...