Jump to content

All Activity

This stream auto-updates     

  1. Yesterday
  2. W3.CSS Layout - borders doubling up between rows

    Thanks @dsonesuk for that. Interestingly, that works perfectly in the codepen, but doesn't work in my full page full of messy code. (But that's my problem to look at!) I also found another solution using box-shadow, with fewer lines of CSS... .w3-cell-row { margin: auto; width: 78%; } .w3-cell { background-color: #fff; box-shadow: 0px 0px 0px 5px #00c; } .w3-cell-row:before, .w3-cell-row:after { content: none; } https://jsbin.com/kemizek/edit?html,output But because it's a shadow the left-hand cell is slightly different in size from the right-hand cell, and that bothered me once I'd spotted it. (The % width also means it doesn't track the size of the table either.)
  3. How can I put blur on the image?

    No! the opposite, with a image (img) element within a div, the height of the div is determined by the height of image,. By removing img element and using background image for div, there is nothing to give it height, so it will collapse to zero height, meaning the background-image will not show because the height is zero, given the div a height means the image is able to show itself. You either need a div to have background image and a child element OR content: property using : after or :before to have background colour or vice versa, with whatever has background image using filter: blur() and maybe opacity.
  4. How can I put blur on the image?

    Sorry, I am not able to follow you. My requirement is to have background image of test class then blur the image with a color. Are you asking me to set test class to no height, no bg color, etc. But I do need the bg image.
  5. How to upload website to server

    That would be the company that you register with to host your website, by searching all web site hosting companies on the web that have the required services you require.
  6. How to upload website to server

    howto find my host sir
  7. How can I put blur on the image?

    What css styling does the img element have, that the div using background image instead does not! Now think about it, also div with no dimensions means height 0, no height, no background image to see.
  8. Last week
  9. Manipulating the $.ajax( ) data Parameter

    Yes, it turns out that the value of the podType variable was still available within the success function. Placing quotations marks around the switch options was also very important. Have a great weekend! Tell nest tea Roddy
  10. Manipulating the $.ajax( ) data Parameter

    According to the documentation for the ajax method, beforeSend is called before the request is even sent. The 2 parameters that the function gets passed are the jQuery XHR object, and the settings object. So in your code, podType is set to the jQuery XHR object. The beforeSend function is really for modifying the request before it goes out (or canceling it), so I would think your code for changing the page should all go in the success function. Inside that success function podType will still have the value it had when you send the request, unless you change the value inside the function. You also need to quote all of those values in your case statements, otherwise you're trying to compare the value with different variables.
  11. BACKGROUND: I have successfully integrated both pagination and the simplePagination paginator into my website. Now I must fine tune the integration so as to overcome several associated non-optimal conditions. In order to achieve it appears that I need to understand better the use of the variables and functions utilized with the AJAX request. Please consider the following pieces of code and answer the questions below. The JAVASCRIPT: .click(function() { $.ajax({ url: '_utilities/php/ajax_data_dscr.php', dataType: 'JSON', data: { 'podType': podType }, statusCode: { 404: function() { alert( "Page not found" ); }}, success: function (jsonData){ console.log(jsonData) $('#main').html(''); $.each(jsonData, function(key, object){ $('#main').append("<div class='paginate'><div class='item_info podcast_item'><div class='pod_num'>" + object.podcast_no_item + "</div><div class='pod_title'>" + object.item_title + "<br />" + object.item_pubdate + "</div></div><div class='pod_describe'>" + object.item_description + "</div></div>"); }); var collection = $(".paginate"); var collNum = collection.length; var perPage = 10; collection.slice(perPage).hide(); $("#pagn").pagination({ items: collNum, itemsOnPage: perPage, cssStyle: "light-theme", onPageClick: function(pageNum) { var start = perPage * (pageNum - 1); var end = start + perPage; // console.log(event); // console.log(pageNum); collection.hide().slice(start, end).show(); } }); } The HTML: <div id='main'>...</div><!-- end div#main --> <div id='pagn'>&nbsp;</div><!-- end div#pagn --> BACKGROUND: From the above code you can probably notice that the #main DIV is emptied before it is dynamically filled via jQuery's .append() method. The heading of the newly filled #main DIV should vary with the kind of information that is entered. To this end I created the following switch. Unfortunately, however, I cannot get it to work. Either the value of the podType variable is not being read, or the code itself has not been properly set into the AJAX routine. The following is an example of one of my attempts. beforeSend: function(podType) { $('#main').html(''); switch (podType) { case clausal: $('#main').html('<h1>Clausal Analysis</h1>'); break; case linear: $('#main').html('<h1>Linear Analysis</h1>'); break; case inversion: $('#main').html('<h1>Socratic Inversion</h1>'); break; case chrono: $('#main').html('<h1>All Categories</h1>'); break; } } QUESTION ONE: How do I access the key-value pair entered as the value of the data property? QUESTION TWO: How would you go about insuring that a new list heading is entered with each different value of podType. NOTE: You can visit the page by clicking on the words PROXY LINK at the bottom of http://www.grammarcaptive.com/sender_proxy.php In the navigation bar on the page that opens find the word Chronology, click on it, and then click on the phrase Podcast index ... This will show you a successful implementation of simplePagination and provide you with a visual understanding of what I am able and not able to achieve. Roddy
  12. How can I put blur on the image?

    <div class="test"> <img src="test.png"></div> .test { background-color: red; } img { opacity: .5; filter: blur(3px); } Above works. Problem starts when I have background image for a div class. Then blurring the image does not work. .test { background-image: url("/sites/default/files/FortuneTeam-bg.png"); background-color: red;}
  13. How can I put blur on the image?

    What image in div, div with background-color, image with opacity and blur? how difficult can that be?
  14. How can I put blur on the image?

    This is a complicated answer. Would that possible if you could provide html with css? Thanks.
  15. How can I put blur on the image?

    What if you place image in div, give div background color/s (gradient), then use opacity and blur for image.
  16. How can I put blur on the image?

    Hi, I have an image. I am trying to apply blur feature on the image. Blur color can be anything. I also should be able to apply percentage of the color(brightness/contrast/etc.). I checked out the page but did not see anything with color. How can I do it? https://www.w3schools.com/cssref/tryit.asp?filename=trycss3_filter_all Thanks
  17. im struggling bad here please help

    The reason why your code isn't working is because $con is not defined in those functions (and $pass and $conf_pass are not defined in newUser either). You can use global variables inside the function, but it's better to avoid globals and pass in any variables you want the functions to use. So you should pass $con to the functions. You should add this to the top of your code: ini_set('display_errors', 1); error_reporting(E_ALL); You should switch your database code to use prepared statements instead of trying to manually escape everything. Prepared statements offer better security. You can use prepared statements with mysqli, but it's better to use PDO. The PDO code is shorter and easier to understand, and PDO works with databases other than only MySQL. e.g.: $stmt = $pdo->prepare("SELECT * FROM users WHERE username = ?"); if ($stmt->execute(array($username))) { if ($row = $stmt->fetch()) { // it found a user } } http://php.net/manual/en/book.pdo.php For the code I posted above, I was saying that each function should only do one thing. Your newUser function should only validate and add the user if necessary, it should not also output anything or redirect. Your main code should do that based on what the function returned. If you want to return multiple values you can use an array like I did above to return a "success" value for whether the user was added, and a message to show them. So your main code would call that function and then decide what to do. Those header redirects wouldn't work though, because you sent output to the browser first. $result = newUser(...); if ($result['success']) { // maybe redirect to a thank-you page or something } else { // show the error in $result['message'] }
  18. im struggling bad here please help

    The forum completely wiped out my reply when I tried to edit my post, because the forum software is awesome. I'll try that again.
  19. im struggling bad here please help

    function newUser ($username, $password){ $return = ['success' => false, 'message' => '']; if (!isExist($username)) { if (passChk($pass, $conf_pass)){ // insert into the database here $return['message'] = 'Username Created successfully'; $return['success'] = true; } else { $return['message'] = "Password and confirmed password do not match"; } } else { $return['message'] = 'Username already exists'; } return $return; }
  20. Update The PHP Tutorial To Use PHP 7 And It's Features
  21. Looking for Direction

    I don't understand why you would chat to someone with this posters username, if you had a problem with mine? much worse.
  22. Looking for Direction

    Attention: THRobinson: Since you have an account on this web page, you might want to click on the "HTML Layout" link in the left-hand column. Keep in touch. Sincerely in Christ, Russell E. Willis P.S. - Please read Proverbs 23:23.
  23. im struggling bad here please help

    Hi. ive been struggling for 2 hours over this and i just cannot understand whats wrong here. im trying to create a signup.php where there is a form in the index. with post method, and the inputs are username, password and confirmed password. in the php file i some functions (like isExist($username) which return true if someone wanna sign up with a username that already exist..) im embedding the code here: <?php //First define some functions.. function isExist ($username){//Return TRUE if name already exist in users table $query = "SELECT * FROM users WHERE username = $username"; $result = mysqli_query($con, $query) or die ('Cannot use SELECT query'); return (mysqli_num_rows($result) != 0);//Since username can be only 1 per name, any number !=0 means 1 actually.. } function passChk($password, $conf_pass){//Return TRUE if pass and confirmed pass match return ($password == $conf_pass); } function newUser ($username, $password){//Add a new user .. duh ;p if (!isExist($username)) { if (passChk($pass, $conf_pass)){ $query = "INSERT INTO 'users' (username, password, id) VALUES ('$username', '$password')"; mysqli_query($con, $query) or die ("Cannot INSERT into Database"); echo 'Username Created successfully'; } else {echo '<script>alert ("Password and confirmed password do not match")</script>'; header("Location: http://www.sweiss.co.il/sfn/index.html"); } } else { echo '<script>alert ("Username already exist!")</script>'; header("Location: http://www.sweiss.co.il/sfn/index.html"); } mysqli_close($con); } //Code start require_once('connectvars.php'); $con = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME) or die ('Cannot create connection to Database'); mysqli_set_charset($con, "utf8") or die ('Could not set utf-8');//Will allow us to use hebrew $username = mysqli_real_escape_string($con, trim($_POST['username']));//Defence vs sql injection $password = mysqli_real_escape_string($con, trim($_POST['password'])); $conf_pass = mysqli_real_escape_string($con, trim($_POST['conf_pass'])); newUser ($username, $password); ?> i keep getting the error from the first function isExist.. cannot use SELECT query. plase any help would be much appriciated
  24. W3.CSS Layout - borders doubling up between rows

    .w3-cell-row { margin: auto; margin-top: 0; width: 79%; border-collapse: collapse; /* margin-bottom: -10px;*/ } .w3-cell { background-color: #fff; border: 5px solid #00c; /* margin-bottom: -10px;*/ border-bottom: none; } .w3-cell-row:before, .w3-cell-row:after { content: none; } .w3-cell-row:last-child {border-bottom: 5px solid #00c;}
  25. how write a new function without recursion call

    In an easy way? No. You need nested loops, and the number of loops you write is going to set a maximum value for parts of what the function can do. Recursion is how you avoid that, you can use a much more elegant piece of code to do that kind of thing if you use recursion. The code you posted doesn't actually do anything though, it never returns a value other than an empty array when k is greater than 0. It might have gotten messed up because you didn't post it in a code box, maybe there's something left out, I'm not sure.
  26. W3.CSS Layout - borders doubling up between rows

    If I add negative margins to the .w3-cell and .w3-cell-row, this seems to fix the doubling of borders for when the table is collapsed into a single column and when it is displayed with multiple columns... https://jsbin.com/modimuj/edit?html,output It's a bit of a bodge job, so if anyone has a neat / clean / better / more compatible / less sucky way of doing this, I'd still be interested to know :-)
  27. I've tried to put together a grid with a same width border all round. I thought I'd cracked it with border-collapse, but it still doubles up the border between rows. There's a code snippet here of a horrible nested table and underneath my W3CSS version of that table that's nearly the same, save for the doubled up row. https://jsbin.com/dugozav/edit?html,output It would be great if W3CSS had some easy way of dealing with gutters and borders (or even some documentation on w3schools). But any tips on reproducing the table layout in W3CSS without the borders doubling up between rows would be gratefully received :-)
  1. Load more activity