Everything posted by djitsz
-
How to point a Domain to localhost?
I assume you want to configure your local PC running apache to link text.com to your localhost machine (which would only affect your local machine, i.e., any one else accessing text.com would not be pointed to your localhost). To do this you need two things: Edit the "host" file in "c:\windows\system32\drivers\etc\" and add the following line: 127.0.0.1 text.com Secondly, edit the file "httpd-vhosts.conf" in "c:\xampp\apache\conf\extra\" and add the following lines: <VirtualHost *:80> DocumentRoot "C:/xampp/htdocs/[folder name for your document root]" ServerName text.com:80 </VirtualHost> Then restart your web server and when you now go to text.com in your browser it will point to the document root on your localhost.
-
JS with Contact Form...
You can add the additional dropdown menus to the form but hide them with "display: none". Then using jQuery you can show the relevant dropdown menu based on what the user selects from the first dropdown menu. <select id="some-menu"> <option value="search engine">Search engine</option> <option value="something else">Something else</option> </select> <select id="search-engine-menu" style="display:none"> <option value="google">Google</option> <option value="yahoo">Yahoo</option> <option value="bing">Bing</option> </select> <select id="something-else-menu" style="display:none"> <option value="first item">First item</option> <option value="second item">Second item</option> </select> Then add the JavaScript: $('#some-menu').on('change',function(e) { if($(this).val() == 'search engine') $('#search-engine-menu').show(); else $('#search-engine-menu').hide(); if($(this).val() == 'something else') $('#something-else-menu').show(); else $('#something-else-menu').hide(); }); For this to work you'll need to load the jquery library in your page (http://jquery.com/).
-
Hack / Break / SQLInject / Do what ever you can to my website
I assume from this that you are using cookies to track failed login attempts. You shouldn't depend on using cookies to track failed logins as brute force login attempts tend to work using scripts and these do not normally send cookies. One way to do this right is to keep a database table of failed login attempts. You can then query this database table for the number of failed login attempts for the attempted username made within the past 30 minutes and only process the request if the number is fewer than 10.
-
CSS HELP
For the wavy line you will need to create a .png or .gif image with the wavy line and a transparent background. You can then add this line to an element using the css background-image property. For overlapping elements like the two white boxes you would need to use absolute positioning and z-index. For instance <div style="position: absolute; z-index: 1; top: 0; left: 0; width: 100px; height: 100px; border: 1px solid white;">Some content for box 1</div> <div style="position: absolute; z-index: 2; top: 20px; left: 20px; width: 100px; height: 100px; border: 1px solid white;">Some content for box 2</div> Good luck!
-
The legal and correct approach to e-newsletter subscriptions?
I think this is known as a soft opt-in and it is legal as long as the individual had an opportunity to opt out at the time their contact details were provided They don';t need to have requested them as long as they've had a chance to opt out Best practice is to only send email marketing to individuals who specifically opted in, but it is legal to send marketing as long as they had the option to opt-out. See: http://ico.org.uk/for_organisations/sector_guides/marketing http://www.seqlegal.com/blog/10-things-you-should-know-about-email-marketing
-
Warning: mysql_num_rows() expects parameter 1 to be resource
If there is an error then mysql_query returns false rather than a results set which was the case here. It is best to always check the result of mysql_query and handling the error if the result is false rather than assume that the query executed without problems. Any reason why you're not using mysqli (mysql improved) rather than mysql functions? Also, storing passwords unencrypted in a database is not generally a good idea. I would always use SHA1 (or MD5) to encrypt the passwords before you store them in the database and then compare the SHA1-ed password against the value in the database. It's considered best practice in web application security.
-
Need code to add simple registration form
I assume that you are using some sort of scripting language like PHP to process the form? You'll need this if you want to email the form fields to an email address and show a popup on successful submission of the form. If you are indeed using PHP, you will need to check $_POST for the submitted form values (i.e., $_POST['first-name'], $_POST['last-name'] and $_POST['email'], if first-name, last-name and email are the names of the fields as set in the HTML of the form). You will then need to use for instance PHP's built-in mail() function to send these values to your email address. See http://uk1.php.net/manual/en/function.mail.php. If the script finds the $_POST values, you will need to make sure the script adds the HTML code for the popup window to the outputted page. If you're not using a scripting language like PHP and coded the site only in HTML you have a problem. You would then only be able to send the email by defining your form as follows: <form action="MAILTO:someone@example.com" method="post" enctype="text/plain"> However, this means that the user will need to have an email client (like Outlook Express) installed on their device (which many users won't have) for this to work.
-
Coding a Facebook Wall / Feed type script. A question of best methods, efficiency and scaling.
Creating feed tables for each user would be very bad as you are duplicating a lot of content in your database (i.e., if one user adds a new post this would need to be written to the feeds of each user who should see this post). You would also not query all the tables together in one query unless these tables represent entities which are linked (such as a Post and a User). Joining tables which are not linked in this way creates a Cartesian product of all these tables (i.e., combining all elements from one table with all elements from another table) which leads to huge results with lots of duplicate content. You would need to write separate queries for each type of content to be included in the feed, i.e., "SELECT * from `articles` where `articles`.`category` in ( );", "SELECT * from `posts` where `post`.`userID` in ();" etc. You then use whatever scripting language you use to present the results from these different queries in whatever way you see fit.
-
Do you like illustrations?
Looks good! voted.
-
Save my sanity! jquery validation.
The browser is not actually loading your script because it is preceded by a self-closing script tag. You should use <script></script> rather than <script />. If you change: <script src = "http://code.jquery.com/jquery-1.11.0.min.js" /> <script type = "text/javascript" src = "validation.js"></script> To <script src = "http://code.jquery.com/jquery-1.11.0.min.js"></script> <script type = "text/javascript" src = "validation.js"></script> It should load your script and hopefully work. Good luck!
-
Critique My Design
Very nice design. I like the shades of green used and love the font!
-
Form Validation
Hi Julian, I'm afraid that you'll have to post some code for us to be able to see what you mean. Note that JavaScript validation should always happen on top of (rather than instead of) server-side PHP validation as it can easily be bypassed (for instance if the user does not have JS activated). Also, when you say "name field is not validated", what do you mean by that? What kind of validation does it require? Post some code from your form submission PHP script. Jitse
-
How to make fixed banner effect?
Could you post a link to one or a few of the sites that use this? I'm not sure exactly what effect you're referring to...
-
Quick Review
I think overall the design is pretty decent. I found the front page a bit chaotic with the various coloured boxes which show images / text on hover. It does not come right to the point of what it is you do and their purpose was a bit lost on me. On the "strategy" page, the following text appears twice: "Find where people discuss what you do – and voice the problems you solve. Starting out, you can't hit every network and outlet full-force. Locate your core customers, and prioritize your efforts to reach them where they are." Overall there is a lot of text on most pages. I would keep it all a bit snappier and more to-the-point as most visitors are probably not going to read bucket loads of text. Jitse
-
Website visit monitor
There's also StatCounter which provides you with raw access stats.
-
Center menu
Even after you added the CSS code I suggested? What browser + version do you run on your laptop?
-
Center menu
Add the following CSS: #menu:after { content:""; display:table; } #menu:after { clear:both; } Then add the following CSS to #menu: clear:both; This should place the menu on a separate line rather than after the left-floated elements. Best Jitse
-
Table Font Issues
Try to open your page in Chrome and open the Developer Tools (Ctrl+Shift+I or under Menu->Tools->Developer Tools). Then right-click on the table cell with text and select 'Inspect Element'. On the right-hand side of the developer tools you can trace the CSS so check which rule is determining the font for the table cells. Good luck Jitse
-
My New Design - mention - JPG
Hi I think overall the design is good although the alignment of the "phone us", "email us", "get a quote" boxes doesn't really work, especially with "our services" hanging on the right side. Why not left-align the three boxes on the left side using 2/3rds of the width of the page and "our services" right of that filling the remaining 1/3rd. I agree with Jane that it is counter intuitive to have "develop" before "design" as it implies that you start building something before you have thought about what it will look like (reinforced by the cog icon which implies a focus on the inner workings of the implementation of the design). Jitse
-
Need your suggestions
Hi Arianna I think it would work well for tablets and other touch screen devices but I find the scrolling interface (especially horizontal scrolling) not very intuitive for desktops or laptops. I think it is a bit too "different" from how users expect to interact with a website and although being different can be an advantage, I think something too different will actually put users off. The website also feels very "busy" with lots of content crowding the screen. Try to add a bit more white space so that everything can breathe. Best Jitse
-
Tab Accordion Responsive web design
This should be relatively simple to achieve with jQuery by detecting the width of the browser window and showing the content in a different place depending on this width. Using a mobile-first approach is generally preferable so you would probably want to use a simple unordered list something like below and then use jQuery to show the content right of the menu for non-mobile devices: <div id="menu"> <ul> <li> <a href="#">Menu 1</a> <div class="hidden">Content for menu item 1</div> </li> <li> <a href="#">Menu 2</a> <div class="hidden">Content for menu item 2</div> </li> ...etc </ul> </div> <div id="content-pane"> </div> You would then use a CSS media query to manage the layout of the page, hiding hiding the content pane for mobiles and showing it floated next to the menu on desktops: .hidden { display:none; } #content-pane { display: none; /*Hide the content pane on mobile devices*/ } @media (min-width: 768px) { #menu { float: left; width: 33.33333%; } #content-pane { display:block; /*show the content pane on desktop devices and float it next to the menu */ float: left; width:66.66666%; } } Then you can use jQuery to show the content on in the right place when a menu item is clicked: $('#menu li').on('click',function(e){ /* Toggle the content of the menu item using a sliding motion on mobile devices */ if($(window).width() < 768) $(this).find('.hidden').slideToggle(); /* Copy the content to the right-side pane for none-mobile devices */ else { $('#content-pane').empty(); $(this).find('.hidden').clone().appendTo('#content-pane'); } }); You'd probably want to polish the (untested) code a bit but this is the general idea of one way to do this. Best wishes Jitse
-
How can I convert a Joomla website to a html Website
Hi weballtheway, All joomla websites are already HTML websites as Joomla is a content management system which generates HTML pages. Depending on the size of the site, you could simply save each individual page as HTML using your browser in a new directory. Once you've saved all pages, you would then need to check all the links within each page to make sure it points to the saved HTML page rather than the joomla dynamically generated page. However, as the site appears to be a ecommerce site, you would lose all functionality for managing the shopping cart and buying products as this depends on the Joomla back-end to function. I assume that your client would not want to lose this functionality. Do you know why they want to convert a dynamic content managed site in Joomla to a simple static site in HTML? I can't think of many reasons why one would want to do this as it makes maintaining the site so much harder and doesn't have many benefits. Depending on why they want HTML there might be a better solution out there. Best Jitse
-
Hii Guys
Impressive work James, I like your website. What language / framework did you use to build it? Best Jitse
-
Hello from another newbie
Hi all, My name is Jitse. I'm a big fan of web design but not a big fan of my day job so I'm working on getting my own web design agency off the ground, for which I have just recently finished the website (http://www.quantumfrog.co.uk). I love playing around in PHP, JavaScript, MySQL, HTML5 and Adobe Illustrator. I'm also interested in online communities. A while back I tried to build a community website (http://www.communities-of-practice.co.uk) but without much success so far. Looking forward to taking part in the various forums here. Best wishes Jitse