|
Which ones? There is really no point in posting such vague details. If you want help with a proper question then please provide proper details.
|
|
|
|
|
Hi,
I have been developing a web application which is now a just a basic website coded in html/css/js. I will be shifting it to Rails platform (so I won't really need to implement this answer I am looking for in the long term). Like in Rails (or any other back-end coding platform), we can just define the layout (or template as some may prefer calling it) in one view file and write the other views separately. I was wondering if the same is possible without a working back-end.
Thanks for any help in advance.
Cheers,
Ritwesh
|
|
|
|
|
The Situation
I am displaying data from MYSQL database into a HTML table on a web page.
I am using CSS to display alternative rows in different text size and background colours.
I am using the 'hover' function to change background colours and text size
The Problem
The 'hover' function works perfectly for the 'odd; rows however for the 'even' rows it will change the text size but not the background colour
My CSS code
table tbody tr:nth-child(odd) td {
background-color: lightblue;
}
.table tbody tr:nth-child(even) td {
background-color: lightgreen;
}
table tbody tr:hover td {
background-color: white;
transition: all .5s;
font-weight:normal;
font-size: 2.5em;
color: black;
border-right: 1px solid grey;
}
Solution:
Can anyone spot the problem?
|
|
|
|
|
Works fine for me in Firefox, Chrome, Edge, and IE11: Demo[^]
The only slight issue is that the changing text size makes it very difficult to hover the next row accurately; as soon as the mouse leaves one row, its text size decreases, and the other rows shift up. It's easier to move in and out of the cells from the side.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks for giving me some assistance.
I have no idea why I had the problem but when I closed the browser cleared the cache and open it, it worked fine for me also.
Clearing the Cache while open made no difference.
Padding around the cells removes the issues you correctly identified on mouse over
Thanks again
|
|
|
|
|
If you don't, already, when refreshing a page under development, use Ctl=F5 (at least in firefox) to force reload without the cache. There are also methods to add a header that forces uncached reloads for all - which at times can be handy.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
OzWaz wrote:
.table tbody tr:nth-child(even) td { Do you really want that leading "." ?
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Yes. I think so?
I have a number of tables on the one page and I only want the styling to apply to only one table.
If i dont use the "class" option I found that it applies the styles to 'ALL' the tables
Thanks you for taking the time to respond
|
|
|
|
|
OzWaz wrote: If i dont use the "class" option I found that it applies the styles to 'ALL' the tables In which case, you might be missing the "." in the other two rules. It was the inconsistency I picked up on.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Thanks -Sharp eyes
But the missing "." in both cases was a poor C&P effort by me.
and interestingly noting should have worked - if the code was so flawed - I am increasingly amazed how browser development is progress in holding on to code when it ought to relinquish it - But that the future.
As you will see the problem is solved but the mystery remains!
Nice that you engaged in assessing my problem
Thanks
|
|
|
|
|
how can I call a function on a function from an object like this:
object.function().function();
it does not work ... that’s my code:
var doc = null;
var j = {
get : function (id){
doc = document.getElementById(id);
console.log(doc);
},
text : function (text){
doc.value = text;
}
}
and I want to call the functions like this then:
j.get(‘input-field’).text(‘hello’);
but it does not work
pls help
|
|
|
|
|
Use a closure:
var j = {
get: function(id){
var element = document.getElementById(id);
console.debug("Get", id, element);
return {
text: function(text){
console.debug("Text", id, element, text);
element.value = text;
}
};
}
};
Demo[^]
Closures - JavaScript | MDN[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
hi friends:
when i use online sitemap generator [DELETED] my website pages aren't crawled and just main page is crawled?
do you know where is the problem?
my website address is : [DELETED]
my website is an advertisement website and when a user enter to it for the first time he should select his city and according to his city, appropriate advertisement will be shown to him
is the current problem related to this issue?
|
|
|
|
|
Links removed: too much like site driving (hence why it was sent to moderation).
Linking to an advertising site? It's only that you have been here four years that saved your account...
Please don't do that again.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
thanks for your advise.
does anybody have a suggestion to solve my problem?
|
|
|
|
|
Instead of generating random sitemaps, try making one xml file on your own for the website and then upload it on your webmaster account. How many pages do you have on your website?
https://www.buyassignmentservice.com
|
|
|
|
|
Generating random sitemaps have its own benefits. For Example, a new sitemaps will help Google to understand that this is a news website and it has to be crawled on regular basis may be in an hour to get the latest news updates.
Similarly, an image sitemap would have all the images present in it which increases the crawl rate of images.
So it's no harm if you are having multiple sitemaps. The most important thing is that you are sending notification to Google about your website pages, images and other things.
|
|
|
|
|
<pre lang="HTML"><HTML xmlns=3D"http://www.w3.org/1999/xhtml"><HEAD><TITLE>Untitled =
Page</TITLE>
<META content=3D"text/html; charset=3Dutf-8" http-equiv=3DContent-Type>
<META name=3DGENERATOR content=3D"MSHTML 8.00.6001.23588"></HEAD>
<BODY>
<FIELDSET title=3D"Html Editor:" =
contentEditable=3Dtrue></FIELDSET></BODY></HTML></pre>
|
|
|
|
|
Since you don't really tell us anything about what you want to fill it with and where it's coming from, perhaps all you need to do is type something between the opening and closing tags!
Or, you could do a bit of study, here[^].
If you haven't yet learned HTML, drop what you're doing and start their free tutorial, instead.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
|
my idea is to feed all important days in it and the website shows upcoming important day.how can I start this or is there any script for it?
|
|
|
|
|
What have you tried?
Where are you stuck?
What help do you need?
Have you tried looking at existing examples, like Google Calendar?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
You should really read the articles on the following website before re-inventing the wheel.
tps:
|
|
|
|
|
My Project on office365 I want the email field to automatically get current email and password from the browser. my code is this and it not working
<input value="<?=$_GET[loginid]?>" autocomplete="on" name="email" id="email" placeholder="Enter work or school email" type="email" autofocus required pattern="[^ @]*@[^ @]*" /><br>
|
|
|
|
|
Hi I get an error as below
Fatal error: Uncaught Error: Call to a member function prepare() on null in C:\xampp\htdocs\crm_ppp\public_html\includes\user.php:24 Stack trace: #0 C:\xampp\htdocs\crm_ppp\public_html\includes\user.php(37): User->emailExists('david@jait.co.z...') #1 C:\xampp\htdocs\crm_ppp\public_html\includes\user.php(58): User->createUserAccount('David', 'david@jait.co.z...', 'TheITGuy001', 'Admin') #2 {main} thrown in C:\xampp\htdocs\crm_ppp\public_html\includes\user.php on line 24
code:
<?php
class User{
private $con;
private $user;
function _construct()
{
include_once("../database/db.php");
$db = new Database();
$this->con = $db->connect();
}
function emailExists($email){
$pre_stmt = $this->con->prepare("SELECT id FROM user WHERE email= ?");
$pre_stmt->bind_param("s", $email);
$pre_stmt->execute() or die($this->con->error);
$result = $pre_stmt->get_result();
if($result->num_rows > 0){
return 1;
}else{
return 0;
}
}
function createUserAccount($username, $email, $password, $usertype){
if($this->emailExists($email)){
return "EMAIL_ALREADY_EXISTS";
}else{
$pass_hash = paswword_hash($password,PASSWORD_BCRYPT,["cost"=>8]);
$date = date("Y-m-d");
$notes = "";
$pre_stmt = $this->con->prepare("INSERT INTO <code>user</code>( <code>username</code>, <code>email</code>, <code>password</code>, <code>usertype</code>, <code>register_date</code>, <code>last_login</code>, <code>notes</code>) VALUES (?,?,?,?,?,?,?)");
$pre_stmt->bind_param('sssssss',$username,$email,$pass_hash,$usertype,$date,$date,$notes);
$result = $pre_stmt->execute() or die($this->con->error);
if($result){
return $this->con->insert_id;
}else{
return "SOME_ERROR";
}
}
}
}
$user = new User();
$user->createUserAccount("David","david@jait.co.za","TheITGuy001","Admin");
?>
Anyone have any ideas
|
|
|
|