Jump to content

Dave Stewart

Members
  • Content Count

    16
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Dave Stewart

  • Rank
    Newbie
  • Birthday 10/02/1964

Previous Fields

  • Languages
    Scottish/English

Profile Information

  • Location
    Edinburgh, Scotland
  1. I went through the entire site & checked the basic html section as you noted, but couldn't find the ones you talked about. I did find the older function codes you saw & removed them. With your assistance It all now works as I hoped it would. Thanks a LOT for your help. Greatly appreciated. Dave.
  2. Aaarrgghh, nightmare. I still can't get it to work. Instead of trying to post the coding I'm trying to get working, perhaps you'd rather look at the page in action? It's at www.edinweb.org. I'd really appreciate any ideas on what I'm doing. I use Dreamweaver & it objects a lot to some lines of it as well. Thanks in advance. Actually, I've just realised what you mentioned earlier. The lines in the coding are indeed replicated, but that's the refference to the W3 CSS scripts. How would I change those? Unless I copied the coding from W3's & made more with different names. That might be seen as theft though. Suppose I could refer them in comments for copyright or something.
  3. Thanks a lot. That's a lot for my simple brain to absord but I'll look at that & post when I've got it to work. Thanks again.
  4. Oh, so it is, sorry. Confused myself with too many parts. I looked at the page on here again & changed it to: </nav> <script> function myAccFunc() { var x = document.getElementById("demoAcc"); if (x.className.indexOf("w3-show") == -1) { x.className += " w3-show"; x.previousElementSibling.className += " w3-green"; } else { x.className = x.className.replace(" w3-show", ""); x.previousElementSibling.className = x.previousElementSibling.className.replace(" w3-green", ""); } } function myDropFunc() { var x = document.getElementById("demoDrop"); if (x.className.indexOf("w3-show") == -1) { x.className += " w3-show"; x.previousElementSibling.className += " w3-green"; } else { x.className = x.className.replace(" w3-show", ""); x.previousElementSibling.className = x.previousElementSibling.className.replace(" w3-green", ""); } } </script> which is the script it should be, I hope! But still get the same result.
  5. Oops, sorry, I forgot to add the script. It is indeed there, just under the bottom of the code I previously posted.... </nav> <script> function w3_open() { document.getElementById("mySidenav").style.display = "block"; document.getElementById("myOverlay").style.display = "block"; } function w3_close() { document.getElementById("mySidenav").style.display = "none"; document.getElementById("myOverlay").style.display = "none"; } </script> However, as I have 'included' a seperate HTML file with all the nav coding along with the javascript, but this may easily be completely wrong. Any help is greatly appreciated, thanks. Dave
  6. Hi, I'm trying to setup a sidenav with multiple accordion dropdowns. The first one seems to work fine but the rest just reopen the first in the list. Anyone any idea what I'm doing wrong? It may well be blatantly obvious as I'm no expert! Thanks, Dave. The code I'm using (css) is: ____________________________________________________________________________________ <nav class="w3-sidenav w3-light-grey w3-card-2" style="width:140px;"> <a href="index.php">Home</a> <div class="w3-accordion"> <a onclick="myAccFunc()" href="#">First group<i class="fa fa-caret-down"></i></a> <div id="demoAcc" class="w3-accordion-content w3-white w3-card-4"> <a href="one.php">one</a> <a href="two.php">two</a> <a href="three.php">three</a> </div> </div> <div class="w3-accordion"> <a onclick="myAccFunc()" href="#">First group<i class="fa fa-caret-down"></i></a> <div id="demoAcc" class="w3-accordion-content w3-white w3-card-4"> <a href="four.php">four</a> <a href="five.php">five</a> <a href="six.php">six</a> </div> </div> <div class="w3-accordion"> <a onclick="myAccFunc()" href="#">Second group<i class="fa fa-caret-down"></i></a> <div id="demoAcc" class="w3-accordion-content w3-white w3-card-4"> <a href="four.php">four</a> <a href="five.php">five</a> <a href="six.php">six</a> </div> </div> <div class="w3-accordion"> <a onclick="myAccFunc()" href="#">Third group<i class="fa fa-caret-down"></i></a> <div id="demoAcc" class="w3-accordion-content w3-white w3-card-4"> <a href="seven.php">seven</a> <a href="eight.php">eight</a> <a href="nine.php">nine</a> </div> </div> <a href="https://twitter.com/my_page" target="_blank"><img src="/img/twitter.gif" width="100px"></a> <a href="https://www.facebook.com/my_page/" target="_blank"><img src="/img/facebook.gif" width="100px"></a> </nav> ____________________________________________________________________________________
  7. Stop press!!!! It worked! I realised after my last post to you that I had put the coding inside the head, not before the first tag as you had advised. I need to change a few bits of the ite but that worked as I'd hoped. Thank you LOADS for your advice. Greatly appreciated, and very wose. Thanks.
  8. Yesterday. I transferred all the php coding up into the header & rearranged my pages, but am still having the same trouble. The only difference is that the erros come at the top before the page loads. I won't repost all the coding now that I've rearranged it but can easily do if that will help at all. If you'd rather just look at the site to figure out where i'm going wrong, please do. It's at www.daveweb.in Please don't laugh at it as it's just a place for me to try to learn what to do, although I'm obvioulsy stuck on this bit! Thanks for any help you can give me. Dave
  9. Yes thanks, that makes sense, but there must be a way to... hmm, thnking out loud here... if I put the login form into the page I suppose I can refer the results to the php coding inside the head yes? I'm not quite sure how to do that but presume all login pages do so. I'll go and try things out. Thanks for your help.
  10. Thanks, and yes it is. But surely the login code needs to run first? Is there a way to redirect the page once the login script has proved successful?
  11. Hi everyone, please bear with me as I am a novice! I eventually got my login system to work but am trying to send the successfull login to a members page & am getting "Warning: Cannot modify header information - headers already sent by (output started at..." It claims that the headers were already set in the same PHP. I cannot find any header info before the line I'm using so am stuck. Anyone able to help me out here? Thanks. The coding is: <?php$name = $_POST['name'];$password = $_POST['password'];if ($name && $password) { $connect = mysql_connect("--", "--", "--") or die('Connection to database failed'); mysql_select_db("--") or die ("Couldnt find database"); $sql = mysql_query("SELECT * FROM <the table> WHERE name = '$name'"); $numrows = mysql_num_rows($sql); if($numrows !=0) { while($row = mysql_fetch_assoc($sql)) { $dbname = $row['name']; $dbpassword = $row['password']; } if($name==$dbname && $password==$dbpassword) { $_SESSION['name']=$dbname; header("Location: --.html"); } else echo ("Incorrect data entered"); } else echo "<center>your login was unsuccessful so please try again"; }?> It seems to be working except the header line.
  12. Hi everyone, I'm a bit stuck on this so anyone any ideas? I am putting a page together with a table at the top, with a background image, then some text underneath it. I've set a margin on the left to keep the text away from the edge but the background image on the table above also uses it. How do I stop that hppening? Screen shot of the problem attached.Thanks.
  13. Is it possible to have a shadow outside a div with no border visible?
  14. Sorry it took me so long to get this sorted, but managed with your help. Thanks a lot.
  15. I've tried using that but it still gives the scrolls over the height of the browser window, which knocks all the other divs aside several pixels.
×
×
  • Create New...