Jump to content

DeanWhitehouse

Members
  • Posts

    2,527
  • Joined

  • Last visited

Everything posted by DeanWhitehouse

  1. Is there a way to pull HTML code from a HTML file?
  2. unless you use ob_start();
  3. Because (i think) when you upload, if you wish to split a large file is has to be stored in a cache for the script to split it, therefore you cannot upload a large file as the cache(buffer , whatever) cannot/will not store it.
  4. can you show all the code, or is that it?
  5. 404 means page missing, therefore the link is wrong.
  6. try adding error_reporting(E_ALL); to the top of the page
  7. and what if js is disabled??
  8. Ok, thanks. I made it work by having it open a small window when it changes, but this is not the best way to go.
  9. wow, most of the replys are darkwater and js having a discussion. I would say that he should use sessions, and then have another page with visible profiles on and use get, but that is my preference.
  10. Please read this before posting header errors http://www.phpfreaks.com/forums/index.php/topic,37442.0.html It is in big letters at the top of the forum , so you couldn't of missed it.
  11. Ok, this is the whole code <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <link rel="alternate stylesheet" media="screen" href="classic.css"> <link rel="alternate stylesheet" media="screen" href="original.css"> <link rel="alternate stylesheet" media="screen" href="dark.css"> <link rel="alternate stylesheet" media="screen" href="light.css"> <link rel="alternate stylesheet" media="screen" href="modern.css"> <script type="text/javascript"> <!-- function preview() { var browser=navigator.appName; if(browser =="Microsoft Internet Explorer") { } else { var theme =document.reg.theme.value; document.getElementById("style").href = theme; } } --> </script> <link rel="stylesheet" id="style" media="screen" href="original.css"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Pragma" content="no-cache"> <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> <meta http-equiv="expires" content="0"> <title>Mail App - Registration</title> </head> <body> <div id="main"> <h1 align="center">Registration</h1> <p id="title">Register Here With Your Email address, then you can send emails to multiple addresses from this site.</p> <form id="reg" name="reg" action="" method="post"> Name:<input id="name" type="text" name="name" size="40"><br> Username:<input id="uname" type="text" name="username" size="40"><br> Password: <input id="pword" type="password" name="password" size="40"><br> Confirm<br> Password: <input id="cpword" type="password" name="confirmp" size="40"><br> Email: <input id="email" type="text" name="email" size="40"><br> Confirm Email: <input id="cemail" type="text" name="confirme" size="40"><br> Theme: <select id="theme" name="theme" onChange="preview()"> <option value="original.css">Original</option> <option value="classic.css">Classic</option> <option value="dark.css">Dark</option> <option value="light.css">Light</option> <option value="modern.css">Modern</option> </select><br> <p id="tc">To register you need to agree to our <a href="javascript:void(0)" onClick="tc()">terms and conditions</a>:<input id="tc" type="checkbox" name="agree" size="40"></p><br> <input id="sub" type="submit" value="Submit" name="reg"> </form> </div> </body> </html> I added the browser detection, just to disable it looking wrong in IE.
  12. Sorry the code posted are just snippets, the js is in the script tag's and there is a form that calls the function on change. It works fine in safari and ff , the theme changes instantly, but in IE it only changes a part of the page, this part has div tags around it, until i open a new tab then the rest of the page is changed.
  13. Have you tried running the php code on it's own to see if it works, as this isn't a php problem so it should be moved to the js forum.
  14. then thats a js problem, not php
  15. can u post the current code with changes you made.
  16. Is mod_desc definetly a row? try adding error_reporting(E_ALL); to the top of the script
  17. also remove the @ from session_start(); as this stops errors appearing( i think, correct me if i'm wrong) <?php session_start();
  18. read up on a xmlHTTPrequest (i think).
  19. Try this, and see if there is an error in your statement <?php require "config.php"; $type = $_REQUEST['model']; $select = 'SELECT mod_desc'; $from = ' FROM module'; $where = ' WHERE type = \'' .$type' . '''; $queryResult = mysql_query($select . $from . $where) or die("Error!".mysql_error()); while ($row = mysql_fetch_array($queryResult)) { echo $row['mod_desc']; } mysql_close($conn); ?>
  20. I have made a JS function to change the style sheet of my page. <link rel="alternate stylesheet" media="screen" href="classic.css"> <link rel="alternate stylesheet" media="screen" href="original.css"> <link rel="alternate stylesheet" media="screen" href="dark.css"> <link rel="alternate stylesheet" media="screen" href="light.css"> <link rel="alternate stylesheet" media="screen" href="modern.css"> <!-- function preview() { var theme =document.reg.theme.value; document.getElementById("style").href = theme; } --> <link rel="stylesheet" id="style" media="screen" href="original.css"> But in internet explorer it only changes part of the page until i either open a new window or tab. Is this to do with my js code
  21. I have made this function to laod a different style sheet when they change a drop down box. <script type="text/javascript"> function preview() { var theme =document.reg.theme.value; document.getElementById("style").href = theme; } </script> <html> <body> <select id="theme" name="theme" onChange="preview()"> <option value="original.css">Original</option> <option value="classic.css">Classic</option> <option value="dark.css">Dark</option> <option value="light.css">Light</option> <option value="modern.css">Modern</option> </select> </body> </html> My problem is that there is a lsight delay before it loads the next style sheet. Is there any way to preload the style sheets?
  22. read what i posted please before commenting. I am asking for help with setting the while loop for the variables.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.