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.

BITmixit

Members
  • Joined

  • Last visited

  1. Hello all, Currently developing a new website and was wondering if its possible to: 1) Play an animation file such as a GIF/FLV/SWF (which would be best?) as I've made a video file in after effects which animates the drawing of the text. What I want to do is play that file and then when that file has been played switch the source to a different file which would be repeating a "Turbulent displacement" effect that I've got on the text. So: Play file.........Stop, play and repeat a new file. 2) jQuery functions or plugins that will allow me to "swoop" between contents in a div. I'm creating one singular page instead of multiple pages so what I want is each div to act like its own page. So when you first arrive on the site Link 1 is active and Div 1 is shown. When the user clicks on link 2, div 1 travels upwards whilst div also travels upwards to replace where div 1 was. Thanks for any help.
  2.    radiopomoshnik reacted to a post in a topic: Change mysql output using php?
  3. Not sure I phrased that question correctly but basically what I am currently doing is setting up a multi-portfolio site for myself and some others. What is the best method on changing large amounts of content including text and images? I assume javascript change content is unwise? would putting all of the data into a mysql database and then displaying that content via php on the site be a better method? if so how would you go about doing this? So for example the site has multiple links Portfolio 1 Portfolio 2 Portfolio 3 and then a section which has Name: Age: Description: Image 1 Image 2 Image 3 Image 4 Image 5 Image 6 what I want to do is change the content after Name, Age, Description and change each src of the images.
  4. Cheers man, thats exactly what I was looking for
  5. Yo so come up with a recent idea for a portfolio website I want to create for myself for university. Basically what I want to happen is for a page to have a book from the front cover. The user then clicks on the book, the book opens up and folds open thus becoming the width of the page. The user can then click on 4 links above the book which will be the navigational bar. The navigational bar will work realistically as in when the 4th link is clicked the book will flick 4 pages. What would be the best method of executing this? obviously each page in the book will have different content but will remain on the same actual webpage.
  6. So I finished an email inbox system for a university assignment. Works perfectly (well how they want it to) in chrome, not so much in IE but who gives a **** about that. However the University testing browser is Firefox so I've been bug testing in that and basically the inbox elements get created i.e the message ID is there and its retrieving the content fine but the XML doesn't display. The weird thing i've made it invoke another function to retrieve more XML to get users individual emails and then display that when the user clicks on an individual email. This displays fine so why doesn't the inbox? anyway to help save time and such heres the url: http://www.alexjknight.com/wtass1/login.php username: Alex password: test
  7. Yo, so recent assignment. Been tasked to build a mailing system and been provided with the table structures (which are poor as hell) and the php scripts. First of all I had to create a registration form and login form. easy enough. Now I'm at the inbox stage. Took me a while but I've finally figured out how to request XML sections, format them and style then and such from the mail database. Anyway so now I'm stuck (have been for a couple days) on a part of the assignment that asks for me have a mouseover and onclick event on the subject emails - normally this is easy as pie but I've generated the divs dynamically for each subject and I have no idea how to add events in js. These events need to acquire the MailID (i assume) of the subject that you click on (the solution I have always generates the highest value ) and then throw that information into another div (thats obviously easy) Also when the onclick event happens the database READ column needs to be updated. The php script i've been provided with does this automatically I just need to figure out how to add onclick events to dynamically created divs and then get those divs to update the READ column in the database based on the MailID when they are clicked upon. So essentially I just need to understand how to add events to the divs and how to invoke 2 php scripts or whatever. As per usual I'm not asking for someone to solve it for me just some guidance. Here be the scripts: Inbox: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>User Inbox</title> <meta name="description" content="Web Technologies - Assignment 1 // User Inbox"> <meta name="author" content="Alex Knight"> <link rel="stylesheet" href="css/style.css"> <!--[if lt IE 9]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <script> if (window.XMLHttpRequest){ //IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else{ //IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200){ xmlDoc = xmlhttp.responseXML; m = xmlDoc.getElementsByTagName("mail"); s = document.getElementById("sender"); su = document.getElementById("subject"); d = document.getElementById("date"); rows = m.length; for(var i=0;i<m.length;i++){ name = xmlDoc.getElementsByTagName("sender")[i].childNodes[0].nodeValue; sj = xmlDoc.getElementsByTagName("subject")[i].childNodes[0].nodeValue; dat = xmlDoc.getElementsByTagName("date")[i].childNodes[0].nodeValue; snd = document.createElement("div"); snd.className="tab"; subj = document.createElement("div"); subj.className="tab"; subj.id="show"; datd = document.createElement("div"); datd.className="tab"; s.appendChild(snd); snd.appendChild(document.createTextNode(name)); su.appendChild(subj); subj.appendChild(document.createTextNode(sj)); d.appendChild(datd); datd.appendChild(document.createTextNode(dat)); } } } xmlhttp.open("GET","php/checkmail1.php?userID=admin", true); xmlhttp.send(); </script> </head> <body> <div id="holder"> <div id="header">Inbox and ****:</div> <div id="tcontainer"> <div class="snd">Sent By:</div> <div class="sub">Subject:</div> <div class="dat">Date Received:</div> </div> <div id="mail"> <div class="snd" id="sender"></div> <div class="sub" id="subject"></div> <div class="dat" id="date"></div> </div> <div id="read"> <div id="rhead">Mail!</div> <div id="rcont"></div> </div> </div> <script> if (window.XMLHttpRequest){ //IE7+, Firefox, Chrome, Opera, Safari update=new XMLHttpRequest(); }else{ //IE6, IE5 update=new ActiveXObject("Microsoft.XMLHTTP"); } update.onreadystatechange=function() { if (update.readyState==4 && update.status==200){ show = document.getElementById("show"); show.onclick=function(){document.getElementById("rcont").innerHTML="Hello"}; } } update.open("GET","php/update.php?mailID=1", true); update.send(); </script> </body> </html> Update.php <?php header('Content-Type: text/xml'); header("Cache-Control: no-cache, must-revalidate"); $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = ''; $dbname = 'gu14'; $dbtable = 'mail'; $q=$_GET["mailID"]; $con = mysql_connect($dbhost, $dbuser, $dbpass); if (!$con) { die('Could not connect: ' . mysql_error()); } $dbselect = mysql_select_db($dbname,$con); $sql="UPDATE $dbtable SET status='read' WHERE mailID='$q'"; $result = mysql_query($sql); $sql1="SELECT * FROM $dbtable WHERE mailID='$q'"; $result1 = mysql_query($sql1); echo '<?xml version="1.0" encoding="ISO-8859-1"?> <mailbox>'; while($row = mysql_fetch_array($result1)) { echo"<mail>"; echo "<userid>".$row['userID']."</userid>"; echo "<sender>".$row['Sender']."</sender>"; echo "<mailid>".$row['mailID']."</mailid>"; echo "<subject>".$row['Subject']."</subject>"; echo "<message>".$row['Message']."</message>"; echo "<date>".$row['Date']."</date>"; echo "<time>".$row['Time']."</time>"; echo "<status>".$row['status']."</status>"; echo "</mail>"; } echo "</mailbox>"; mysql_close($con); ?> checkmail1.php <?php header('Content-Type: text/xml'); header("Cache-Control: no-cache, must-revalidate"); $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = ''; $dbname = 'gu14'; $dbtable = 'mail'; $q=$_GET["userID"]; $con = mysql_connect($dbhost, $dbuser, $dbpass); if (!$con) { die('Could not connect: ' . mysql_error()); } $dbselect = mysql_select_db($dbname,$con); $sql="SELECT * FROM $dbtable WHERE userID='$q'"; $result = mysql_query($sql); echo '<?xml version="1.0" encoding="ISO-8859-1"?><message>'; while($row = mysql_fetch_array($result)) { echo "<mail>"; echo "<userid>".$row['userID']."</userid>"; echo "<sender>".$row['Sender']."</sender>"; echo "<mailid>".$row['mailID']."</mailid>"; echo "<subject>".$row['Subject']."</subject>"; echo "<message>".$row['Message']."</message>"; echo "<date>".$row['Date']."</date>"; echo "<time>".$row['Time']."</time>"; echo "<status>".$row['status']."</status>"; echo "</mail>"; } echo "</message>"; mysql_close($con); ?> Also heres what the output is at the moment. http://s9.postimage.org/y2flpwv2l/help.jpg
  8. Heres what I get when I just simply use document.write(xmlDoc); Sender: Subject: date: undefined <script> if (window.XMLHttpRequest) { //IE7+, Firefox, Chrome, Opera, Safari xmlhttp= new XMLHttpRequest(); } else { //IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","php/checkmail1.php?userID=admin",true); xmlhttp.send(); xmlDoc=xmlhttp.response.XML; document.write(xmlDoc); </script> Heres the output from when I use: document.getElementById("sender").innerHTML= xmlDoc.getElementsByTagName("sender")[0].childNodes[0].nodeValue Sender: Subject: date:
  9. Hello all, my first time working with XML using PHP and JS to retrieve the information. My only problem is that I just can't seem to get it to be working. Whenever I try to push the information into my HTML I get javascript console errors stating that the tagname isn't defined and thus can't get the data. Anyway I'll post the code but it would be good if you know of any guides/tutorials when working with XML. Oh also this is a very basic mailing client that I'm building so I can start to understand AJAX and such so please don't post complexities and such like security for usernames and such. That kind of stuff I can fix later. Thank you. <!doctype html> <html> <head> <meta charset="utf-8"> <title>Inbox</title> </head> <body> <div> <b>Sender:</b><span id="sender"></span><br /> <b>Subject:</b><span id="subject"></span><br /> <b>date:</b><span id="date"></span> </div> <script> if (window.XMLHttpRequest) { //IE7+, Firefox, Chrome, Opera, Safari xmlhttp= new XMLHttpRequest(); } else { //IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","php/checkmail1.php?userID=admin",true); xmlhttp.send(); xmlDoc=xmlhttp.response.XML; document.getElementById("sender").innerHTML= xmlDoc.getElementsByTagName("sender")[0].childNodes[0].nodeValue; </script> </body> </html> Whenever this is run js console states tagname sender isn't defined. So the xmlDoc isn't returning the XML data for it to read? and PHP <?php header('Content-Type: text/xml'); header("Cache-Control: no-cache, must-revalidate"); $dbhost = 'localhost'; $dbuser = 'blahdeblah'; $dbpass = ''; $dbname = 'test'; $dbtable = 'mail'; $q=$_GET["userID"]; $con = mysql_connect($dbhost, $dbuser, $dbpass); if (!$con) { die('Could not connect: ' . mysql_error()); } $dbselect = mysql_select_db($dbname,$con); $sql="SELECT * FROM $dbtable WHERE userID='$q'"; $result = mysql_query($sql); echo '<?xml version="1.0" encoding="ISO-8859-1"?><message>'; while($row = mysql_fetch_array($result)) { echo "<mail>"; echo "<userid>".$row['userID']."</userid>"; echo "<sender>".$row['Sender']."</sender>"; echo "<mailid>".$row['mailID']."</mailid>"; echo "<subject>".$row['Subject']."</subject>"; echo "<message>".$row['Message']."</message>"; echo "<date>".$row['Date']."</date>"; echo "<time>".$row['Time']."</time>"; echo "<status>".$row['status']."</status>"; echo "</mail>"; } echo "</message>"; mysql_close($con); ?>
  10. Urm no...I'm asking how to position the div correctly and to get the div to hide when the width is less then 1000. Its called referencing so I'm allowed to do this kind of thing. Also if noone actually ASKED questions on how to do such web design then the web would have evolved at a much slower rate. p.s. why post when you're wasting mine and your time. Well done tho
  11. Yo so basically been presented with a design for my course that I have to create using HTML/CSS. Basically I've created a holder which contains all of the other divs so I can control the width via & with just one div. However I now need to add a little image to the left of my menu div to create the visual effect they intended. I've tried using a position absolute but it doesn't work properly Anyway heres what it should look like: http://s11.postimage.org/evvlj6iir/there.jpg and heres what it looks like http://s11.postimage.org/xa64n5utf/nthere.png Obviously you guys would have guessed that the edge of the menu div is where the color changes from black to white. Also I've had to design and create a widget on the page that contains the facebook/twitter image links. Now this widget is positioned correctly but when I resize the browser/adjust the resolution the div overlaps the holder div. How can I make this div disappear when the width of the browser window is less then 1000px or 768px. Whatever size it is when the overlap occurs.
  12. So setting up my first login system. Its very basic as its just for a university project that doesn't need complexity. Basically the problem at the moment is that I've setup a variable to acquire the username that is the session ID however when the user isn't logged in I get the ugly VARIABLE UNDEFINED message. heres the code: TOP OF PAGE: <?php include 'include/db.php'; session_start(); $usr = $_SESSION['name']; echo $usr; ?> The echo $usr is just show I know whats being generated/its working properly, anything random like this in my code is just a checking procedure MID PAGE: if((isset($_SESSION['name']) && $_SESSION['name'] == $usr)){ echo "Go here to <a href='logout.php'>Logout</a>"; }else{ if(isset($_POST['submit'])){ //Checking Login $name = $_POST['username']; $pass = md5($_POST['password']); $result = mysql_query("SELECT * FROM user WHERE username='$name' AND password='$pass'"); $num = mysql_num_rows($result); if($num == 0){ echo "bad Login"; }else{ $_SESSION['name'] = $name; $usr = $name; echo "You are logged in as"; echo $_SESSION['name']; }}else{ ?> <form action="index.php" method="post"> <table id="logtab"><tr><td> Username:</td><td> <input id="styled" type="text" name="username" /></td> <td> Password:</td><td><input id="styled" type="password" name="password" /></td> <td> <input type="submit" name="submit" value="Login!" /></td> </tr> </table> </form> <?php }} ?> Thanks guys.
  13. One of the people that I sent my website to to test ran into a problem where my converted from .swf to HTML5 didn't work as their computer (at a business) didn't support HTML5. Are there any broswers built specifically to test websites so you can run if statements or some other magic to either display the html5 or the swf.
  14. This worked perfectly, cheers man and I learnt that you can add classes. Did not know this. Is there a simple Jquery function to push the scroll bar down when expanding the height of the div for the portfolio as the scroll bar doesn't move.
  15. I've tried using Jquery but the same problem occurs. Heres it when it's hidden using .hide, i've also set it to .show when portfolio is clicked. http://www.alexjknight.com/ <Not working, click any of the tabls in portfolio to see. Here it is without any Jquery/CSS hiding the div http://www.alexjknight.com/working/ <working, content scrolls perfectly.
  16. So i'm toggling a div from display = none to display = block. The div that I am trying to change is being used for a horizontal jquery menu bar that scrolls the content in the div below it from left to right. The problem that I am facing when changing the container div for all of this is that the div with all the content in doesn't display correctly when it is switched. instead of display the content div there is just a small white line. It still scrolls left and right but the first content div is now ontop of the other divs...for some reason.

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.