Community Member
Member Avatar
Topic by Tko_1 in Web Development
Sorry for the late response... but to keep the data on page reload you'd have to use cookies to store it. Reply by AleMonteiro
Member Avatar
AleMonteiro 238 Replied To a Post in Best Anti virus for my PC
Topic by jerry12 in Information Security
Just to update my previous answer... I don't use Windows as my main OS anymore and I feel much safer. I just run lynis and chkrootkit once a while and follow up the suggestions. Reply by AleMonteiro
Member Avatar
Topic by Rishi_3 in Web Development
Change $_POST['s'] to $_GET['s'] or to $_REQUEST['s'] Reply by AleMonteiro
Member Avatar
I'm trying to get the text value from a select dropdown menu that is populated by a database using the following function:



<?php
function searchintspokenlang()
{
require ('../../../connect_db.php');
$queryintspoken="SELECT Language FROM languages";
$result=mysqli_query($dbc, $queryintspoken);

while ($row = mysqli_fetch_array($result))
{
echo "<option value='" . $row['Language'] . "'>" . $row['Language'] . "</option>"; … Topic by Rishi_3 in Web Development
Member Avatar
Topic by Tko_1 in Web Development
Hello Tko,

when you call `countdown('08/26/2016 09:07:13 PM', callback);`, 'callback' is not defined.

I made an fiddle if an example based on your code, except the css.

I think it's what you want: https://jsfiddle.net/alemonteiro/s0wwkLfp/1/ Reply by AleMonteiro
Member Avatar
js file :

function countdown(endT,callback) {

var days,hours,minutes,sec,timer;



end = new Date(endT);



end = end.getTime(); //Get initial Date in Milliseconds,

if (isNaN(end)) {

alert('@ countdown.js @ "Invalid Date", valid format- mm/dd/yyyy hh:mm:ss TT ');

return;

}



timer = setInterval(calculate,1000);//Timer to calculate remaining time



function calculate(){

var current = new Date(); … Topic by Tko_1 in Web Development
Member Avatar
Featured AleMonteiro 238 Gave Reputation to Reverend Jim in Memorable Quotations
Topic by vegaseat in Community Center
What if voters decided intelligence and nuanced thinking were more important qualities in a presidential candidate than with whom they’d most like to have a beer? What if the Uhmerican public decided they wanted decent, affordable health care, and started doing things like reading books and cultivating gardens instead of … Reply by Reverend Jim
Member Avatar
Featured AleMonteiro 238 Gave Reputation to Reverend Jim in Memorable Quotations
Topic by vegaseat in Community Center
What if voters decided intelligence and nuanced thinking were more important qualities in a presidential candidate than with whom they’d most like to have a beer? What if the Uhmerican public decided they wanted decent, affordable health care, and started doing things like reading books and cultivating gardens instead of … Reply by Reverend Jim
Member Avatar
Featured AleMonteiro 238 Replied To a Post in Anarchism / Voluntarism
Topic by AleMonteiro in Community Center
@hericles, thanks for the input, but I disagree in some points...

> Humans are incapable of functioning in sufficiently large groups with leadership/authority in place.

You meant "without leardership", right? Because government is leadership/authority.
But even then, if people are not capable of deciding how to live, how are those … Reply by AleMonteiro
Member Avatar
Featured AleMonteiro 238 Edited Anarchism / Voluntarism
Hey fellas,

Do you think it's possible to live in a organized society that doesn't have a government? And why?

I can't remeber when I lost faith in our current system, it's been a while for sure. Year after year is getting more clearer to me that we need radical … Topic by AleMonteiro in Community Center
Member Avatar
Featured AleMonteiro 238 Edited Anarchism / Voluntarism
Hey fellas,

Do you think it's possible to live in a organized society that doesn't have a government? And why?

I can't remeber when I lost faith in our current system, it's been a while for sure. Year after year is getting more clearer to me that we need radical … Topic by AleMonteiro in Community Center
Member Avatar
Featured AleMonteiro 238 Created Anarchism / Voluntarism
Hey fellas,

Do you think it's possible to live in a organized society that doesn't have a government? And why?

I can't remeber when I lost faith in our current system, it's been a while for sure. Year after year is getting more clearer to me that we need radical … Topic by AleMonteiro in Community Center
Member Avatar
Featured AleMonteiro 238 Began Watching Anarchism / Voluntarism
Hey fellas,

Do you think it's possible to live in a organized society that doesn't have a government? And why?

I can't remeber when I lost faith in our current system, it's been a while for sure. Year after year is getting more clearer to me that we need radical … Topic by AleMonteiro in Community Center
Member Avatar
Featured AleMonteiro 238 Began Watching Memorable Quotations
Once harm has been done, even a fool understands it.
-- Homer Topic by vegaseat in Community Center
Member Avatar
Featured AleMonteiro 238 Replied To a Post in Memorable Quotations
Topic by vegaseat in Community Center
My country is the world and my religion is to do good.
- Thomas Plaine Reply by AleMonteiro
Member Avatar
So I want to remove space between tags. The tags are seperated by comma. But I don't want to remove space between words just right after the commas.
So this:
cats, funny cats, cute cats, funny
To this:
cats,funny cats,cute cats,funny

I want them ready for insertion into database.
This … Topic by FarrisFahad in Web Development
Member Avatar
Featured AleMonteiro 238 Replied To a Post in I want to remove space between tags using PHP
Topic by FarrisFahad in Web Development
A simple replace should do it:


// removes duple spaces
$result = str_replace(" ", " ", $tags);
// removes space after comma
$result = str_replace(", ", ",", $result);

but yes, regular expression would be better I guess... something like `(,[ \s]+)` and replace with ","

sorry but not time to … Reply by AleMonteiro
Member Avatar
Topic by 555ppp in Web Development
But you're not checking for any text, you're just checking the checkbox value that will always be the same.

I'd go with something like this:


var checkedCount = 0,
errMessage = undefined;

for (var i = 0; i < chks.length; i++)
{
var chk = chks[i],
// gets the checkbox … Reply by AleMonteiro
Member Avatar
I'm making a series of webpages, and need to control top level navigation through an external JS file. I can't even think of how to begin to code this. Does each page need to be assigned an array index? Then how do I hide the link to the current page? Topic by TObannion in Web Development
Member Avatar
Topic by TObannion in Web Development
What do you mean? Are you going to change the navigation menu after the page is loaded?

Or do you just want to know what page was loaded to do something on the contents?

Or do you want to have an tree-like structure that dinamically changes the navigation upon user … Reply by AleMonteiro
Member Avatar
here i am having a form like this .i am having multiple checkboxes that are coming from database and i have given a field with every checkbox...now suppose 10 checkboxes are coming from database..now i want to insert values in database only of those checkboxes which are checked along with … Topic by 555ppp in Web Development
Member Avatar
Topic by 555ppp in Web Development
Checkboxes values are only submited if they're checked, and text values are always submited even if blank.
So if you check only 5 boxes, the length of `$_POST['checkbox1']` will be 5 but the length of `$_POST['quantity']` will still be 10.

I suggest you to name each input text with the … Reply by AleMonteiro
Member Avatar
Hi guys,

I'm working on a project and wanted to know if there is a good / trusted way to break a string apart into words. I want to get all the words in a string that will be used in a mysql query.

I tested with str_word_count but it … Topic by LRNPHP in Web Development
Member Avatar
AleMonteiro 238 Replied To a Post in PHP break string up word by word
Topic by LRNPHP in Web Development
You could just make an replace for any special char into an space and then split it with explode, but if you want something a little more elegant, you probably want regular expressions.

Take a look at this: http://stackoverflow.com/questions/9088391/splitting-large-strings-into-words-in-php Reply by AleMonteiro
Member Avatar
Featured AleMonteiro 238 Began Watching Jquery image gallery

Hello,

I would like to create image gallery with jquery which could show an image and if I place a cusor on top of it a shadow with a caption will appears on top of the image. And if someone click the image the image will enlarge a larger image … Topic by davy_yg in Web Development
Member Avatar
Featured AleMonteiro 238 Replied To a Post in Jquery image gallery
Topic by davy_yg in Web Development
There's hundreds of jquery gallery plugins out there, just google "jquery image gallery".

I don't remeber any one that does exactly what you want, but there's probably a few.

Here's somewhere to start: http://www.webdesignerdepot.com/2011/08/25-jquery-image-galleries-and-slideshow-plugins/ Reply by AleMonteiro
Member Avatar
Topic by FarrisFahad in Web Development
The only way I'd say it's by doing it!

What do you mean only basic stuff? All methods, params and possible results are listed there.

And what else do you want? You asked only about the login. There's a page for each method available. There's a section for each SDK. … Reply by AleMonteiro
Member Avatar
Hi,

I tried to change the form action based on selection option and hoping that my javascript validation function working properly too... I found out one solution and hoping this javascript can do that kind of thing. I tried so many ways and I think there's something wrong with my … Topic by slowlearner2010 in Web Development
Member Avatar
Topic by slowlearner2010 in Web Development
It's a silly thing... you're reaching for the form with `document.getElementById('myForm')`, but your form doesn't have `id="myForm"`.

Just add the id to your form or use `document.forms['myForm']` to get it by it's name.

Example:


function onSelectedOption(sel) {
var frm = document.forms["myForm"];
if ((sel.selectedIndex) == 3) {
frm.action = "a.php";
} … Reply by AleMonteiro
Member Avatar
What should happen is when i click the log in button, the container for the log in form should become hidden and the sidebar, search bar, tiles and log out button should appear. I sometimes experience that if i have to click the log in button twice for it to … Topic by Roger_2 in UI / UX Design