Everything posted by scaz182
-
JavaScript issue - check if checkbox is checked.
Hi people, I know incredibly little about JavaScript and usually end up hacking together some code to get what I need which often leads me into a brick wall...like this one: I want to change an elements CSS background property based on a checkbox being checked or not. I'm currently using this: <input type="checkbox" name="highlight" value="TRUE" onClick="output('highlight')"/> <span id="highlight">Some text</span> function output(ID) { var text= document.getElementById(ID); text.style.background = '#C39'; } This works in that when the checkbox is clicked the 'Some text' is given a background colour of '#C39'. What I want is it to run the event on change (is there such thing) then check the existing state and change the background colour appropriately. Can anyone help?
-
creating php script for search form
It's not something that can be explained and fully understood in a few minutes but this is the gist: $query = "SELECT field1, field2, field3 FROM table_name WHERE field1 = 'temporary'"; $result = mysql_query($query); $num = mysql_num_rows($result); if ($num > 0) { // print out results using mysql_fetch_array(); } else { // nothing was returned } You would need to dynamically make your query based on user input, and search gets a little more complex as for something like a job search you should really use FULL TEXT search. I reccomend a book, this one is good.
-
creating php script for search form
Do you know how to query a database? If so you will be wanting to look into FULL TEXT indexing within your database and using an appropriate query based on the users inputs. If you don't know how to query a database I'd start with something simpler tbh! Running before you can walk and all that!
-
Tip of the day, clearing floats with the after selector.
This has always puzzled me too, .clearfix is a lifesaver, I use it in most of my sites! I don't know about all older browsers but as stevebrown said IE doesn't have this issue so IE6 is covered.
-
Differnet results in Google - why?
When logged into Google UK you're 10th for me, when logged out you're in fact 9th so both on the first page! I'm in Berkshire so there must be something geographical going on!
-
Differnet results in Google - why?
Perhaps you were using a different version of Google at your friends, i.e. UK vs. US? That or you are logged into Google with your Gmail account which by default uses personalised search based on your history, that's caught me out before!
-
Yey another site idea...
Are you being sarcastic? I really don't think a games and film review site could ever be considered original! This doesn’t necessarily mean it’s a bad idea though!
-
Tranparent image files
It’s therefore likely you’re using IE 6, IE 6 doesn't support PNG transparency.
-
Importing PNG images into Photoshop with transparency?
Man I should really stop being so lazy!, that's helped a lot cheers!
-
Importing PNG images into Photoshop with transparency?
Hi there, I'm having an issue importing transparent PNG images into Photoshop, every time I try to copy an image into Photoshop such as this one it has a black background, is there any way to preserve the transparency? Cheers Rich
-
Taking into consideration browser proportions...
What's worse is many computer users have a gazillion search bars from different providers that they have unwittingly installed, usually through piggy backing on other programs. Although I've never seen anything this bad before:
-
My Portfolio
Yeah all the interface buttons, e.g. in the start menu - 'document', 'pictures', 'music' etc. The shutdown button takes me to Google, users aren't going to be aware of that, from a usability standpoint they will expect it to function as the OS does, even things like having a hover effect on the start menu items and being able to move windows around etc. However like you mention it would be silly / unfeasible to create functionality for them and if you were to take parts of the UI away it would ruin its visual appeal. As I said before info pop-ups / tooltips might help with this, I don’t know really?
-
CSS vertical centring
Awesome, that's done it for me, I wasn't aware floated elements stop the height of its container from being calculated! Thanks very much for you help!!
-
healthcare company site
Yeah I think it's a nice looking site, although I’d throw in a little more padding around your textual content, it looks unnecessarily cramp in places!
-
My Portfolio
I'm not a big fan of flash sites but I think it's quite cool! Although usability might be a bit of an issue as you have all the vista user interface but only a parts of it work...not that I would expect a website to have a fully functional OS interface it's just you're giving people buttons that don't do anything! Although as you say, you're going to provide info pop-ups which might help with this. Still, nice concept.
-
CSS vertical centring
It would be better if I could get the image in the HTML as a) it's not a layout image and b)it'll be dynamically outputted, I imagine I could use inline CSS (as that's still in the HTML so it can easily be pulled from a database) but as you've already mentioned that's not good practice. I have tried this and it doesn't seem to work for me, perhaps as you say it's because I've using floated content! I've somewhat realised my problem is a little odd without me giving you a bit more context: I basically have two columns within a DIV, the left column has variable textual content so the containing DIV has an unknown height, this column is floated left so the image below it becomes a second column on the right. so: <div id="container"> <div id="left_column"> <p>Variable textual content</p> </div> <img src="image.jpg" /> </div> Thinking about it this might help explain what I mean, the first one is where I'm at, the second is where I want to be:
-
CSS vertical centring
Doesn't that require me to know the size of the div? That's the issue I'm having; I know the size of the image but the size of the containing div varies!
- Count to 1 million
-
CSS vertical centring
That would be a logical way to do it as it works with horizontal centring but unfortunately vertical centring doesn't work that way!
-
CSS vertical centring
Hi all, I'm sure there is already a thread regarding vertical centring but I can't seem to find it! I need to vertically centre an image inside a div. I know the size of the image but not the div. so: <div id="var_size"> <img src="images/img_1.jpg" width="400" height="210" alt="image_1" /> </div> Can anyone help?
-
What do SEO marketers actually do?
Okay thanks for the information, I'm aware of on-site SEO techniques it’s the marketing side I was interesting in, but your comments have helped clear up some of my confusion, cheers. Yes, this is true, I do in fact have a head like a f***ing orange!
-
submit form once file has been selected
Hope you don't mind if I bump this up, I still haven't found a solution!
-
What do SEO marketers actually do?
Okay thanks for your thoughts, oddly enough a client of mine has used MatchMakerMarketing, given nine (relatively similar) key phrases and is now at least on the first page for all of them! It's a driving school website and I think the client has been using these guys for maybe a year or so but I believe he saw results within a matter of months. They don't play with the site (as I was asked to make some content updates the other day) but they have managed to get the site a good ranking, do you think this is just link building and sticking them in directories etc.?
-
What do SEO marketers actually do?
...okay but what does that mean, I'm pretty certain Google Matchmaker doesn’t have access to the site so they don't play with keywords in the copy content etc., what is it they do?
-
I Got My 1st Web Desigb Job!
Well done, recession and all! What company?