Jump to content

Don E

Members
  • Posts

    996
  • Joined

  • Last visited

Everything posted by Don E

  1. Hey, yes that would prepend the current protocol. You're also right about about that not working if certain resources are only served over HTTP(with googleaspis, they server with HTTPS as well). One suggestion I read and probably the best is to simply upload all files that you need to your server. One problem with that is, depending on the library, it may be difficult to isolate what you specifically need so you don't have to upload unnecessary files etc that just take up space, etc.
  2. One thing you can do is, if you currently have hosting with a hosting company, for all your testing purposes for when you're developing a site etc, you can make a subdomain for that. So for example: testing.mysite.com. You would upload all the stuff you want to test to that subdomain and then link to that specific page when you need assistance, like: testing.mysite.com/testpage.php. You can develop/test the whole site in the subdomain if you want on your host server. It's good because that's how you know everything(your code, etc) is going to work on your host server when it comes time to officially publish/upload to the main domain(www.mysite.com). If you're on shared hosting, making a subdomain is pretty easy via cPanel. You can also do it from your house on your home server(your computer where you have WAMP/LAMP/XAMPP installed on; not all those 3, just listing which one you may have installed depending on your OS). The problem with this is, you would have to configure your home network so that we can publicly see the site. I wouldn't go this route because it opens your computer to the world and you never know "who" will be reading your posts when you ask for help and they may look at it as a 'chance' to try take advantage of your computer/server. So I'd go with the subdomain option.
  3. Fmdpa, I experimented a bit with SSL by getting a free one at the site you provided in your first post. I'm on a dedicated server so not sure how to configure for a shared host server but managed to set up the free SSL certificate from that site with no annoying pop ups warning the user they are about to enter using a unverified certificate. So far Chrome and Firefox have not given me that warning with the free certificate. It's only free for 90 days. Basically it gives you an idea of what it's like to have an actual verified certificate which it is but expires in 90 days. It allows you to experiment with it, etc, which is pretty cool because it was a good learning experience to set up SSL on the server if I ever decide to get one. (I have disabled it in the meantime.) One of the things I noticed though and can be a headache depending on how big your site is, if you have scripts(like jQuery, etc) that link to your web pages via http protocol, the browser will give a notice to the user usually in the form of a "shield" icon telling the user that the browser blocked some scripts. This is because the site is HTTPS and the scripts link to the pages via HTTP. All you basically have to do is go and change those HTTP to HTTPS but a problem with that is that some linked scripts can only be linked/accessed via HTTP and not HTTPS. Luckily most third party scripts, like jQuery etc are also served via HTTPS but the headache part is actually going through each of your pages and changing the links to HTTPS so you don't get the shield icon telling users scripts were blocked and basically losing some functionality to your webpages since those scripts are necessary for things to function properly. Good luck with whatever you decide upon.
  4. Just thought I'd also mention about self-assigned certificates is that every time a user attempts to access a page/site with self-assigned certificates, the browser will give the user a warning and that can be an annoyance to your users. The good thing is if the user knows it's all good to continue, they can select the option of not being warned again for that page/site(depending on the browser) but I guess the best way to not have that prompt appear at all is to get a certified certificate somewhere. I thought about it too but after doing some research on it, it's suggested only really if you're site is going to have sensitive info taking place like credit card transactions, etc. In your case, it's not a bad idea to get a certified certificate either but since you're not handing extremely sensitive info, I would go for those cheap ones like in the link you provided.
  5. Here's what I did and it worked for me. The page submits to it self instead of going to another page. This isnt necessary but I just did it that way so I did not have to make two files. <?php if(isset($_POST['submit'])){ if ($_FILES["file"]["error"][0] > 0) { echo "Error: " . $_FILES["file"]["error"][0] . "<br>"; } else { echo "No. files uploaded : ".count($_FILES['file']['name'])."<br>"; echo "Upload: " . $_FILES["file"]["name"][0] . "<br>"; echo "Type: " . $_FILES["file"]["type"][0] . "<br>"; echo "Size: " . ($_FILES["file"]["size"][0] / 1024) . " kB<br>"; echo "Stored in: " . $_FILES["file"]["tmp_name"][0]; }}?><!doctype html><html><head><meta charset="UTF-8"><title>mult upload</title></head><body><form action="multupload.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file[]" multiple><br> <input type="submit" name="submit" value="Submit"> </form></body></html> This is the result when selecting two images but since we're only viewing the [0], we get info just for that image stored at that array index:No. files uploaded : 2Upload: 700wbmwm3race.pngType: image/pngSize: 251.8955078125 kBStored in: /private/var/folders/f8/fswjbfl94cj77tbw053hcdb40000gn/T/phptyQ0jE
  6. When you select multiple files in the way you're doing it, the "name", "type", etc are arrays and those arrays indexes will contain the info you're looking for.By adding a [0] to the code below, you'll access the first index of that array: if ($_FILES["file"]["error"][0] > 0) { echo "Error: " . $_FILES["file"]["error"][0] . "<br>"; // this would check for error only for that first image selced } else { echo "No. files uploaded : ".count($_FILES['file']['name'])."<br>"; echo "Upload: " . $_FILES["file"]["name"][0] . "<br>"; // this selects the name of the first image selected echo "Type: " . $_FILES["file"]["type"][0] . "<br>";// this selects the type of the first image selected echo "Size: " . ($_FILES["file"]["size"][0] / 1024) . " kB<br>"; // this gets the size of the first image selected echo "Stored in: " . $_FILES["file"]["tmp_name"][0]; // // this gets the temp_name of the first image selected } If you do a print_r on $_FILES["file] like this: print_r($_FILES["file"]) and go look in the source code of the web page, you'll get a better idea of how the arrays look. Here's an example:Array( [name] => Array ( [0] => 400lomoupmi.png [1] => 400saraship.png ) [type] => Array ( [0] => image/png [1] => image/png ) [tmp_name] => Array ( [0] => /private/var/folders/f8/fswjbfl94cj77tbw053hcdb40000gn/T/phpnTzAq0 [1] => /private/var/folders/f8/fswjbfl94cj77tbw053hcdb40000gn/T/phpV97ABJ ) [error] => Array ( [0] => 0 [1] => 0 ) => Array ( [0] => 213597 [1] => 181958 )) I selected 2 images as you can see. You can use a foreach loop to loop through the arrays to get the values for each to display on the webpage.
  7. Try putting the + symbol and = symbol in quotes like: '+' '='. The reason why it may not work the way you're doing it is because the JavaScript parser is assuming you're trying to use those symbols for some kind of operation, like adding two numbers together using the plus symbol like 2+ 2 and the equal symbol to assign a value to a variable like var car = "BMW";
  8. newcoder1010, you can go to: http://cropthis.net to crop your image(s).
  9. Don E

    Footer

    Google "sticky footer"
  10. You're missing the for loop. var divs = document.getElementsByTagName('div');for(var i = 0; i < divs.length; i++){ if(divs[i].className == 'myclassname' ) { divs[i].style.display= 'block'; } else { divs[i].style.display= 'none'; }}
  11. Instead of the getElememtsByClassName, try getElementsByTagName('div') and in the for loop have something like: if(divs.className != 'myclassname' ) { divs.style.display= 'none'; }
  12. If you use getElementsByClassName("myclassname"), I believe it will only get the elements that have the class name of "myclassname," therefore need to worry about about other divs that don't have a classname of "myclassname" will be displayed?
  13. Don E

    HTML

    After trying it myself and messing with the TextEdit settings, I cannot get it going either. Probably best to use another text editor altogether like SublimeText, TextWranlger etc as mentioned by Deirdre's Dad in the second link davej posted.
  14. Hello ConcernedStudent, From my understanding, the actual developers/designers/peoples' of w3schools.com rarely come on the forums. Maybe they do from time to time but not likely. Best to contact them directly and one possible way is via this link: http://www.w3schools.com/about/about_advert.aspThe link is for advertising on their site but it also mentions "Other Questions" can be asked as well. Hopefully that is a way for you to get in touch with them. Good luck! Edit: After looking around a bit more, I found they have an address you can email at: support@w3schools.com
  15. Don E

    HTML

    When saving in TextEdit, are you selecting .html from the File Format drop down menu in the Save dialog window?
  16. Don E

    HTML

    Are you using a web browser to "run" the .html file?
  17. Ford = Found On Road Dead (just messing; my other car is a Ford.)
  18. Does $_SESSION['clientid'] contain a value? Also try removing the space at the end of the query, like: $client_table = mysql_query("SELECT * FROM clients WHERE client_id = ". $_SESSION['clientid']);
  19. Make sure you have session_start() in the required pages and also make sure $_SESSION['clientid'] have values. Also for SQL query, you don't need single quotes for selecting the table. Example: "SELECT * FROM clients ...."
  20. It may have to be something else for it to work properly. OR It may be because of what's discussed at this link: http://www.designchemical.com/blog/index.php/faq/i-get-the-error-message-dcmegamenu-is-not-a-function/When the page loads, if you look in the error console, you'll see: TypeError: $(...).dcMegaMenu is not a function and it may be because of what's mentioned in the above link. Hopefully this was helpful.
  21. Hadien, Tested the isLastWeekInMonth function, seems to work. The only thing I had to change was the split function. It is deprecated. Instead used the explode function to split the string.
  22. I'm not sure how reliable the below code is but I guess it's one way of doing it. Since there are basically 4 weeks in a month and a total of 52 weeks in a year, just take every fourth week, see if it's the current week and if so, that is your last week in a month. $islastWeek = false; $weeks = array(4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52); foreach($weeks as $lastWeekInMonth) { if(date('W') == $lastWeekInMonth) // date('W') current number of the week { $islastWeek = true; } } if($islastWeek) { echo 'Yes, last week in month'; } else { echo 'No, not last week in month'; }
  23. guradio, you responded to a post that was made in 2006.
  24. One way would be using JavaScript. When the page loads, you can use JavaScript to get the height of the longest div and then apply that height to the empty div.
×
×
  • Create New...