Why use jQuery when you're only working with Chrome? Either use plain JavaScript or Zepto.js which is a jQuery clone for modern browsers only.
Why use jQuery when you're only working with Chrome? Either use plain JavaScript or Zepto.js which is a jQuery clone for modern browsers only.
Can anyone link me to the stuff I'll need to learn?
Also, I saw this, and thought I could work from its source: https://github.com/cramforce/streamie
Should I?
That would require you to have a node.js server handy
fixed
And what's that?
Node.js is basically a server side implementation of JS
the more i look into making this thing makes it seem the more impossible, more and more stuff appear
Twitter JSON feed: https://twitter.com/status/user_time....json?count=10
You'll need to learn JavaScript. Grab that URL with an Ajax request and then parse it with JSON.parse(), then it's as simple as data[1].user.name + ': ' + data[1].text to display a tweet.
He'll need more than that, if he's making a full blown client he'll need to connect to twitter with oAuth and get more data than just a user timeline (DMs, @ Replies ETC)
I didn't parse the JSON in other projects I've done. Most browser already put it in readable form for JS.
so basically i should just give up
how fast were you planning to make it anyway without any knowledge?
well i was planning on learning the fundamentals for starters
even that seems to be too hard
It's not too hard, but it's also not really easy
Try making a simple timeline viewer first, then move onto a full blown client. You'd only really need a small amount of JS for that (Pull down the data via XMLHTTPRequest and parse it via JSON or such.)
If you get stuck at anything while learning, please feel free to come here and ask us.
How would I go about populating a drop-down list using values from a database as well as values that I enter myself? This is the edit Delivery Address page where the fields are already filled in using the values from the database based on the customer who is logged in.
I want to be able to show the country from the database first in the list and then all other possible countries after it. In the table the country of the customer is United Kingdom. However if I use the example above there is nothing in the drop-down list.Code:<select name="thirdCountryDropdown"> <!-- drop down box to ask for customers country --> <option value="<?= isset($_SESSION['country']) ? $_SESSION['country'] : '' ?>"></option> </select>
Well, first of all, you are using the <option> wrong.
<option value="value you want after submitting">Text value</option>
And to populate the rest of the <select> from a database you run a loop over the values.
Ex:
Edited:Code:$sql = "SELECT * FROM `name` WHERE ID='$id'"; $query = mysql_query($sql); while($result = mysql_fetch_array($query) { echo "<option value='". $result['countryname']. "'>". $result['countryname']."</option>"; }
Basically you left the text value at "", so that's why it didn't show.
Edit: if you look at the source of the page, it should have an <option> with a value in the <select> you created.
Edit 2 (quite late, i know): For more security, scroll a few posts down.
Uh I need a little help with a problem of mine I'm having - I need to make one very long image scroll across the screen and loop. The problem is for a countryside + clouds moving gradually. There's a few possible solutions I've found but none work well on IE which is a must =/
Hey fellas, I never post in here, but I need some help.
I need to make a Web Photo Gallery using Adobe Bridge and incorporate it into a website. However, my schools computers are shite, there are bugs in the system, the program won't run correctly in some instances (buttons don't work, other buttons are actually gone), and I lack the program itself on my computer. Also note that there are no trials available (as far as I know), which sucks.
Is there some way that I can do this without Bridge? I've seen that you can do it with photoshop, but all of the instructions I've found were very minimal.
It would be even better if there was pre-made gallerys that I could just use, but that's been highly wishful. I've checked.
Nobody? :C
SQL injection ahoy.
<?php $pdo = new PDO('mysql:host=localhost;dbname=dbname', 'user', 'password'); $query = $pdo->prepare('SELECT * FROM table_name WHERE id=?'); if( !$query->execute(array($id)) ) echo 'shit broke, yo'; ?> ... <? foreach($query->fetchAll(PDO::FETCH_OBJ) as $country): ?> <option value="<?= $country->name ?>"><?= $country->name ?></option> <? endforeach ?>
Why is Apache ignoring half my directives? I'm using a Debian 6.0 box with LAMP and I'm configuring the server via apache2.conf. It seems to ignore any .htaccess files I use, even if I use
<Directory /var/www>
AllowOverride All
</Directory>
I want to disable script execution in a particular directory, so I looked it up and people suggested using AddHandler cgi {extensions} and then Options -ExecCGI. I can't remember what exactly it was but it didn't work. I've tried everything to stop even just PHP from executing and it's totally ignored by the server. RemoveHandler, AddType text/html php and plenty of other things. This doesn't work in both apache2.conf and .htaccess.
Why is Apache ignoring me?
Edited:
Turns out it's because I don't fully understand how the configuration system works. Last time I used Apache was a while back and I only had the option of editing httpd.conf. Looks like there's a "sites-enabled" folder with a configuration which overrides the prior one and already has directory options in it.
Edited:
.htaccess works now but I still can't disable script execution in this direction. None of the AddHandler tricks work.
Thanks, that could come in handy some time.
He couldn't get the code to work though, and is doing it manually...
Completely retarded question, I feel like I'm overlooking something obvious. I'm just trying to change the look of links in my styles.css. Basically just make it so there's no underline, the text is black, and that it goes bold when you hover over it. This is what I have:
I need to know where exactly to place it in the CSS document, nothing seems to be working. I tried placing it in the specific id, under html, body, and even in desperation put it in *{ } brackets.Code:a:link: color:#000; background-color:#CCC; text-decoration:none; font-weight:none; a:visited: color:#000; background-color:#CCC; text-decoration:none; font-weight:none; a:hover: color:#000; background-color:#CCC; text-decoration:none; font-weight:bold; font-size:100%; a:active: color:#000; background-color:#CCC; text-decoration:none; font-weight:none;
I didn't know you were allowed to specify stuff like that?
I always thought it was something like
etc...Code:a:hover { color:#000; background-color:#CCC; }
Other than that, shouldn't you just give the standard properties to just "a" and then under that, the a:hover, where you put !important behind the "font-weight:bold" property, like so:
Correct me if I'm wrong though, guys.Code:a { color:#000; background-color:#CCC; text-decoration:none; font-weight:none; } a:hover { font-weight:bold !important; }
Code:a:link { color:#000; background-color:#CCC; text-decoration:none; font-weight:none; } a:visited{ color:#000; background-color:#CCC; text-decoration:none; font-weight:none; } a:hover{ color:#000; background-color:#CCC; text-decoration:none; font-weight:bold; font-size:100%; } a:active{ color:#000; background-color:#CCC; text-decoration:none; font-weight:none; }
If you set both layers to be absolutely positioned within a container with overflow: hidden;, you could animate the left properties to slide them left or right.
Looping is an issue, but you'd just have to have the last 100px or so just be copied from the start of the issue (The exact amount required would depend on the width of the browser window)
Is there any possible way to be able to pull a full list of the files that a client is going to download when connecting to a server in Gmod? (That the loading screen page can access, sv_loadingurl)
Another solution is to make a div with the class clouds position it at the top of the page with width: 100% then give it the cloud background with repeat set to repeat-x. Then all you need to do is increase the background position x and then there's no need to reset the loop.
http://jsfiddle.net/5VC5w/
That'd work too.
You could also use CSS Transforms to do it, that gives the benefit of being hardware accelerated in Firefox and Safari. And CSS Animation would give you the same result, without ever having to write any JS.
Edit:
Obviously also use the -webkit- and unprefixed variants too, etc.Code:@-moz-keyframes clouds { from { background-position: 300px 0px; } to { background-position: 0px 0px; } } body { background: url('http://www.webweaver.nu/clipart/img/web/backgrounds/space-sky/cartoon-clouds.jpg') repeat-x; -moz-animation-duration: 3s; -moz-animation-name: clouds; -moz-animation-iteration-count: infinite; -moz-animation-timing-function: linear; }
Nice! I just noticed backgroundPositionX isn't available in Firefox so I've updated my method to work with backgroundPosition. Simple fix.
http://jsfiddle.net/5VC5w/2/
How do I make sure a domain I purchased points to the website on my host.
I always purchased domains at the same time as hosts and both at the same host and it all went pretty much automatically. Client wanted to have a .nl domain and lithium hosting doesn't offer that so I got it at domein-registreren.nl.
Then I purchased shared hosting at lithium with the option "I will use my existing domain and update my nameservers".
I then went to the controlpanel at domein-registreren.nl and changed the nameservers to the ones I got from the host.
I know it takes some time before it works but I'm not sure I did everything I need to do. So did I miss something?
That sounds about right. Make sure you add the domain name to your hosting CP so it sets up a folder for it and everything.
Isn't that automatically? I mean I access cpanel at mydomain.nl/cpanel it would only be logical if it did that.
What kind of a workflow would you suggest for large projects with a few developers? A local test environment for everyone, from which changes are committed to a repository, from which they are uploaded to the production environment?
Get a github organization set up, have everyone work locally on their own forks and merge code to your main repo, have a staging server set up that pulls code from one branch on your main repo that everyone integrates their changes in to and have your production server pull code from a different branch. Set up the production server and staging server so that they are as identical as possible and test the fuck out of everything (preferably automatically) before you merge any changes in the staging branch in to the production branch.
Bonus points if you completely automate your deployment process and your server setup/configuration.
I'm tempted to do that just because a automated setup would be awesome, probablly useful for a couple of my projects too.
Thanks man, appreciated!
I used to try to make websites but that phase died a long time ago. Anyway, I was wondering if any of you know a template I could buy for a website which revolves around voting (Vote up entries, vote down, top 10...) and so on? Any ideas?
Check http://themeforest.net/
I did, I searched vote and rate and I didn't get any things with a vote up/thumbs up system