Jump to content

Shinori

Members
  • Content Count

    29
  • Joined

  • Last visited

Everything posted by Shinori

  1. Im running it on a webserver. Plesk to be precise. I tried it cross-browser and it didnt change it either 😕
  2. Didn't change anything. The cookie still hasn't been deleted. Here it is: function getCookie(cname) { var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie); var ca = decodedCookie.split(';'); for(var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(name) == 0) { return c.substring(name.length, c.length); } } return ""; }
  3. Negative. The cookie is exactly the same after trying to delete it 😕
  4. Dear forumusers, I'm currently having trouble with deleting my browsercookies. Specifically speaking im trying to delete the cookies of the website the user is currently on. Here are my JS functions + the proof for existing cookies. function setCookie(cname, cvalue, days) { var dt, expires; dt = new Date(); dt.setTime(dt.getTime()+(days*24*60*60*1000)); expires = "; expires="+dt.toGMTString(); document.cookie = cname+"="+cvalue+expires+';'; } function delCookie(name) { document.cookie = name + '= ; expires = Thu, 01 Jan 1970 00:00:00 GMT'; } function logout() { var
  5. No. Simply using it on usual html elements. 😕
  6. I'm using Plesk shared services. Uploading the file via SFTP to the Webservers directory. Accessing the page via HTTPS
  7. I reinstalled firefox. Still no change 😕 Any ideas ?
  8. Hey, having trouble with creating cookies in firefox. I've tested it in chrome and edge and it seems to be working fine. But on firefox (Quantum 66.0 (64-Bit)) the cookies is not being created and i don't know why. Do you habe any ideas why it's not working? I've read sth about "secure cookies in firefox". Thanks in advance :) Im actually using W3s setCookie piece of code: function setCookie(name,value,days) { var expires = ""; if (days) { var date = new Date(); date.setTime(date.getTime() + (days*24*60*60*1000)); expires = "; expi
  9. Could I establish a SSH connection via PHP and create a new user on my Debian 9 system which only has access and permission to specific directories? I'd probably have to establish a new ssh connection each time i try to reach any data, would I ?
  10. Wouldn't it be possible to "try'n'catch" a piece of code to temporarely use chmod and the file / directory just to show the content of the file? I tried it but it didnt seem to work. Not sure if its my code or a generel problem. 🤔 Greetings
  11. What exactly is a custom webserver module? Sorry im not teh best in terms of configuring optional software for webservers 😕
  12. Hello, I'm trying to develop my own cloud storage system. Currently having trouble with permissions of certain files. I need a specific client to have access to file located in user specific directory such as "/cloud/files/members/N10000/". But I dont want the file to be accessable via url or by any other client. The file could be an png, txt, mp4, etc. No I dont want to use an opne source cloud software. I want to create my own one. Is this possible with PHP. Do I need further software? Using Debian 9 and PLESK 17.8 Thanks in advance.
  13. Well... Thank you very much Guess my brain was a little sleepy when i wrote that piece of code
  14. Hello potential helpers, im currently having issues with firing an ajax request inside of another ajax request. Heres my code: Im not getting "alert(content)" Condition if(shop[1] == "gserver") and if(name.includes(shopname) == true) are definetly true. The function is correctly called as well. No Im not using jquery for reasons. Anyone has an idea why the 2nd requests isnt fired? Is it not waiting for the first one to finish? function initiate_shop_game(shopname) { var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function()
  15. function create_shop_part(1,"/test/images/csgo.jpg",0.006,1,2,20,1,0.067,512,512,4096,512); } } function create_shop_part(1,imgsrc,input1name,input1step,input1min,input1max,input1value,input2name,input2step,input2min,input2max,input2value) { Error msg: Uncaught SyntaxError: Unexpected number Browser: Chrome latest Any idea whats going wrong here ?
  16. Ah. now it makes sense to me. Thank your very much dsonesuk
  17. Dear potential helpers, I try to darken the foreground of my website using a background-color. I created a div which wraps all my other HTML stuff, applied position: relative; to it and a very great z-Index of 999. All my other elements have a z-index of 100 or lower. Why isn't my div not shown in front of the other stuff? In case the background-color of my div foreground is only shown behind all the other elements inside it. Here is my HTML: <html> <body> <div id="foreground"> <!-- All my other HTML stuff having relative positi
  18. Harrow fellow campaigners, no idea what is going wrong here. Maybe anybody has a solution: Assume $logged_in being true. check_account_status() not firing. Also tried to change the attribute to onclick, onmousedown etc. The HTML (.php): <div id="wrapper-secondnav" class=""> <ul id="secondnav"> <li><a target="_blank" href="">Stuff</a></li> <li><a href="">Things</a></li> <li><a target="_blank" href="">Somestuff</a></li> <li><a href="">Anything</a></li>
  19. NVM. Anti-Virus-Software blocking cookies in chrome for my website... Thanks for the help!
  20. function createCookie(name,value,days) { var expires = ""; if (days) { var date = new Date(); date.setTime(date.getTime() + (days*24*60*60*1000)); expires = "; expires=" + date.toUTCString(); } document.cookie = name + "=" + escape(value) + expires + "; path=/"; } function user_login() { var uname = document.getElementById('input-loginname-homepage').value; var psw = document.getElementById('input-loginpassword-homepage').value; var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.s
  21. Well I replied those if-conditions. Still no change. In my original code im checking if string is empty before posting http data to another site via AJAX. Could AJAX cause problems? See code above. Thanks for your patience and endruance! :-)
  22. I'm sorry. Meant to say the following: "If input (id="vname) is empty i only get a green 'foo'" I want to check if the string in input is empty if so print success else print errormsg. Checking for empty string isnt't working. vname.isEmpty() vname === '' vname.length === 0 vname === null and reversed operators do not work. This is the entire code. I'm trying to use it with AJAX (without jquery): nname, email, bday and msg could also be empty. But its not even working with vname. <script> function send_mail() {
  23. Dear W3schools community, I want to check if a required input is empty (has more then 0 characters). You guys have any idea what I'm doing wrong? Thanks in advance! If there is no character in input (id="vname") I still get a red "bar" Here's my code: function foobar() { var vname = document.getElementById('vname').value; if (vname.length > 0 && vname != '' && vname != null) { document.getElementById('contact-response').style.color = 'green'; document.getElementById('contact-response').innerHTML = "foo"; } else { docum
  24. Eventually the time between creating and XMLhttpRequest and getting something back was the reason that class hasnt been changed correctly. Not even sure why i wrote it into the readystate-condition Thanks anyways. You must be irritated by such newbies like me
×
×
  • Create New...