Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

djadejones

Members
  • Joined

  • Last visited

  1. Hi I have been asked to take a HTML website and develop a Wordpress theme out of it. The website uses SmoothScroll so when a button in the footer is clicked, it scrolls nicely to the top of the page. Except now it is in Wordpress, I click the button and it just reloads the page at siteurl.com/#about The jquery in the .js include (as well as a smoothscroll.js include) was: $(function() { 'use strict'; $('.scroll').bind('click', function(event) { var $anchor = $(this); var headerH = $('#navigation').outerHeight(); $('html, body').stop().animate({ scrollTop : $($anchor.attr('href')).offset().top - headerH + "px" }, 1200, 'easeInOutExpo'); event.preventDefault(); }); }); And i changed this to put in non-conflict: jQuery(document).ready(function( $ ) { $(function() { 'use strict'; $('.scroll').bind('click', function(event) { var $anchor = $(this); var headerH = $('#navigation').outerHeight(); $('html, body').stop().animate({ scrollTop : $($anchor.attr('href')).offset().top - headerH + "px" }, 1200, 'easeInOutExpo'); event.preventDefault(); }); }); }); There are also a couple of other jquery effects that aren't working but jquery is working because some things are ie. toggle to display map etc.. Any suggestions? Could it just be the way it is loading the URL with the slash in between? Thanks.
  2. Have just downloaded and looked at the original header.php file and there is no extra character that I can see, line 1 character 1 is the opening <
  3. here you go: http://tinyurl.com/bvofg9t sorted the main content centering problem but other elements wont center properly either, ive never had this issue before, but even my unordered list in my header, ive had a width and margin: 0 auto on the UL and also tried it on the div around it but just wont center!!!
  4.    djadejones reacted to a post in a topic: Centering problem in IE
  5. Lyndsey: Thats exactly what I do, div id="wrapper" and #wrapper has {width: 1000px; margin: 0 auto;} but for some reason this time, this hasnt worked. Tex0gen: Prefer not to use text-align: center as I dont want text to be centered but in the past I have made 2 wrappers, set the outer to text-align: center; to center the whole lot and then the inner back to text-align: left; This has worked to center content before, but again, not this time. Very puzzling.
  6. I have had this problem before, I develop my sites in Firefox and then adapt to look right cross browsers, and this time I am having a problem with my 1000px width wrapper centering in IE. Looks fine in FF and Opera, so created ie.css and added an if IE conditional tag, put an extra wrapper round all content and in ie.css i added #iefix {text-align: center;} and then put text-align left on my inner wrapper. This isnt ideal but has worked in the past, not this time! I have also once has this problem because of my Doctype but i am using the same Doctype I have used alot recently: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Any help please
  7. Cheers andy, works a charm.
  8. djadejones posted a topic in Frontend
    I am trying to get a banner to disappear when the close is clicked so using the jQuery toggle for this, I have the toggle working on another site but wont work for me this time and I am not sure if it is because the link to click for closing the banner is inside the div to be hidden this time. Heres what I have: <script> $(document).ready(function(){ $("#close").click(function(){ $("#banner").toggle('slow'); }); }); </script> <div id="banner"> <a href="#">This is a bit of advertising text!</a> <p id="close">x</p> </div> Thanks
  9. Hi, thanks for your reply. I have now got the form fully working but I have a few other little queries. On displaying the form, it looks absolutely fine and when submitted correctly, the thank you message is also fine, but if a duplicate email address is entered and the error message displays, it cannot be read because my white background does not show and it is as if the script has just stopped loading, there is no footer, only header and black text with the error. It is this bit that generates the error: //Select was OK - did it return anything? $rows = mysql_num_rows( $result ); // if a row was found, the email has already been used. if ($rows > 0) { die("You have already registered with that e-mail address. Please click back on your browser to go back and try again."); // *****should Redisplay the page with error..... } You can see my form at: http://tinyurl.com/7qh263p
  10. I am currently working on a registration form for my site. On submit, it runs through a script, which is as follows: <?php if ($_POST) { // Yes it has been Posted.....and should be full of data from the form // Need to Validate the data HERE // $firstname=$_POST['firstname']; $surname=$_POST['surname']; $gender=$_POST['gender']; $email=$_POST['email']; $contact=$_POST['contact']; $gmc=$_POST['gmc']; $quals=$_POST['quals']; $region=$_POST['region']; $system=$_POST['system']; $confirm=$_POST['confirm']; // Check if the Email has been used before $query = "SELECT * FROM Locums where email = '$email'"; $result = mysql_query($query); // If Error with the Select..... if (!$result) { echo "Could not access Table"; die( print_r( mysql_error(),true)); } //Select was OK - did it return anything? $rows = mysql_num_rows( $result ); if ($rows === true) { die("You have already registered with that e-mail address."); // *****should Redisplay the page with error..... } // Nothing returned so OK to create this record in the Locums Table // Generates random activation code $activ_code=uniqid('', true); $query="INSERT INTO Locums(firstname, surname, gender, email, contact, gmc, quals, region, system, confirm, uniquecode) VALUES ('$firstname','$surname','$gender','$email','$contact','$gmc','$quals','$region','$system','$confirm','$activ_code')"; $result=mysql_query($query); if (!$result) { echo "Error Inserting Record"; die( print_r( mysql_errors(),true)); } ?> All the data inserts in to the table correctly with a unique activation code etc etc but on testing, the email validation does not seem to be working because it allows me to duplicate an email address. Can anyone help with this? Thanks.
  11. Well considering I dont know what it is, I dont think googles results of "Petroleum Development Oman" and "Pacific decadal oscillation" are likely to help much with this so any help is appreciated.
  12. OK, whats PDO and what does it do?
  13. Yes the file I want to use has got mysql_querys in, I have no idea how to change these over though
  14. I have a fully functional PHP login script on my hosting with MySQL databases but this is now going to be hosted on a local server running windows server 2003, IIS6 and SQL server management 2008. Is there anyway of making the same script work on this server or does the whole lot need changing for SQL server? Adey
  15. Thank you wickham, that link was excellent, have managed to set this up now.
  16. My site is running on wordpress with a phpbb forum, and have a google map with markers/clusters. The site/forum is for primary care/gp practices and on registration, I ask for the surgery address, if a post code is provided with the address, I convert this to lat/long co-ordinates and import this in to my db to be displayed on my map.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.