Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Leonvv

Privileged
  • Joined

  • Last visited

  1.    Willows reacted to a post in a topic: toggle div style problem.
  2. I just stumbled upon this. Apparently since HTML5 you can actually put block level elements inside <a> tags.
  3. Good luck learning, if you have any questions you can send me a pm in dutch. Léon
  4. Hello Jochemke, repeating block of code is usually bad practice. I would suggest to use an array with options and some loops. This way it will be easier later on to edit your code. To add the fading effect you could use a library like jQuery (checkout .fadeOut() and .fadeIn()). Just put lettre, bigtext and smalltext inside a container and fade its opacity. Here is some code to get you started... var elements = [ document.getElementById("lettre"), document.getElementById("bigtext"), document.getElementById("smalltext") ]; var textOptions = [ // The first element is used as an index for "elements". // For example 0 refers to elements[0], thus "lettre". [0, "D", "T", "G", "C"] ]; var styleOptions = [ [0, "color", "#966EA1", "#759DA0", "#976866", "#9CBA89"], [0, "left", "500px", "100px", "370px", "100px"] // Add as much properties as you like. ]; var teller = 0; var interval = setInterval(function(){ // $("container").fadeOut(); // Reset "teller" if needed. if(teller == (textOptions[0].length - 1) ) teller = 0; // Loop through "textOptions". for(var i = 0; i < textOptions.length; i++){ // Get the correct element from "elements". var currentElement = elements[textOptions[i][0]] // Change its innerHTML. currentElement.innerHTML = textOptions[i][teller + 1]; } // Loop through "styleOptions". for(var j = 0; j < styleOptions.length; j++){ var cs = styleOptions[j]; var currentElement = elements[cs[0]] // Change its style. currentElement.style[cs[1]] = cs[teller + 2]; } teller++; // $("container").fadeIn(); }, 2000); Léon
  5. Leonvv replied to mrludable's topic in Frontend
    Hello mrludable, I wrote a very simple image pop up script to deal with this some time ago. The code is actually pretty messed up and I should rewrite it anytime soon. You can check it out anyway. Léon
  6.    Mr Ben reacted to a post in a topic: Can someone identify this?
  7.    Precise Estimating Ltd reacted to a post in a topic: Can someone identify this?
  8. It is just a simple height animation. The element containing the links has a height of 0, when the link is clicked it animates to a bigger height. Léon
  9.    Leonvv reacted to a post in a topic: Help with Php Signup Form!?
  10.    Lee_K reacted to a post in a topic: Regex help!
  11. Leonvv replied to Lee_K's topic in Server Side
    You could try to concatenate them, so they become one string: <?php preg_match_all('', $row['name'] . $row['secondname'], $matches); Notice the dot between the variables. Léon
  12. Do you have any whitespace before the <? part ? Léon
  13.    Leonvv reacted to a post in a topic: CSS effect multiple classes
  14. HTML5 comes with a native date-picker. However it is not fully supported yet by all browsers. Léon
  15. Hello Stallman3738, I can remember I had this same issue, if I remember it correctly it was caused by whitespace. } ?> <!-- Here is whitespace. --> <?php if (isset($_POST['password'])) The white space between your php code is handled as output. You could try this: <?php // Make sure there is no whitespace before your opening tag. @session_start(); $class="loginTextbox"; if ($_SESSION['url']!="/amlak/index.php") { header("location:index.php"); exit (); } // Code merged. if (isset($_POST['password'])) { require_once './views/database/systemComponent.php'; require_once './views/database/dbConnector.php'; $dbConnectorObject =new dbConnector(); $sentPassword = $_POST['password']; $select = "SELECT * FROM password"; $result = mysql_query($select)or die(mysql_error()); while($rows=mysql_fetch_array($result)) { $currentFirstPassword = $rows['password1']; $currentSecondPassword = $rows['password2']; } if(md5($sentPassword)==$currentFirstPassword) { $_SESSION['login']=true; header("location:add.php"); exit(); } else{ $class="failedloginTextbox"; } } ?> Hope it helps, Léon
  16. No problem, good luck with your project ! Léon
  17. What are you trying to achieve Jimmymustang ? Maybe you should make a new thread. Léon
  18.    mantis reacted to a post in a topic: Simple Syntax question
  19. I hope that this does what you want: <?php $prefix = ""; $numberArray = ["zero", "one", "two", "three", "four", "five", "six", "seven"]; $someArray = array( 'label' => 'Select Home Score', 'desc' => 'Select home score', 'id' => $prefix . 'homescore-select', 'type' => 'select', 'options' => call_user_func(function(){ global $numberArray; $optionsArray = array(); // Loop through $numberArray. for($i = 0; $i < count($numberArray); $i++){ $optionsArray[$numberArray[$i]] = array( "label" => $i, "value" => $i ); } return $optionsArray; }) ); ?> If you want more options you can just extend $numberArray. Léon
  20. Hey Mantis, not 100% sure what you're trying to achieve, but by looking at your code I think this is what you are looking for: <?php $prefix = ""; $someArray = array( 'label' => 'Select Home Score', 'desc' => 'Select home score', 'id' => $prefix . 'homescore-select', 'type' => 'select', 'options' => call_user_func(function(){ $optionsArray = array(); for($i = 0; $i <= 20; $i++){ $optionsArray[] = array($i); } return $optionsArray; }) ); ?> This script simply sets "options" to an array, which contains 20 other arrays containing a number from 0 to 20. You also need a PHP version of 5.3 or higher I believe. Léon
  21. Glad it helped
  22.    Row reacted to a post in a topic: Check if image field is empty
  23. If the content is the only thing that changes, you can do it the other way around: just have one page and make the content dynamic by fetching it from text files or a database. But probably the two answers above me are the ones you are looking for. Léon

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.