Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. What are all those " and &quote; doing in your code?
  2. You would have to find a web service that provides the information to you. If it allows cross-origin requests AJAX alone can do it, if it doesn't then you'll need to have a server-side script request the data instead.
  3. You want them in the order A C B? That's impossible with CSS. You would need Javascript to change the DOM to move B further ahead in the document from C.
  4. Ingolme

    best editor ?

    I cannot actually say any one editor is the best. People just get used to one they like. I use Notepad++ because I'm used to it. There's an interesting one called Brackets. It's better at auto-indenting that Notepad++ and can have extensions installed. SublimeText is pretty popular because of its ability to have multiple cursors at once. It not free and costs $70 but you can use a free version that reminds you to buy it every once in a while. Github has its own editor called Atom, similar to SublimeText. It's designed to not need to use the mouse, everything can be done with keyboard shortcuts. Like Brackets and SublimeText you can choose create a project to quickly switch between files, a feature Notepad++ doesn't have out of the box.
  5. You have to adapt your HTML to make the layout work. <div class="row"> <div class="col-md-8">A</div> <div class="col-md-4">B</div></div><div class="row"> <div class="col-md-12">C</div></div>
  6. The grid system makes it really easy to make the layout you're proposing.
  7. Have you read the documentation at http://getbootstrap.com/ ?
  8. I'm not all that familiar with XQuery. I assumed each new expression needed a new pair of braces.
  9. Perhaps using + as both the addition operator and concatenation operator was a bad design choice. AngularJS doesn't allow functions inside expressions, but I did a bit of research and you can use a multiplication to cast the values to a number <div id="price">{{size*1 + cheese*1 + sausage*1}} </div> I tried this, but I found that if the checkboxes weren't selected their values were being interpreted as NaN, so I added a small expression to make sure that if it wasn't a number it would evaluate to zero. Here's the end result which appears to work for all cases. I added the "currency" filter so that the number would always have two decimal digits. <div id="price">{{(size*1 || 0) + (cheese*1 || 0) + (sausage*1 || 0) | currency}}</div>
  10. That's because your database field only accepts integers, you can't pass a string with a comma in it because it will truncate it. No matter what solution you want to try, you're going to need to change your database table structure.
  11. Is this .NET or ASP? Plain Javascript doesn't have a global Response object. In plain Javascript you would open a new window with window.open().
  12. Ingolme

    Slideshow text

    The <= operator on this line is one problem: for (var captionindex = 0; captionindex <= manydogs.length; captionindex++) { It should just be <.
  13. If there's more than one author then another query is needed: for $x in doc("books.xml")/bookstore/bookreturn { for $y in $x/author return <name>{data($y)}</name>}
  14. That's not how assignment works. Every time you write $period = something you're overwriting anything it might have contained before. There are multiple possible solutions for the database One solution, which would allow for searches, would be to have a separate database table that associates each item with a value "short" or "long". If it has both values then there will be two rows in the table, one row associating it with "short" and the other row associating it with "long" Another option would be to have a third value "both" and store that in the table when both of them are selected. The third option would be to have PHP implode the array of values so that it would show up in the database table as a string with values separated by commas
  15. A database column can only store one value. What do you want it to do when both checkboxes are selected? What do you want to see in the database field?
  16. You've misspelled "length" which is going to make your HTML not work right. Your code is open to hacking by SQL injection. This block of code has multiple problems: $period=array();$period=$_POST['period'] ;foreach($period as $value3) { $period=$value3 ; } For one, there's no point in setting $period to an array when you're overwriting it in the next line. Your foreach loop is going to end up with $period not being an array and only containing the very last value. Modifying the value right in the loop will probably cause the loop to end early, since $period is no longer an array. Something like this is probably closer to what you were looking for: $period = array();foreach($_POST['period'] as $value3) { $period[] = $value3;} Now you have another problem: $period is an array, you can't just pass that to the query, because all that would be stored is the string "Array". I don't actually know what exactly you're trying to store in the database. You only have one database field for period, but you have multiple different values that can be selected for it at the same time by using checkboxes. Were you actually intending to use radio buttons?
  17. You probably should go through the Javascript tutorial at W3Schools. Arrays, loops and assignments are the most basic concepts of programming. The reason only the last element is showing up is because each time you assign something to the innerHTML property you're overwriting what was there before.
  18. A basic Response.write("Hello World") like davej showed you cannot possibly fail.
  19. If the examples aren't working then the problem is with your server's configuration.
  20. http_build_query() does not do what you want. All you need to do is append the value to the URL: $url = "http://www.test2.com/directory/". $_GET['city']; I asked what you're planning to do with the variable $url, because from this point on I have no idea what you want.
  21. The file http://stormsearchers.net76.net/images/footer1.jpg still does not exist. In your CSS, you have declared background-image twice, only the second one will work because it overrides the first one. Here's how to use multiple background images: http://www.css3.info/preview/multiple-backgrounds/ One problem here is that your footer is only 100px tall and you have an <img> element that's 146px tall, so the background does not reach the same height as the image. You can remove the height from your footer so that it has the same height as the image it contains. The background-attachment property in your CSS is also causing alignment problems, remove that as well.
  22. PHP will not work if the file does not have a .php extension.
  23. If the file is saved with a .php extension then the PHP will be parsed and executed. When trying to validate the page, don't copy and paste the code, give the URL of the page to the validator.
  24. The PHP needs to be parsed on a server that supports PHP. The code that arrives to the browser will not have <?php ?> tags in it.
  25. Fix the validation errors on your page: http://validator.w3.org/check?uri=http%3A%2F%2Fstormsearchers.net76.net%2F&charset=%28detect+automatically%29&doctype=Inline&group=0 Now footer.jpg is loading, but footer1.jpg still does not exist. I'm not sure what you mean by align the images. You can set the vertical-align of the images to top, middle or bottom depending on what's needed.
×
×
  • Create New...