15,909,953 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by jba1991 (Top 112 by date)
jba1991
7-Jul-15 17:26pm
View
Good one
jba1991
11-May-15 6:30am
View
Any help?
jba1991
10-May-15 7:45am
View
I currently have this value returning using var_dump(json_decode($json, true));
array(4) { ["oauth_token"]=> string(50) "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ["oauth_token_secret"]=> string(45) "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ["user_id"]=> string(10) "123456890" ["screen_name"]=> string(8) "username" }
Is this correct?
jba1991
10-May-15 7:30am
View
json_decode() expects parameter 1 to be string, array given
I am getting this error when using json_decode. I am aware that that json encoded data is in an array, how do I convert this to a string before decoding?
jba1991
10-May-15 7:14am
View
I just read this wrong as json_encode not json_decode, so apologies for that. I've tried json_decode($json) with $json being my json formatted data, but nothing changed.
jba1991
10-May-15 7:02am
View
Deleted
I have already used json_encode to get the data in json format
jba1991
10-May-15 7:02am
View
Deleted
No
jba1991
9-May-15 16:53pm
View
Can anyone help?
jba1991
9-May-15 8:00am
View
I have used json_encode on a variable and echo'd the variable which displays the data on the client side (it is displaying the line of code from the question in the browser).
I just want to be able to get each part of the json encoded data shown in the question and store them into their own variable, so I can echo something like "welcome, $sceen_name" and store it in a PHP session
jba1991
30-Apr-15 10:47am
View
Sorry. I would like to display the value of res from the function in angular img tag but I have tried the following, but honestly, I have no idea how to do this:
<img ng-source="path/to/file/{{artUrl}}"/>
<img src="myFunction()" />
<img src="this.myFunction();" />
jba1991
30-Apr-15 10:35am
View
my problem is display the value of res from the function in a angularJS img tag
jba1991
30-Apr-15 9:15am
View
I have this:
<p id="art">{{album.artUrl}}</p>
<script>
function myFunction() {
var str = document.getElementById("art").innerHTML;
var res = str.replace("-", "/");
document.getElementById("art").innerHTML = res;
}
</script>
What will the img tag look like?
jba1991
29-Apr-15 14:53pm
View
haha nice, that was just simple maths and common sense! I need a coffee! ha thanks
jba1991
29-Apr-15 14:49pm
View
i think t.duration is in milliseconds not seconds
jba1991
29-Apr-15 14:47pm
View
actually, how is time() formatting the result? it doesnt seem correct
jba1991
29-Apr-15 14:45pm
View
that worked :) thanks
jba1991
29-Apr-15 14:31pm
View
SELECT a.albumid as albumid, a.name as name, a.year as year,
g.name as genrename, strftime("%H:%M:%S", sum(t.totaltime), 'unixepoch') as albumduration
FROM album a
JOIN genre g
ON a.genreid=g.genreid
JOIN track t
ON a.albumid=t.albumid
GROUP BY a.albumid, a.name, g.name
ORDER BY a.name
jba1991
29-Apr-15 14:29pm
View
syntax error, unexpected ':'
jba1991
29-Apr-15 14:25pm
View
okay cool. It saying theres a syntax error using :
is there a substitute or can i comment them out or something?
jba1991
29-Apr-15 14:21pm
View
okay and how would i implement this into the sql i already have? do i wrap it in parenthesis?
jba1991
29-Apr-15 14:10pm
View
SELECT strftime('%H-%i-%s', sum(t.duration), 'unixepoch') ??
jba1991
29-Apr-15 13:48pm
View
well SQLite
jba1991
29-Apr-15 13:41pm
View
How could I convert sum(t.duration) into HH:MM:SS from seconds inside SQL? is that possible?
jba1991
29-Apr-15 8:35am
View
Deleted
Actually.. The duration of the album is in seconds, how can i change it to the correct format of HH:MM:SS?
jba1991
29-Apr-15 8:34am
View
Correct as always. Thanks :)
jba1991
29-Apr-15 8:34am
View
Haha no not today :P
jba1991
26-Apr-15 19:16pm
View
Yeah I think that was the case. Thanks again, I was looking in the complete wrong area and would have been for quite a while without your help
jba1991
26-Apr-15 19:09pm
View
Correct! This was in fact the problem, and I only got it working using a absolute file path. Many thanks once again for your help :).
jba1991
26-Apr-15 19:01pm
View
I just checked and in the connection file it is executing the catch and not the try when attempting to connect to the file. So it is a connection problem!
jba1991
26-Apr-15 18:58pm
View
I tried changing the file path for the database and an error was displayed saying it didnt recognise one of the table names so it must have been working
jba1991
26-Apr-15 18:53pm
View
Okay. Does the sqlite reference in the pdoDB.class.php have to have an absolute filepath?
jba1991
26-Apr-15 18:43pm
View
Okay (its fine). Its just saying null again.
jba1991
26-Apr-15 18:38pm
View
it has an undefined variable error for db and the same error as before. Its also showing the word null.
Not the same output as when we last tried var_dump
jba1991
26-Apr-15 18:29pm
View
Could it be down to JSONRecordset returning no results?
jba1991
26-Apr-15 18:23pm
View
No luck with that, although I read the link you provided and it sounds like it should work
jba1991
26-Apr-15 18:17pm
View
It hasnt changed the error :(
jba1991
26-Apr-15 18:15pm
View
That goes in the JSONGRecordSet function?
jba1991
26-Apr-15 17:50pm
View
Hi friend :)
This is my index.php file that passes to recordset:
include_once 'classes/pdoDB.class.php';
include_once 'classes/recordSet.class.php';
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : null;
$subject = isset($_REQUEST['subject']) ? $_REQUEST['subject'] : null;
$id = 'ABC123';
// concat action and subject with uppercase first letter of subject
$route = $action . ucfirst($subject); // eg list course becomes listCourse
$db = Database::getConnection(); // connect to db
header("Content-Type: application/json");
switch ($route) {
case 'listStudents':
$id = $db->quote($id);
$sqlCourseStudents = "SELECT studentid, forename, surname, stage, email
FROM student
WHERE coursecode=$id
ORDER BY surname, forename";
$rs = new JSONRecordSet();
$retval = $rs->getRecordSet($sqlCourseStudents);
echo $retval;
break;
And this is the recordset file:
include_once 'pdoDB.class.php';
abstract class RecordSet {
protected $db;
protected $stmt;
function __construct() {
$this->db = Database::getConnection();
}
function getRecordSet($sql, $params = null) {
if (is_array($params)) {
$this->stmt = $this->db->prepare($sql);
$this->stmt->execute($params);
}
else {
$this->stmt = $this->db->query($sql);
}
return $this->stmt;
}
}
class JSONRecordSet extends RecordSet {
function getRecordSet($sql, $elementName = "ResultSet", $params = null) {
$stmt = parent::getRecordSet($sql, $params);
$recordSet = $stmt->fetchAll(PDO::FETCH_ASSOC);
$nRecords = count($recordSet);
if ($nRecords == 0) {
$status = 'error';
$message = json_encode(array("text" => "No records found"));
$result = '[]';
}
else {
$status = 'ok';
$message = json_encode(array("text" => ""));
$result = json_encode($recordSet);
}
return "{\"status\": \"$status\", \"message\":$message, \"$elementName\" :{\"RowCount\": $nRecords ,\"Result\": $result}}";
}
}
jba1991
21-Apr-15 6:41am
View
how do i implement the keypress and keyup events into the jQuery code?
jba1991
17-Apr-15 7:45am
View
This seems useful.
in this code:
onkeypress="if(this.value.match(/\D/)) this.value=this.value.replace(/\D/g,'')"
onkeyup ="if(this.value.match(/\D/)) this.value=this.value.replace(/\D/g,'')"
which part is only allowing digits? and How can I allow it to accept a dot as well?
jba1991
16-Apr-15 13:49pm
View
Sorry im not very familiar with jQuery yet. But I am using it for client-side validation for a project, I want to prevent the submission of a form if there are invalid characters(all characters except 0-9 and .) in the form input.
jba1991
15-Apr-15 11:12am
View
Ha yeah i already did that and deleted my comment but you saw it :p.
I accepted your solution but I have another question:
How can I add on 7 days when inserting date() in the database (SQLite)?
jba1991
15-Apr-15 11:03am
View
Deleted
Could you tell me the difference between upper case and lower case when formatting a date?
jba1991
15-Apr-15 9:28am
View
Okay I understand what you are saying and it definately gave me an idea in how to solve my problem. I didnt even think of only displaying data after a certain date!
I will ensure (as always) that I will mark the answer as accepted once I have fixed it, but I will wait in case I need to expand my question.
Thanks again
jba1991
15-Apr-15 8:49am
View
Yeah, my database date is DATETIME and is set using default value CURRENT_TIMESTAMP. So can i get the database date (as on object, not as string) and then compare it with getDate() and it should work?
jba1991
15-Apr-15 8:25am
View
Thanks. I want to check it with the database date. Would I use getDate() for the current date and then compare that to the date in the database? Also, is timestamp a string?
Also, to make 10,11 and 12 greater than 2,3,4 etc would I just change ('d-m-y') to ('dd-mm-yyyy')?
jba1991
14-Apr-15 13:26pm
View
Might this be a PHP version problem? Im also having trouble with date_add.
jba1991
14-Apr-15 12:12pm
View
I got it! :). thanks, I think I need to do a bit of research on how to do a count properly cause its caused me so much stress!
Thank again Sascha, youve been great.
jba1991
14-Apr-15 8:19am
View
This is my pagination code so far:
$page = isset($_GET['page']) ? (int)$_GET['page'] : 1;
$perPage = isset($_GET['per-page']) && $_GET['per-page'] <= 20 ? (int)$_GET['per-page'] : 5;
$start = ($page > 1) ? ($page * $perPage) - $perPage : 0;
$replies = $db->prepare("
SELECT SQL_CALC_FOUND_ROWS * FROM replies
WHERE replyThreadID=:replyThreadID LIMIT {$start}, {$perPage}");
$replies->bindParam(':replyThreadID', $ID);
$replies->execute();
$replies = $replies->fetchAll(PDO::FETCH_ASSOC);
$totalQuery = $db->query("SELECT COUNT(*) FROM replies WHERE replyThreadID=:threadID");
$totalQuery->bindParam(':threadID', $ID);
$total = $totalQuery->execute();
echo $total;
And this is the error I get:
PDOException: SQLSTATE[HY000]: General error: 1 near "FROM": syntax error
The error is in the $replies SQL statement
jba1991
14-Apr-15 7:05am
View
Hi. I still cant get this working, Ive tried everything! Did you have a look at the error I was getting?
jba1991
10-Apr-15 10:03am
View
Yes! Good job man, thanks. Why did you have to include[0]? thats something to do with the first array result isnt it?
jba1991
10-Apr-15 9:52am
View
array (size=1)
0 =>
array (size=1)
'UnreadCount' => string '0' (length=1)
What is var_dump? some kind of debugging?
jba1991
10-Apr-15 9:43am
View
I made them changes but its still saying the same thing about an undefined index for UnreadCount
jba1991
10-Apr-15 8:42am
View
Did you find out what the error was?
jba1991
10-Apr-15 8:40am
View
Ive tried that and im getting an undefined index. I must be missing some syntax or something?
$db = Database::getConnection();
$query = 'SELECT Count(*) AS UnreadCount FROM messages WHERE messageTo = :to AND messageRead = 0';
$output = $db->prepare($query);
$output->bindParam(':to', $s_username);
$success = $output->execute();
if ($success){
$results = $output->fetchAll();
$unreads = $results['UnreadCount'];
if (count($unreads) > 0){
the undefined index is on the line where I assign UnreadCount to $unreads
jba1991
9-Apr-15 16:18pm
View
Thanks! that works.
jba1991
9-Apr-15 16:15pm
View
it returns the same results for:
count > 0
count > 1
count < 1
jba1991
9-Apr-15 11:40am
View
array (size=1)
0=>
array (size=2)
'COUNT(*)' => string '0' (length=1)
0 => string '0' (length=1)
jba1991
9-Apr-15 11:37am
View
Hi. Thats exactly what I need. I looked at your SQL fiddle and thats what I want to work. How to I call replyCount and store it into a variable?
jba1991
9-Apr-15 10:43am
View
Yeah. Unless I change it to > 1 instead of > 0. And even if there are records that should be returned, when using > 1, it doesnt show as (new).
jba1991
9-Apr-15 7:42am
View
Did you find anything?
jba1991
9-Apr-15 7:41am
View
Its doing the same as before :(
jba1991
8-Apr-15 9:13am
View
I see! So because it returned true or false it means there was only 1 record which is why the count was saying there was > 0 records, even though (i thought) there wasnt!
Does that mean something like this should work:
$success = $output->execute();
if ($success){
$results = $output->fetchAll();
if (count($results) > 0){
$msg = '<li>
My Messages (new)
</li>';
} else {
$msg = '<li>
My Messages
</li>';
}
}
jba1991
8-Apr-15 8:03am
View
Thanks for the info and the link, it seems that using 2 queries to get the count is a prefered way by most.
For future reference though, I took the braces off and I am now getting this error:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1 near "FROM": syntax error'
jba1991
7-Apr-15 17:31pm
View
anyone?
jba1991
7-Apr-15 7:01am
View
That sounds correct, I just checked out DISTINCT and that should work. Many many thanks for you help!
jba1991
4-Apr-15 16:59pm
View
Yeah it does because it adds a report everytime, rather than adding a count. I am aware I could use multiple tables to do this, but I really just want to use 1. Is there a way of getting round this?
jba1991
4-Apr-15 16:03pm
View
Thanks that worked! I have a follow up:
How can I get just one username instead of the amount in the table? (e.g. user1 having 3 reports in the table shows in the table for the code above 3 times)
jba1991
2-Apr-15 14:34pm
View
Yeah I can and I've just done that. Thanks, I think I need a break!
jba1991
2-Apr-15 13:36pm
View
I tried this:
$reportsQuery = "SELECT COUNT(*) AS countReported FROM reports WHERE reportedUser = :username";
$reportsOutput = $db->prepare($reportsQuery);
$reportsOutput->bindParam(':username', $username);
$success = $reportsOutput->execute();
echo "<td>".$reportsOutput['countReported']."</td>";
but got this Error:
Fatal error: Cannot use object of type PDOStatement as array
jba1991
2-Apr-15 12:42pm
View
I've sorted the time. Thanks.
jba1991
2-Apr-15 12:36pm
View
Is there a way to do this for the time part of a current timestamp?
jba1991
2-Apr-15 12:28pm
View
Ah i understand. thanks!
jba1991
2-Apr-15 11:43am
View
How can I convert the string into a datetime?
jba1991
2-Apr-15 10:41am
View
Thanks for that it seems useful but I'm getting this error:
"Warning: date_format() expects parameter 1 to be DateTimeInterface, string given "
And this is my code:
$posted = $row['auctionPosted'];
$date=$posted;
date_add($date,date_interval_create_from_date_string("7 days"));
$remaining = date_format($date,"Y-m-d");
jba1991
30-Mar-15 12:38pm
View
That is correct... Embarrassing as well! Ha. Thanks
jba1991
27-Mar-15 7:13am
View
I like the sound of the first approach. What do you mean by hidden file? How could I do that?
jba1991
26-Mar-15 14:39pm
View
Well I presume I did it wrong, rather than it not working.
jba1991
26-Mar-15 14:37pm
View
I tried to check if the blank inputs were blank using isset, and if they werent i would make $about the value of $db_about (for example) to be put into the DB but it didnt work.
jba1991
23-Mar-15 18:37pm
View
Thanks :D
jba1991
19-Mar-15 8:22am
View
No, I understand how to do this part, but I mean using the htmlspecialchars part too, or can I just pass each field into a function (seen on the first page of the link you provided) after submitting?
jba1991
19-Mar-15 8:03am
View
Deleted
echo htmlspecialchars($_SERVER["PHP_SELF"]); goes in action***
jba1991
19-Mar-15 8:03am
View
Deleted
Thanks.
<form method="post" action="">
With this, how could I send the information to another page but get the same security measure? PHP_SELF is sending the form information to the same page, but the way I have built my page so far, I would prefer it to be sent elsewhere.
jba1991
16-Mar-15 15:51pm
View
This is what I currently have now after creating a function. However, I am getting an error of an undefined index for the lines $name, $last and $by.
$query = 'SELECT * FROM threads WHERE threadTopic=:topic';
$output = $db->prepare($query);
$results = $output->execute(array(':topic' => $topic));
if (count($results) > 0) {
echo "<table>\n";
echo "<tr><th>$topic</th><th>Replies</th><th>Last activity</th></tr>\n";
if ($results) {
$row = $output -> fetchAll();
$name = $row['threadName'];
$last = $row['lastActive'];
$by = $row['threadBy'];
$rand = rand(000, 999);
echo "<tr>\n";
echo "<td>$name</td>";
echo "<td class=\"text-center\">$rand</td>";
echo "<td class=\"text-center\">$last<br>By:
$by
</td>";
}
echo "</tr>\n";
echo "</table>";
}
}
jba1991
16-Mar-15 15:50pm
View
Deleted
$query = 'SELECT * FROM threads WHERE threadTopic=:topic';
$output = $db->prepare($query);
$results = $output->execute(array(':topic' => $topic));
if (count($results) > 0) {
echo "<table>\n";
echo "<tr><th>$topic</th><th>Replies</th><th>Last activity</th></tr>\n";
if ($results) {
$row = $output -> fetchAll();
$name = $row['threadName'];
$last = $row['lastActive'];
$by = $row['threadBy'];
$rand = rand(000, 999);
echo "<tr>\n";
echo "<td>$name</td>";
echo "<td class=\"text-center\">$rand</td>";
echo "<td class=\"text-center\">$last<br>By:
$by
</td>";
}
echo "</tr>\n";
echo "</table>";
}
}
jba1991
16-Mar-15 10:40am
View
Thanks I'll definately try this. I've used functions before but they always slip my mind.
jba1991
3-Feb-15 7:44am
View
Anyone?
jba1991
14-Jan-15 10:56am
View
Thanks!
Im having another problem that you may be able to help me with.
Currently I have a basic function where the reports table works and contains the userID and the username, each row showing who was reported (ive havent yet added the date created and report text but I will).
On another page (admin page), I want to list all of the users in a table and sort it by the amount of reports a user has in the reports table. I have listed the userID and username from the users table but im unsure how I can connect the amount of reports from the reports table, to the information from the users table.
This is what I have so far:
$db = Database::getConnection();
//select only users with activated accounts to display
$query = 'SELECT * FROM users WHERE activated=1';
$output = $db->query($query);
$results = $output->fetchAll(PDO::FETCH_ASSOC);
if (count($results) > 0) {
echo "<table cellspacing=\"0\">";
echo "<tr><th>UserID</th><th>Username</th><th>Report Count</th></tr>";
foreach($results as $result){
echo "<tr>\n";
echo "<td>$result[userID]</td>";
echo "<td>$result[username]</td>";
//select data from reports page
$displayReports = "SELECT * FROM fh_reports";
$reportCount = $db->prepare($displayReports);
$reportCount->execute();
//display report count next to respective username from above
echo "</tr>\n";
}
}
jba1991
14-Jan-15 9:09am
View
If I create the reports table and have userID and reports as columns, would I join the user table and reports table on userID? Meaning that each report in the reports table will be associated with a userID and from there would I count the amount of rows where userID = XX?
jba1991
14-Jan-15 9:04am
View
Thanks very much Ravi,
Sorry for such a vague question, but I didnt even know what to search Google for so came here.
jba1991
1-Dec-14 11:36am
View
I just looked for the difference between empty and null, using empty will not work for me in this case i dont think.
What if I used "if($loginUser === NULL)"?
jba1991
1-Dec-14 11:23am
View
Would it work if I do "if(empty($loginUser))" and in the else statement execute the code to log in?
jba1991
2-Oct-14 9:07am
View
would you take a look at the code Ive posted in the comments below? I would greatly appreciate your help.
jba1991
1-Oct-14 13:33pm
View
//make a new instance for the person class
$person = new Person("Mike");
$person->setAge(20);
$person->setGender("Male");
echo "<p>my name is ".$person->getName()." and I am a ".$person->type. ", ".$person->getAge()." and I am ".$person->getGender." . I can communicate by".$person->sound."</p>";
This is what I added to the useanimal.php file. I am getting errors "Undefined property: Person::$getGender" which is the echo line from the code above. and this error " Cannot access protected property Person::$sound" on the same line.
jba1991
1-Oct-14 13:30pm
View
abstract class Human{
public $type;
protected $age;
protected $name;
protected $movement;
protected $sound;
protected $gender;
protected function __construct($name = null, $type=null, $movement=null, $sound=null){
$this->setName($name);
$this->gender = $type;
$this->movement = $movement;
$this->sound = "speaking";
}
public function setName( $name ) {
$this->name = $name;
}
public function getName() {
return $this->name;
}
public function setAge( $age ) {
$this->age = $age;
}
public function getAge() {
return "I am {$this->age} years old";
}
public function setGender($gender) {
$this->gender = $gender;
}
public function getGender() {
return $this->gender;
}
}
class Person extends Human {
function __construct( $name = null ) {
/** call the parent constructor rather than re-write it. Notice in the Cat class
* we re-write the constructor - not normally good practice of course to duplicate the code
* I do it in the Cat class just to demonstrate that you can
*/
parent::__construct( $name, 'Person', 'On Foot', 'Speaking' );
}
}
This is what I added to the animal.class.php file.
jba1991
1-Oct-14 13:30pm
View
I have just created a new abstract class for Human. Then I will create a new class which extends Human called Person. I will comment what I have added below.
jba1991
1-Oct-14 12:53pm
View
I need to create a person class the same way a dog class has been created but I am unfamiliar in how to do it. I've tried similar ways to the dog class and the cat class but because it passes different parameters (gender, height instead of movement and sound) i think I am doing it wrong.
These classes arent mine but ive been tasked with understanding how to create a new instance for a person class.
jba1991
7-Jul-14 13:24pm
View
I think you may be right there David, but still no success! I dont have a clue what is going on, I added the condition brackets ({}) for the 'else's' i missed as well but its doing the same thing
jba1991
5-Jul-14 9:07am
View
Okay cool. So where in the code would I put the isset function? does it replace any existing code?
jba1991
23-Jun-14 7:41am
View
Thanks but this doesnt solve the problem that I have.
jba1991
5-Jun-14 12:01pm
View
I cant believe that. Sometimes I think I just shouldn't be doing web you know! Thanks a lot though. :)
jba1991
25-May-14 13:07pm
View
Int(8) with auto increment
jba1991
29-Apr-14 14:49pm
View
Thanks you!
Why doesn't that work in the while?
jba1991
24-Aug-13 14:12pm
View
Ah cool thank you.
As soon as you mentioned a where clause it kind of ticked. Thanks again!
jba1991
23-Aug-13 14:51pm
View
Oh i see. Thanks anyways :)
jba1991
23-Aug-13 12:35pm
View
.toString() and return false are the parts that make the code work?
Thanks a lot :)
jba1991
15-Apr-13 11:00am
View
Thanks.
I think I found the problem, but im not sure that is what caused the error.
I had two different functions doing the same thing, but one had an 'else if' in it.
jba1991
9-Apr-13 8:34am
View
Hi. Here is an example of how you can set the opacity of an element using CSS (the code would go into your CSS file):
divName
{
opacity:0.4;
filter:alpha(opacity=40); /* For IE8 and earlier */
}
0 would be fully transparent and 1 would be fully opaque for the 'opacity' atrribute, and 0/100 would be the same for the filter:alpha attribute
jba1991
8-Apr-13 12:26pm
View
Ah okay cool! :)
jba1991
8-Apr-13 11:53am
View
Thanks!
in your example, what is 'ctrl'?
jba1991
5-Apr-13 15:06pm
View
You got it! thanks! just goes to show how a single character can have you puzzled for hours!!
jba1991
5-Apr-13 13:26pm
View
Hi.
Thanks for your comment but I want to achieve this without using jQuery. I should probably have mentioned that in my post!
And no I haven't used a break-point.
Show More