ELATED: All Forums http://www.elated.com/ ELATED.com Webmaster Forums: Free Help with HTML, CSS, JavaScript, PHP and Photoshop from ELATED.com en-us Sun, 21 Jan 2018 04:20:16 GMT Sun, 21 Jan 2018 04:20:16 GMT http://blogs.law.harvard.edu/tech/rss ELATED.com feeder Re: [Authoring and Programming] Javascript Login Coder Help http://www.elated.com/forums/topic/6182/#post26907 From: JamesLeo



Code:
--------------------
[i][b]https://www.techistra.com/[/b][/i]
--------------------


View » | Reply »

]>
Fri, 12 Jan 2018 20:40:26 GMT http://www.elated.com/forums/topic/6182#post26907
Re: [Authoring and Programming] Javascript Login Coder Help http://www.elated.com/forums/topic/6182/#post26906 From: JamesLeo


<b><a href="https://www.techistra.com/">https://www.techistra.com/</a></b>

View » | Reply »

]>
Fri, 12 Jan 2018 20:39:56 GMT http://www.elated.com/forums/topic/6182#post26906
Re: [Authoring and Programming] Build a CMS in an Afternoon with PHP and MySQL http://www.elated.com/forums/topic/5114/#post26905 From: fmjh23


@stevewanjala

I'm not sure how mysql_escape_string worked in this code in 2011 but I don't think you can use mysqli_escape_string with PDO in this code now.

This is a link to the advice at php.net for that function

http://php.net/manual/en/mysqli.real-escape-string.php

mysqli_escape_string and mysqli_real_escape_string are the same thing.

If you look at the link above you will see that you need to pass the database connection as well as the data you want to escape. That is why the error indicates that two parameters are needed.

You could do


Code:
--------------------
mysqli_escape_string($conn, $order)
--------------------



But that will give a different error because $conn is a PDO object and not mysqli. mysqli functions only work with mysqli connections.

I'm still trying to understand why the function has been written that way but for now I am just using $order without any function. This tutorial was written quite a long time ago and possibly there is a better way to work with the publication date than is being used here.

PDO uses prepared statements and bound parameters so not sure why the publicationDate could not have been treated the same way in the getList function as it is in the insert function e.g.

A unix timestamp is the number of seconds that have passed since 1970-01-01 as an unsigned integer so it should be possible to do this instead if the publicationDate needs to be escaped.


Code:
--------------------
$sql = "SELECT SQL_CALC_FOUND_ROWS *, UNIX_TIMESTAMP(publicationDate) AS publicationDate FROM articles ORDER BY " . :order . " LIMIT :numRows";

$st = $conn->prepare($sql);

$st->bindValue( ":numRows", $numRows, PDO::PARAM_INT);

$st->bindValue(":order", $order, PDO::PARAM_INT);

$st->execute();
--------------------


However I've not tried that yet so don't know if it will work and if it does why matt didn't do it that way in the first place? So there's probably some reason why the above it not a reasonable solution.

Further back in the comments there is some discussion of whitelisting and that particular function but haven't had a chance to look at that yet. Just jumped to the end to see if the forum was still being updated.

Hope that helps.

John

--
No signature!

View » | Reply »

]>
Sun, 26 Nov 2017 22:32:10 GMT http://www.elated.com/forums/topic/5114#post26905
Re: [Authoring and Programming] Build a CMS in an Afternoon with PHP and MySQL http://www.elated.com/forums/topic/5114/#post26904 From: csturner


Firstly, I have not gone thru and checked every response yet, but, does anyone else see date creep with their articles, going back one day every time they are submitted or edited?

Secondly, I am trying to add creationDate to track the last time an article was created or subsequently updated. I have it mostly figured out, but how do I have the editArticle form trigger an update to this creationDate based on the date now?

View » | Reply »

]>
Sun, 26 Nov 2017 21:57:16 GMT http://www.elated.com/forums/topic/5114#post26904
Re: [Authoring and Programming] Build a CMS in an Afternoon with PHP and MySQL http://www.elated.com/forums/topic/5114/#post26901 From: csturner


I am going to post a few updates I have made here for others. Disclaimer: I am not a expert, nor do I play one on TV. Other input and correction is appreciated.

After switching to PHP 7.x I had an issue with the general error catching so I replaced the code in config.php with the following:
Original:

Code:
--------------------
function handleException( $exception ) {
echo "Sorry, a problem occurred. Please try later.";
error_log( $exception->getMessage() );
}

set_exception_handler( 'handleException' );
?>
--------------------

My Version:

Code:
--------------------
function handleException( Throwable $t ) {
echo "Sorry, a problem occurred. Please try later." . $t;
error_log( $t->getMessage() );
}

set_exception_handler( 'handleException' );
--------------------


The output is ugly, but it provides a few details on the error page describing the issue. DO NOT use this in production!

[Edited by csturner on 26-Nov-17 11:09]

View » | Reply »

]>
Sun, 26 Nov 2017 17:05:04 GMT http://www.elated.com/forums/topic/5114#post26901
Re: [Authoring and Programming] Hover help http://www.elated.com/forums/topic/6400/#post26898 From: chrishirst


https://www.w3schools.com/cssref/css3_pr_border-radius.asp


Use the :hover pseudo class to apply the properties to the ruleset.

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]>
Tue, 14 Nov 2017 16:34:55 GMT http://www.elated.com/forums/topic/6400#post26898
[Authoring and Programming] Hover help http://www.elated.com/forums/topic/6400/#post26897 From: Casper


Hi. As I said in the title I want to make so when you hover over icon I want there to be a circle around it with the color gold For some reason it created 2 threads.

View » | Reply »

]>
Mon, 13 Nov 2017 21:21:11 GMT http://www.elated.com/forums/topic/6400#post26897
Re: [Webmasters' Lounge] What level of learning? http://www.elated.com/forums/topic/6394/#post26891 From: chrishirst


Design requires artistic skills, you appear to be talking about the development of a website layout and just knowing the basics is far too prolific to make someone without employable.

Do you have any qualifications that demonstrate your level of expertise?

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]>
Mon, 06 Nov 2017 13:08:14 GMT http://www.elated.com/forums/topic/6394#post26891
Re: [Webmasters' Lounge] What level of learning? http://www.elated.com/forums/topic/6394/#post26890 From: newbie1022


Simple website design, which I can do now, but cannot find work at this level of training.

--
Jim Williams

View » | Reply »

]>
Mon, 06 Nov 2017 12:44:07 GMT http://www.elated.com/forums/topic/6394#post26890
Re: [Authoring and Programming] Native html5 player help with Upload http://www.elated.com/forums/topic/6395/#post26889 From: chrishirst



Code:
--------------------
$uploadDirectory = 'uploadWC/'.$fileName;
--------------------


After that operation $uploadDirectory is no longer a directory, so saving files to that path WILL fail.

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]>
Mon, 06 Nov 2017 00:59:10 GMT http://www.elated.com/forums/topic/6395#post26889
Re: [Webmasters' Lounge] What level of learning? http://www.elated.com/forums/topic/6394/#post26888 From: chrishirst


"What level of learning do I need to get to before I am hirable? "

Dunno?
It depends on what job you are trying to get 'hired' for.

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]>
Sat, 04 Nov 2017 18:40:27 GMT http://www.elated.com/forums/topic/6394#post26888
[Authoring and Programming] Native html5 player help with Upload http://www.elated.com/forums/topic/6395/#post26887 From: chrisjchrisj


Native html5 video player starts, stops & records successfully, but need help with Upload.
This web video player starts, stops, records and plays back successfully, but the Upload portion needs help. Although the console shows "Success", no file actually arrives. Any guidance/suggestion/remedy to get the recorded video to Upload to a folder, will be welcomed. Thanks.



Code:
--------------------
..............
<button class="start" disabled>Start</button>
<button class="stop" disabled>Stop</button>
<button class="reset" disabled>Reset</button>
<button class="upload" onclick="InitUploading()" disabled>Upload</button>

<script>

const video = document.querySelector('video')
const start = document.querySelector('.start')
const stop = document.querySelector('.stop')

const initRecorder = stream => {

const recorder = new MediaRecorder(stream)

video.srcObject = stream
start.removeAttribute('disabled')

video.addEventListener('loadedmetadata', () => {
video.play()
})

recorder.addEventListener('dataavailable', ({ data }) => {
video.srcObject = null
video.src = URL.createObjectURL(data)
})

start.addEventListener('click', () => {
stop.removeAttribute('disabled')
recorder.start()
})

stop.addEventListener('click', () => {
recorder.stop()
})


// Upload the video blob as form data


upload.addEventListener('click', () => {
const body = new FormData()

body.append('myvideo', blob)

fetch('upload.php', { method: 'POST', body })
.then(() => console.log('Success!'))
.catch(console.error)

})

}

navigator
.mediaDevices
.getUserMedia({ video: true })
.then(initRecorder)
.catch(console.error)

</script>
Here's the upload.php file:
--------------------


Here's the upload.php file:



Code:
--------------------
<?php
foreach(array('video', 'audio') as $type) {
if (isset($_FILES["${type}-blob"])) {

//echo 'uploadWC/';

$fileName = $_POST["${type}-filename"];
$uploadDirectory = 'uploadWC/'.$fileName;

if (!move_uploaded_file($_FILES["${type}-blob"]["tmp_name"], $uploadDirectory)) {
echo(" problem moving uploaded file");
}

echo($fileName);
}
}
?>
--------------------


View » | Reply »

]>
Sat, 04 Nov 2017 15:34:27 GMT http://www.elated.com/forums/topic/6395#post26887
[Webmasters' Lounge] What level of learning? http://www.elated.com/forums/topic/6394/#post26886 From: newbie1022


Okay, I have learned CSS3, HTML5, got Javascript and working on Jquery. What level of learning do I need to get to before I am hirable? I guess PHP? How much program and coding knowledge do you need before you are useful in the workplace? Ideas?

--
Jim Williams

View » | Reply »

]>
Sat, 04 Nov 2017 11:21:08 GMT http://www.elated.com/forums/topic/6394#post26886
Re: [Authoring and Programming] Super easy well not for me I guess http://www.elated.com/forums/topic/6393/#post26882 From: chrishirst


Oh and wage deductions are generally based on greater than calculations '>' rather than less than '<'

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]>
Wed, 25 Oct 2017 11:18:53 GMT http://www.elated.com/forums/topic/6393#post26882
Re: [Authoring and Programming] Super easy well not for me I guess http://www.elated.com/forums/topic/6393/#post26881 From: chrishirst


Using the correct variable in this conditional

if(pay < 300.01)

could be a starting point.

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]>
Wed, 25 Oct 2017 11:15:15 GMT http://www.elated.com/forums/topic/6393#post26881
[Authoring and Programming] Super easy well not for me I guess http://www.elated.com/forums/topic/6393/#post26880 From: TotoroFan


Just starting out in a programming course and I'm stumped and I frustrated I need to know how to get both the withholding's and net I cannot figure out how to write it so the program figures out both equations. Please help. Thanks.


Code:
--------------------
<script>
var pay = prompt("Enter your houly pay");
var hour = prompt("Enter your hours worked");
var GROSS = parseFloat(pay * hour);
var WITH;
var NET;

if(pay < 300.01)
{
WITH = pay * hour * .10;
NET = pay - WITH;
alert(("GROSS PAY: $" + GROSS.toFixed(2)) + ("\nWITHHOLDING: $" + WITH.toFixed(2)) + ("\nNET PAY: $" + NET.toFixed(2)));
}
</script>
--------------------


View » | Reply »

]>
Mon, 23 Oct 2017 01:52:59 GMT http://www.elated.com/forums/topic/6393#post26880
Re: [Authoring and Programming] Build a CMS in an Afternoon with PHP and MySQL http://www.elated.com/forums/topic/5114/#post26879 From: stevewanjala


Thank you chris for your response i managed to get the

now the project would run but with another error
Warning: mysqli_escape_string() expects exactly 2 parameters, 1 given in C:\xampp\htdocs\cms\classes\Article.php on line 106


Code:
--------------------
public static function getList( $numRows=1000000, $order="publicationDate DESC" ) {
$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );
$sql = "SELECT SQL_CALC_FOUND_ROWS *, UNIX_TIMESTAMP(publicationDate) AS publicationDate FROM articles
ORDER BY " . mysqli_escape_string($order) . " LIMIT :numRows";

$st = $conn->prepare( $sql );
$st->bindValue( ":numRows", $numRows, PDO::PARAM_INT );
$st->execute();
$list = array();

while ( $row = $st->fetch() ) {
$article = new Article( $row );
$list[] = $article;
}

// Now get the total number of articles that matched the criteria
$sql = "SELECT FOUND_ROWS() AS totalRows";
$totalRows = $conn->query( $sql )->fetch();
$conn = null;
return ( array ( "results" => $list, "totalRows" => $totalRows[0] ) );
}
--------------------



please advice where am i going wrong

and any article that i add on the admin side will be saved on the database but it wont appear in the frontend side of the page,

View » | Reply »

]>
Thu, 19 Oct 2017 07:27:13 GMT http://www.elated.com/forums/topic/5114#post26879
Re: [Authoring and Programming] Build a CMS in an Afternoon with PHP and MySQL http://www.elated.com/forums/topic/5114/#post26878 From: chrishirst


Replace the generic "something went wrong" with a detailed error message.

http://php.net/manual/en/function.error-reporting.php

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]>
Thu, 19 Oct 2017 06:48:23 GMT http://www.elated.com/forums/topic/5114#post26878
Re: [Authoring and Programming] Build a CMS in an Afternoon with PHP and MySQL http://www.elated.com/forums/topic/5114/#post26877 From: stevewanjala


KINDLY ASSIST :

I KEEP RECEIVING THE BELOW ERROR MESSAGE
Sorry, a problem occurred. Please try later.

have noticed its in the index.php code section but can not tell which line to be exact throws the error.

View » | Reply »

]>
Wed, 18 Oct 2017 09:47:31 GMT http://www.elated.com/forums/topic/5114#post26877
[Authoring and Programming] How to reset videovideo timer http://www.elated.com/forums/topic/6392/#post26876 From: chrisjchrisj


I'm using this webRTC webcam recorder <video></video> successfully, which has a webcam-view button to start/show the webcam view. And a Start Recording button to begin recording the webcam view.

I've been trying to get the player controls timer to reset to 0:00 upon selecting the Start Recording button (because the timer apparently starts upon webcam view button selection), so that the person recording will have an idea how long the recording is, while recording. I tried adding things to this function, to accomplish that, like video.load; currentTime = 0; etc, without success (maybe those additions were in the wrong place?). Any help/suggestions/guidance will be appreciated.



Code:
--------------------
<script type="text/javascript">
var video = document.querySelector('video');

function startCamera() {
//document.getElementById('btn-start-camera').disabled = true;
document.getElementById('btn-start-recording').disabled = false;
//document.getElementById('btn-stop-camera').disabled = false;
captureCamera(function (camera) {
setSrcObject(camera, video);
global_camera = camera;
});
}

function captureCamera(callback) {
navigator.mediaDevices.getUserMedia({
audio: true,
video: true
}).then(function (camera) {
callback(camera);
}).catch(function (error) {
alert('Unable to capture camera. To try again - simply refresh your page');
console.error(error);
});
}

function stopRecordingCallback() {
video.src = video.srcObject = null;
video.src = URL.createObjectURL(recorder.getBlob());
PrepareBlob();
document.getElementById("upload-video").disabled = false;

// release camera
recorder.camera.getTracks().forEach(function (track) {
track.stop();
});

recorder.camera.stop();
recorder.destroy();
recorder = null;
}
var recorder; // globally accessible
document.getElementById('btn-start-recording').onclick = function () {
this.disabled = true;
document.getElementById("upload-video").disabled = true;
captureCamera(function (camera) {
setSrcObject(camera, video);
recorder = RecordRTC(camera, {
type: 'video'
});

recorder.startRecording();
video.controls = true;
// release camera on stopRecording
recorder.camera = camera;
document.getElementById('btn-stop-recording').disabled = false;
});
};
document.getElementById('btn-stop-recording').onclick = function () {
this.disabled = true;
document.getElementById('btn-start-recording').disabled = false;

recorder.stopRecording(stopRecordingCallback);
};
var blob, fileName, fileObject;
function PrepareBlob() {
// get recorded blob
blob = recorder.getBlob();
// generating a random file name
fileName = getFileName('webm');
// we need to upload "File" --- not "Blob"
fileObject = new File([blob], fileName, {
type: 'video/webm'
});
}
function InitUploading()
{
uploadToPHPServer(fileObject, function (response, fileDownloadURL) {
if (response !== 'ended') {
document.getElementById('header').innerHTML = response; // upload progress
return;
}

document.getElementById('header').innerHTML = '<a href="' + fileDownloadURL + '" target="_blank">' + fileDownloadURL + '</a>';
alert('Successfully uploaded recorded blob.');

alert('Successfully uploaded recorded blob.');
// preview uploaded file
video.src = fileDownloadURL;
// open uploaded file in a new tab
window.open(fileDownloadURL);
});
}

function uploadToPHPServer(blob, callback) {
// create FormData
var formData = new FormData();
formData.append('video-filename', blob.name);
formData.append('video-blob', blob);
callback('Uploading recorded-file to server.');
makeXMLHttpRequest('save.php', formData, function (progress) {
if (progress !== 'upload-ended') {
callback(progress);
return;
}
var initialURL = 'uploads/' + blob.name;
callback('ended', initialURL);
});
}

function makeXMLHttpRequest(url, data, callback) {
var request = new XMLHttpRequest();
request.onreadystatechange = function () {
if (request.readyState == 4 && request.status == 200) {
if (request.responseText === 'success') {
callback('Upload Complete');
return;
}
// alert(request.responseText);
window.location.href = 'UploadWC.html';
return;
}
};
request.upload.onloadstart = function () {
callback('Upload started...');
};
request.upload.onprogress = function (event) {
callback('Upload Progress ' + Math.round(event.loaded / event.total * 100) + "%");
};
request.upload.onload = function () {
callback('Progress Ending');
};
request.upload.onload = function () {
callback('Upload Complete');
};
request.upload.onerror = function (error) {
callback('Upload failed.');
};
request.upload.onabort = function (error) {
callback('Upload aborted.');
};
request.open('POST', url);
request.send(data);
}
// this function is used to generate random file name
function getFileName(fileExtension) {
var d = new Date();
var year = d.getUTCFullYear();
var month = d.getUTCMonth();
var date = d.getUTCDate();
return 'RecordRTC-' + year + month + date + '-' + getRandomString() + '.' + fileExtension;
}

function getRandomString() {
if (window.crypto && window.crypto.getRandomValues && navigator.userAgent.indexOf('Safari') === -1) {
var a = window.crypto.getRandomValues(new Uint32Array(3)),
token = '';
for (var i = 0, l = a.length; i < l; i++) {
token += a[i].toString(36);
}
return token;
} else {
return (Math.random() * new Date().getTime()).toString(36).replace(/\./g, '');
}
}
</script>
--------------------


[Edited by chrisjchrisj on 16-Oct-17 14:01]

View » | Reply »

]>
Mon, 16 Oct 2017 19:00:15 GMT http://www.elated.com/forums/topic/6392#post26876
Re: [Website Marketing] How to use Google webmaster tools...? http://www.elated.com/forums/topic/6383/#post26875 From: Supportcontact


To use Google Webmaster, we can analyze our website ranking report like backlink, website error, crawl etc.

--
http://www.supportcontactnumber.co.uk/yahoo-contact-number.php

View » | Reply »

]>
Sat, 14 Oct 2017 06:43:19 GMT http://www.elated.com/forums/topic/6383#post26875
Re: [Webmasters' Lounge] Audio player track list dont scroll on Smartphone but works well on PC http://www.elated.com/forums/topic/6307/#post26873 From: flipdiving


I love it for music with a subscription to the service, but it sucks for podcasts as you can't directly enter URLs if the podcast isn't available on their lists.
https://bodakyellowlyrics.com

[Edited by flipdiving on 09-Oct-17 02:50]

View » | Reply »

]>
Mon, 09 Oct 2017 07:48:59 GMT http://www.elated.com/forums/topic/6307#post26873
Re: [Webmasters' Lounge] I am trying to go from 32 bit Vista to 64 bit Windows 7. http://www.elated.com/forums/topic/5481/#post26872 From: flipdiving


I have persisten but infrequent crashes with Windows 64bit professional supplied with an HP laptop, it appears to be the Windows 7 editor; it does not appeart to be a malaware, MS anti malawear is running.
https://despacito-lyrics.com

[Edited by flipdiving on 09-Oct-17 02:46]

View » | Reply »

]>
Mon, 09 Oct 2017 07:44:59 GMT http://www.elated.com/forums/topic/5481#post26872
Re: [Website Management] How to manage a website? http://www.elated.com/forums/topic/5898/#post26871 From: flipdiving


Every day, there are no small customer access to your business website. The new information and useful always attract people to visit. If the website is not updated regularly to meet the information needs of the client, it will cause the feeling boring and not want to monitor the content on the site. Thus, the business units need to regularly refresh your website in order to create a good impression and attract customers visit.
http://quizbucket.org/quiz/nodejs , http://bottleflip.co

View » | Reply »

]>
Mon, 09 Oct 2017 07:39:50 GMT http://www.elated.com/forums/topic/5898#post26871
Re: [Graphics and Design] logo design http://www.elated.com/forums/topic/5737/#post26870 From: flipdiving


Thanks for your sharing. Hope you can contribute more quality posts to this page. Thank you!
http://flipdiving.online

View » | Reply »

]>
Mon, 09 Oct 2017 07:37:01 GMT http://www.elated.com/forums/topic/5737#post26870
Re: [Authoring and Programming] When I press delete, nothing happens http://www.elated.com/forums/topic/6390/#post26869 From: myriko


Thank you Chris.

No Need clue more than that,
I fixed it

Riko

View » | Reply »

]>
Mon, 09 Oct 2017 06:27:34 GMT http://www.elated.com/forums/topic/6390#post26869
Re: [Authoring and Programming] stuck! http://www.elated.com/forums/topic/6385/#post26868 From: newbie1022


I simply copy/pasted them into the CSS where it applied to the space where I was trying to center the element. It did not work, and I really need to learn the why's and whats of what the code does. I want to get my head around vertical centering! Thanks! Jim

--
Jim Williams

View » | Reply »

]>
Sun, 08 Oct 2017 22:44:04 GMT http://www.elated.com/forums/topic/6385#post26868
Re: [Authoring and Programming] stuck! http://www.elated.com/forums/topic/6385/#post26867 From: chrishirst


And how have you set the CSS to apply those rules to an element??

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]>
Sun, 08 Oct 2017 21:13:52 GMT http://www.elated.com/forums/topic/6385#post26867
Re: [Authoring and Programming] Separate a string before a number http://www.elated.com/forums/topic/6381/#post26866 From: chrishirst



Code:
--------------------
var strA= "sdfls jfsdkfjh3 58sklf039 5857dfkkjhksjf h";
var strB = strA.split(/(\d+)/);

--------------------


will get you this: sdfls jfsdkfjh,3, ,58,sklf,039, ,5857,dfkkjhksjf h

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]>
Sun, 08 Oct 2017 21:11:44 GMT http://www.elated.com/forums/topic/6381#post26866
Re: [Website Marketing] SEO does it really work? http://www.elated.com/forums/topic/6226/#post26865 From: chrishirst


SPAMMER!!!!!

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]>
Sun, 08 Oct 2017 20:21:56 GMT http://www.elated.com/forums/topic/6226#post26865
Re: [Authoring and Programming] When I press delete, nothing happens http://www.elated.com/forums/topic/6390/#post26864 From: chrishirst


In that code, .... .... Haven't got a clue.

Where is the rest of the code that is necessary to start testing???

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]>
Sun, 08 Oct 2017 20:20:50 GMT http://www.elated.com/forums/topic/6390#post26864
[Authoring and Programming] When I press delete, nothing happens http://www.elated.com/forums/topic/6390/#post26863 From: myriko


Hi Friends , What I did wrong in this code that it does not work? the button appears when click on it nothing happens.. Thanks


Code:
--------------------

$(document).ready(function() {
var p2_max_fields = 10; //maximum input boxes allowed
var p2_wrapper = $(".p2_input_fields_wrap"); //Fields p2_wrapper
var p2_add_button = $(".p2_add_field_button"); //Add button ID

var x = 1; //initlal text box count
$(p2_add_button).click(function(e){ //on add input button click
e.preventDefault();
if(x < p2_max_fields){ //max input box allowed
x++; //text box increment
$(p2_wrapper).append('<div id="del-'+x+'" class="my_col col-md-12"><div class="col-lg-2"> <input placeholder="Description="p2_Description[]" class="form-control fullwidth " value="" ></div><div class="col-lg-2"> <input placeholder="ProtectionRequirments" name="p2_ProtectionRequirments[]" class="form-control fullwidth" value="" ></div><div class="col-lg-2"> <input placeholder="Done" name="p2_Done[]" style="margin-bottom:15px;" class="form-control fullwidth " value="" ></div><div class="col-lg-2"> <input placeholder="NotCarriedout" name="p2_NotCarriedout[]" class="form-control fullwidth" value="" ></div><div class="col-lg-2"> <input placeholder="Comments" name="p2_Comments[]" class="form-control fullwidth" value="" ></div><div class="col-lg-2"><a href="#" class="btn btn-danger" data-rel="'+x+'">Remove</a></div></div>'); //add input box .
}
});

$(wrapper).on("click",".remove_field", function(e){ //user click on remove text
e.preventDefault();
var delx = $(this).attr("data-rel");
$('#del-'+delx).remove(); x--;
--------------------


Mod note; code delimiters added

[Edited by chrishirst on 08-Oct-17 15:17]

View » | Reply »

]>
Sun, 08 Oct 2017 06:42:48 GMT http://www.elated.com/forums/topic/6390#post26863
Re: [Website Marketing] SEO does it really work? http://www.elated.com/forums/topic/6226/#post26861 From: hotmailservice


Hello Guys
Yes seo is important for any site, SEO is a marketing discipline focused on growing visibility in organic (non-paid) search engine results. you need to do good seo.
for more details visit:- http://www.contacthelplinenumber.co.uk/

--
Hotmail Phone Number
Hotmail Helpline Number


View » | Reply »

]>
Sat, 07 Oct 2017 12:07:16 GMT http://www.elated.com/forums/topic/6226#post26861
Re: [Graphics and Design] logo design http://www.elated.com/forums/topic/5737/#post26860 From: angelannie


Hi everyone
I am working for famous celebrity birthdays where you can know everything about famous celebrities like Maluma , Nikki Bella and Peyton Meyer etc. Visit us @ http://www.celebrityborn.com .

View » | Reply »

]>
Sat, 07 Oct 2017 11:39:31 GMT http://www.elated.com/forums/topic/5737#post26860
Re: [Authoring and Programming] stuck! http://www.elated.com/forums/topic/6385/#post26859 From: newbie1022


I do NOT know how to vertically center a header in a space I had designed for it. I thought I had it with some code written by the instructor I am watching in YouTube. I applied his code from a similar exercise, but it did not do what i needed it to do. Here is the stylesheet code he used, and it worked, but not on my site. Again, this is CSS code, not html.

position:relative;
top:50%;
-webkit-transform: translate Y(-50%);
-ms transform: translate Y(-50%);
transform: translateY(-50%);

[Edited by newbie1022 on 06-Oct-17 20:21]

--
Jim Williams

View » | Reply »

]>
Sat, 07 Oct 2017 01:12:05 GMT http://www.elated.com/forums/topic/6385#post26859
Re: [Authoring and Programming] Jquery not working http://www.elated.com/forums/topic/6386/#post26856 From: chrishirst


What exactly is a "Spring Controller"???

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]>
Thu, 05 Oct 2017 17:13:25 GMT http://www.elated.com/forums/topic/6386#post26856
Re: [Website Marketing] How to use Google webmaster tools...? http://www.elated.com/forums/topic/6383/#post26855 From: chrishirst


Read the 'Help' system that Google provides.

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]>
Thu, 05 Oct 2017 17:11:19 GMT http://www.elated.com/forums/topic/6383#post26855
Re: [Authoring and Programming] stuck! http://www.elated.com/forums/topic/6385/#post26854 From: chrishirst


"but the code I have for centering it vertically isn't working"

Define 'not working' and provide the 'code'.

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]>
Thu, 05 Oct 2017 17:10:29 GMT http://www.elated.com/forums/topic/6385#post26854
Re: [Authoring and Programming] Build a CMS in an Afternoon with PHP and MySQL http://www.elated.com/forums/topic/5114/#post26853 From: chrishirst


"But i got simple error with message "Sorry, a problem occurred. Please try later." stated in exception handler of config.php."

You have probably missed out a semicolon or spelt something incorrectly.

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]>
Thu, 05 Oct 2017 17:08:43 GMT http://www.elated.com/forums/topic/5114#post26853
Re: [Authoring and Programming] Build a CMS in an Afternoon with PHP and MySQL http://www.elated.com/forums/topic/5114/#post26852 From: chrishirst


"Well, I don't know what "username" means."

The default username for MySQL is 'root'


"mysql>create database cms;"

You open a command window, start the mysql session and you will get a mysql> prompt for you to start typing commands into.

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/


View » | Reply »

]>
Thu, 05 Oct 2017 17:07:25 GMT http://www.elated.com/forums/topic/5114#post26852
[Authoring and Programming] Jquery not working http://www.elated.com/forums/topic/6386/#post26851 From: samee


Hi Members ,

I'm trying to build an email template form my project website. The template appears as a template once I try to submit my parent form. In this template TO, SUBJECT and BODY of the email is fixed and not enabled for user to edit only CC(textfield) and COMMENT(textarea) are there which user can edit. Now when the user submits the send button in the template it first saves the parent form then sends the email which is handled by a controller function in spring on the other hand the template creation is in Jquery and the submit is also handled in jQuery to pass control to Spring controller. The above functionality works fine if user doesn't enter anything in COMMENT but if user types anything in COMMENT the page perhaps kind of stuck. When i check the web browser their is no error and even i placed console.log after each line and the log gets printed but somehow the control is not passed to the spring Controller. when i tried replacing the comment with a non editable content like BODY the functionality
worked fine. Can anyone point me in some direction how to debug this issue it seems even i'm stuck with the page.

View » | Reply »

]>
Thu, 05 Oct 2017 08:30:13 GMT http://www.elated.com/forums/topic/6386#post26851
[Authoring and Programming] stuck! http://www.elated.com/forums/topic/6385/#post26850 From: newbie1022


I am designing a website, and I have a name in a header. It is centered horizontally, but the code I have for centering it vertically isn't working. Ideas? I need specific code for this, please. Thanks!

--
Jim Williams

View » | Reply »

]>
Tue, 03 Oct 2017 14:39:41 GMT http://www.elated.com/forums/topic/6385#post26850
Re: [Graphics and Design] logo design http://www.elated.com/forums/topic/5737/#post26848 From: sarahlauren


It's quite simple though. All you need is to learn some specific tools and software like Adobe Illustrator and the other ones that are available in the market too. Watch youtube videos of basic training to help you get started and then gradually you will be able to design a good logo by yourself.

View » | Reply »

]>
Tue, 03 Oct 2017 09:33:26 GMT http://www.elated.com/forums/topic/5737#post26848
[Website Marketing] How to use Google webmaster tools...? http://www.elated.com/forums/topic/6383/#post26847 From: hotmailcontact


Plz Reply me How to use Google webmaster.?

--
http://www.emailcontactnumber.co.uk

View » | Reply »

]>
Tue, 03 Oct 2017 05:28:06 GMT http://www.elated.com/forums/topic/6383#post26847
Re: [Website Marketing] What is Bounce Rate? http://www.elated.com/forums/topic/4837/#post26846 From: hotmailcontact


Bounce Rate is very important in SEO. bounce rate is the percentage of users who arrived on your website and suddenly leave without read your website pages.

[Edited by hotmailcontact on 03-Oct-17 00:24]

--
http://www.emailcontactnumber.co.uk

View » | Reply »

]>
Tue, 03 Oct 2017 05:19:37 GMT http://www.elated.com/forums/topic/4837#post26846
[Website Management] PHP and MYSQLAjax form http://www.elated.com/forums/topic/6382/#post26845 From: Ester


How can I get a value selected from a dynamic drop down list that comes from mysql database?
I want to use that variable for reference.

View » | Reply »

]>
Sun, 01 Oct 2017 18:08:39 GMT http://www.elated.com/forums/topic/6382#post26845
[Authoring and Programming] Separate a string before a number http://www.elated.com/forums/topic/6381/#post26844 From: couriousScript


Hi all! I'm a complete noob, learning JavaScript (didn't specify this in the title, sorry) and I'd appreciate some help. Is there a way I can turn a string that contains numbers, letters, and spaces into an array, or simply slice it into different strings, but do it before the number? For example, if I have such a string "sdfls jfsdkfjh3 58sklf039 5857dfkkjhksjf h", I'd like to "pick out" the numbers only, and get an array of strings with numbers separated from the rest. I realize I can use regular expressions to pick out only numbers, but that just gives me an array of numbers, without everything else.

Thank you!

[Edited by couriousScript on 01-Oct-17 10:31]

View » | Reply »

]>
Sun, 01 Oct 2017 15:30:42 GMT http://www.elated.com/forums/topic/6381#post26844
Re: [Authoring and Programming] Build a CMS in an Afternoon with PHP and MySQL http://www.elated.com/forums/topic/5114/#post26843 From: Alisha


I was going through this tutorial and i found it to be quite understanding and useful. I made some changes to the code as like timezone, db user . But i got simple error with message "Sorry, a problem occurred. Please try later." stated in exception handler of config.php. Will you please let me know what actually went wrong? Please help me figure it out and solve my problem. Thank you in advance.

[Edited by Alisha on 01-Oct-17 09:50]

View » | Reply »

]>
Sun, 01 Oct 2017 14:48:48 GMT http://www.elated.com/forums/topic/5114#post26843
[Authoring and Programming] mail form work but not capatcha http://www.elated.com/forums/topic/6380/#post26842 From: nf24eg


hello, I've a mail form it was working well that when I press the submit, the capatcha window popup, and I receive the email, but after I changed the format the capatcha doesn't work, but i receive the email !!!
so first, I would like to know why the capatcha stopped
my codes is :
Html

Code:
--------------------
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="https://www.google.com/recaptcha/api.js" async="async" defer="defer"></script>
<meta charset="utf-8">
<title>Feedback</title>
<style>
.filedset {
border:2px solid black;
border-radius:10px;
margin-left:50px;
}
.input:focus {
background-color: #FCF5D8;
}
#contact_form{
margin-left:10px;
}
#name{
font-size:16px;
border:1px solid black;
border-radius:10px;
padding: 5px;
}
#email{
font-size:16px;
border:1px solid black;
border-radius:10px;
padding: 5px;
}
#message{
font-size:16px;
border:1px solid black;
border-radius:10px;
padding: 5px;
}
#g-recaptcha {
border-radius:25px;
margin-left:120px;
}
</style>
</head>
<body>
<fieldset style="width:130px" class="filedset">
<legend class="auto-style">
<p><b>Contact us</b></p>
</legend>
<form action="feedback.php" method="post" id="myfbform" accept-charset="UTF-8">
<label for="myname">Name:</label><br />
<input name="fullname" type="text" required class="input" id="myname" value="" size="39" /><br />
<br />
<label for="myemail">Email:</label><br />
<input name="email" type="text" required class="input" id="myemail" value="" size="39" /><br />
<br />
<label for="mycomments">Comments:</label><br />
<textarea name="comments" cols="45" rows="15" required class="input" id="mycomments" placeholder="It's nice to hear from you" /></textarea><br />
<br />
<br />
<p id="my_js_message">
Error: please enable JavaScript and reload this page before using the form.
</p>
<script type="text/javascript">
var my_js_message_block ;
my_js_message_block = document.getElementById( 'my_js_message' );
my_js_message_block.parentNode.removeChild( my_js_message_block );
</script>
<script type="text/javascript">
function my_feedback_onsubmit( token ) { document.getElementById( "myfbform" ).submit() ; }
</script>
<input id="mysubmit" type="submit" class="g-recaptcha" data-sitekey="##########################"
data-callback="my_feedback_onsubmit"
value="Send Feedback" />
<div class="g-recaptcha" data-sitekey="##########################"></div>
</form>
</filedset>
</body>
</html>
--------------------

I've replaced the key with#
Second request, I've made the filed "required" but it doesn't work till the user is done !! I think it one the user press on submit the missed filed should blink in red or so.
Third problem, I don't know where to put the email format validation code.

I hope someone out there can help.
P.S: I liked the presentation of that forum, hope I can find the help which I'm looking for in here

View » | Reply »

]>
Fri, 29 Sep 2017 23:15:05 GMT http://www.elated.com/forums/topic/6380#post26842
Re: [Authoring and Programming] Build a CMS in an Afternoon with PHP and MySQL http://www.elated.com/forums/topic/5114/#post26841 From: mrblond


I've just came across this tutorial and decided to try it.

Well, I downloaded XAMPP and ran the installer.

Then 1. I opened a terminal window via XAMPP which shows this:

Setting environment for using XAMPP for Windows.
44@44-PC c:\xampp
#

I think that 44 is the name of the computer.

in the instructions it is said to past this:
mysql -u username -p

Well, I don't know what "username" means. This is my personal laptop and I don't have neither username nor password.
So I don't know how to open and start:
mysql>create database cms;

Thanks in advance for helping me continue.

[Edited by mrblond on 28-Sep-17 15:28]

View » | Reply »

]>
Thu, 28 Sep 2017 20:26:01 GMT http://www.elated.com/forums/topic/5114#post26841