• Questions That Don't Need Their Own Thread v3
    4,068 replies, posted
  • [QUOTE=joyenusi;35784789] Now, why doesn't it work ? I've been going at this all day and could really use someone else's insight.[/QUOTE] Since #wrapper already has background-color set you need to use !important like this: [code] .red_wrapper { background-color: #ff0000 !important; } [/code]
  • Ahh, cheers :) I have another quick question though, I have three buttons, one for red, one for green and one for blue, it seems adding the !important tag only allows me to change the colour once... Is there anyway to switch between colours ?
  • [QUOTE=joyenusi;35785369]Ahh, cheers :) I have another quick question though, I have three buttons, one for red, one for green and one for blue, it seems adding the !important tag only allows me to change the colour once... Is there anyway to switch between colours ?[/QUOTE] Have a look at this [url]http://jsfiddle.net/vHqwY/[/url]
  • [QUOTE=hacksore;35785629]Have a look at this [url]http://jsfiddle.net/vHqwY/[/url][/QUOTE] Is the only change that all the rules have the !important tag ? because I did try that and it seemed to have no effect before...
  • [QUOTE=joyenusi;35786013]Is the only change that all the rules have the !important tag ? because I did try that and it seemed to have no effect before...[/QUOTE] Previously you only had the red click function so I added in the missing two, a long with the corresponding style declarations.
  • There is no need for !important here... just that ID takes precedence over classes, this here works: [url]http://jsfiddle.net/B2wuF/1/[/url]
  • [QUOTE=commander204;35786671]There is no need for !important here... just that ID takes precedence over classes, this here works: [url]http://jsfiddle.net/B2wuF/1/[/url][/QUOTE] Either way works fine, but yes I do agree with the method you suggested.
  • I'm planning on making a Twitter client for Chrome, but I don't know HTML, CSS or Javascript, which makes it a big challenge. Since Chrome's extensions are HTML pages, basically, I'm looking into making a basic HTML twitter reader / poster and styling it with CSS to make it look like my [URL="http://i.minus.com/imrBVqAw2ZrSO.png"]mockup[/URL]. Does anyone have experience with this stuff? How should I approach this?
  • [QUOTE=Oicani Gonzales;35798218]I'm planning on making a Twitter client for Chrome, but I don't know HTML, CSS or Javascript, which makes it a big challenge. Since Chrome's extensions are HTML pages, basically, I'm looking into making a basic HTML twitter reader / poster and styling it with CSS to make it look like my [URL="http://i.minus.com/imrBVqAw2ZrSO.png"]mockup[/URL]. Does anyone have experience with this stuff? How should I approach this?[/QUOTE] Look for tutorials! :D [url]http://www.facepunch.com/threads/1165950[/url]
  • [QUOTE=Oicani Gonzales;35798218]I'm planning on making a Twitter client for Chrome, but I don't know HTML, CSS or Javascript, which makes it a big challenge. Since Chrome's extensions are HTML pages, basically, I'm looking into making a basic HTML twitter reader / poster and styling it with CSS to make it look like my [URL="http://i.minus.com/imrBVqAw2ZrSO.png"]mockup[/URL]. Does anyone have experience with this stuff? How should I approach this?[/QUOTE] The first thing you'll want to look in to is the Twitter API and Javascript, since HTML alone won't be able to dynamically grab the tweets for you. jQuery has some fantastic Ajax functions that can get you on your way
  • 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: [url]https://github.com/cramforce/streamie[/url] Should I?
  • [QUOTE=Oicani Gonzales;35798975]Can anyone link me to the stuff I'll need to learn? Also, I saw this, and thought I could work from its source: [url]https://github.com/cramforce/streamie[/url] Should I?[/QUOTE] That would require you to have a node.js server handy
  • [QUOTE=douche beat;35799109]That would require you to have a node.js server handy[/QUOTE] And what's that?
  • the more i look into making this thing makes it seem the more impossible, more and more stuff appear
  • [QUOTE=Oicani Gonzales;35798218]I'm planning on making a Twitter client for Chrome, but I don't know HTML, CSS or Javascript, which makes it a big challenge. Since Chrome's extensions are HTML pages, basically, I'm looking into making a basic HTML twitter reader / poster and styling it with CSS to make it look like my [URL="http://i.minus.com/imrBVqAw2ZrSO.png"]mockup[/URL]. Does anyone have experience with this stuff? How should I approach this?[/QUOTE] Twitter JSON feed: [url]https://twitter.com/status/user_timeline/Jaybuz_.json?count=10[/url] 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.
  • [QUOTE=jaybuz;35800787]Twitter JSON feed: [url]https://twitter.com/status/user_timeline/Jaybuz_.json?count=10[/url] 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.[/QUOTE] 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)
  • [QUOTE=jaybuz;35800787]Twitter JSON feed: [url]https://twitter.com/status/user_timeline/Jaybuz_.json?count=10[/url] 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.[/QUOTE] I didn't parse the JSON in other projects I've done. Most browser already put it in readable form for JS.
  • [QUOTE=Oicani Gonzales;35802396]so basically i should just give up[/QUOTE] 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 :v: 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.)
  • [QUOTE=Oicani Gonzales;35802534]well i was planning on learning the fundamentals for starters even that seems to be too hard[/QUOTE] 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. [CODE] <select name="thirdCountryDropdown"> <!-- drop down box to ask for customers country --> <option value="<?= isset($_SESSION['country']) ? $_SESSION['country'] : '' ?>"></option> </select> [/CODE] 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.
  • [QUOTE=Gibo990;35807652]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. [CODE] <select name="thirdCountryDropdown"> <!-- drop down box to ask for customers country --> <option value="<?= isset($_SESSION['country']) ? $_SESSION['country'] : '' ?>"></option> </select> [/CODE] 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.[/QUOTE] 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: [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>"; } [/code] [editline]3rd May 2012[/editline] 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
  • [QUOTE=eternalflamez;35807753]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: [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>"; } [/code] [editline]3rd May 2012[/editline] 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.[/QUOTE] SQL injection ahoy. [php] <?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 ?> [/php]