Jump to content

Colton.Wagner

Members
  • Posts

    157
  • Joined

  • Last visited

Everything posted by Colton.Wagner

  1. Awesome I was just looking for something a lot more complex like some function name instead of append. It's always the easy stuff that gets me. Now I have a second question when I append html it displays the html as text rather than using the element tags I provide. Thanks, Colton Wagner
  2. Good thought I will take a look into that. I was also kinda thinking maybe give it a white glow so that it made the black background pop? Thanks, Colton Wagner
  3. I am trying to make this script so that when I click on a radio button the text is replaced not appended. I have tried the code replaceChild(). That did not work basically what I am asking is every time I run the function showForm() I want it to replace text in the extra Div. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>programming test.</title> <script type="text/javascript"> function showForm(x) { if (x == "1") { var extra = "This means you have children!"; } else if (x == "0") { var extra = "This means you do not have children!"; } var myText = document.createTextNode(extra); document.getElementById("extra").appendChild(myText); } </script> </head> <body> <p> <form action="?submit=true" method="post"> <h3>Personal Information</h3> <strong>Username:</strong> <input type="text" value="" name="username" /> <br /> <strong>Password:</strong> <input type="password" value="" name="password" /> <br /> <strong>First Name:</strong> <input type="text" value="" name="fname" /> <br /> <strong>Last Name:</strong> <input type="text" value="" name="lname" /> <br /> <strong>Email:</strong> <input type="text" value="" name="email" /> <br /> <strong>Do you have children?</strong> <br /> Yes <input type="radio" value="1" onclick="showForm(this.value)" name="children" /> No <input type="radio" value="0" onclick="showForm(this.value)" name="children" /><br /> <div id="extra" style="color: red;"></div> <input type="submit" value="submit" /><br /> </form> </p> </body> </html> Any help would be greatly appreciated. Thanks, Colton Wagner
  4. Just for notification take out the: header("location:index.php"); Once you send something to be printed on the document it has already sent the header therefore it will throw and error and the above script will now work. Other than that it would work fine. Also consider looking into a 3rd party javascript for validation script. Thanks, Colton Wagner
  5. I don't really know if this will help you but it's worth a shot. Check out the link I provided below. http://www.w3schools.com/Css/pr_font_weight.asp I hope I could be of some assistance. Thanks, Colton Wagner
  6. I would try to use the nowrap function: nowrap="nowrap" Simply place that within the <td> tab. You could also try the css version: Overflow: visible; I hope I could be some assistance. Thanks, Colton Wagner
  7. Your problem does not lie within your css3. The problem is actually in your html. Internet explorer is very strict about having the doctype defined. Simply add this to the top of your html document. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> So that it looks like: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <style> h1 { font-size:24px;color:#428800; } h2 { color:#428800;font-weight:bold; background-color: #f0f0f0; width: 518px; height: 50px; margin: 0 auto 0 auto; padding: 0px; border: 1px solid #d7d7d7; -moz-border-radius: 11px; -webkit-border-radius: 11px; border-radius: 11px; behavior: url(/css/border-radius.htc); } #content { float:left;margin:0;padding:0 5px;width:960px;background:url(/images/template/main-background.jpg); } #main { float:left;margin:0 15px 0 10px;width:520px;background:transparent; } </style> </head> <body> <div id="content"> <div id="main"> <h1>Contact Us</h1> <h2>Advertising Opportunities</h2> <h2>Editorial Enquiries</h2> <h2>Order Enquiries</h2> </div> </div> </body> </html> I hope I could be of some assistance. Thanks, Colton Wagner
  8. If you will notice you do not have: <html> Defined at the top of the page but this does not fix the problem. You have this as your document type: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> It needs to be replace with: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> This should fix your problem hope I could be some assistance. Thanks, Colton Wagner
  9. I would say the website needs some work and definitely needs to be re-organized. The home page looks like a parked website. There really isn't a color scheme The ad's are in a terrible place. It looks like there is not a header. Hope I could be of some assistance. Thanks, Colton Wagner
  10. I like the design but I have a few things I would personally change and some strong points. The navigation bar has to many colors and it clashes with the design of the website. I would slow down the transition of the news feed. Great use of easy slider. In the navigation try to keep it uniform. If you capitalize one name capitalize them all. Also I would allow the picture /btn/code/images/topdesign.jpg to be resized with the rest of the site. When I viewed this in 800 X 600 it's width was wider than the website itself. Hope I could be of some assistance. I really like all of the jqueries you are using it is really flush and does not really clash. Thanks, Colton Wagner
  11. The new design looks great! Just giving the header a little bit more originality goes a long way. Also I like the that you stuck to the web design standers and kept your three color scheme. Can't wait to see your site when it goes online with the new design. Thanks, Colton Wagner
  12. It's a pretty organized website. Kind of bland and the darkness of makes it seem a little depressing. There are not that many graphics on the page aside from the header. I looking into giving your website more of a theme. Thanks, Colton Wagner
  13. Yeah, the background is something I just can't decided on I've tried a couple different things so until I find the one I like black it is. As far as the Navigation bar goes I tried to keep it very basic because there are only four links. Thanks for the advice!
  14. The customer asked not to have anything dynamic and they did not want a php form to submit emails. I am just working with the constraints they gave me. So I am really just asking you to critique my design work. Please leave me any feedback good or bad I'm glad to get some ideas. http://nicknackery.com/ Thanks, Colton Wagner
  15. One thing that rubbed me away from your website right away was the navigation bar. Not only was it completely ugly but it also had way to many links. I would consider re-organizing your website. Hope I could be some help. Thanks, Colton Wagner
  16. Compared to most of the sites I have seen and critiqued this one looks good. However there are a few to many slices in my opinion. When you export the slices you should look into fixing the loading time on them as well. It took close to 5 seconds to load your page and I have 10 up 2 down. Just a thought hope I could help. Thanks, Colton Wagner
  17. The website all in all looks fairly decent. I would however recommend looking into pagination as no one enjoys scrolling down to read content. Also I can tell that your navigation bar has a repeated image. I would recommend re-sizing it or turning the repeat off. The website looks good hope I could be some help.
  18. Here is the Code <?php session_start(); $_SESSION['parts'] = array(); error_reporting(E_ALL); ?> <html> <head> <link rel="shortcut icon" href="/favicon.ico" /> <title> NickNackery.com </title> </head> <body> <?php mysql_connect('localhost', 'root', 'roflmao315'); mysql_select_db('products'); $parser = xml_parser_create(); function start($parser, $element_name, $element_attrs) { switch($element_name) { case "SKU": // this is the start of a set of data $_SESSION['parts'] = array(); // create an empty set break; case "TIME": $query = sprintf("UPDATE products SET products_quantity = $quantity WHERE products_model = $part"); mysql_query($query); break; default: } } function stop($parser, $element_name) { } function char($parser,$data) { $data = trim($data); $quantity = trim($quantity); $part = trim($part); if($data != ''){ if(!isset($_SESSION['parts']['SKU'])){ $_SESSION['parts']['SKU'] = $data; } elseif (!isset($_SESSION['parts']['QTY'])){ $_SESSION['parts']['QTY'] = $quantity; } elseif (!isset($_SESSION['parts']['PART'])){ $_SESSION['parts']['PART'] = $part; } } } xml_set_element_handler($parser, "start", "stop"); xml_set_character_data_handler($parser, "char"); $fp=fopen("http://morris.morriscostumes.com/out/available_batchnynyy_001.xml","r"); while ($data=fread($fp,4096)) { xml_parse($parser,$data,feof($fp)) or die (sprintf("XML Error: %s at line %d", xml_error_string(xml_get_error_code($parser)), xml_get_current_line_number($parser))); } xml_parser_free($parser); ?> </body> </html> Here is the error Notice: Undefined variable: quantity in on line 45 Notice: Undefined variable: part in on line 46
  19. I am tryin to loop the same number into a databas 17659 times but with the following code: <?php error_reporting(E_ALL); $con = mysql_connect('localhost', 'root', ''); if (!$con) { die('Connection Error:' . mysql_error()); } mysql_select_db('catgories', $con); for($i=0;$i<=17659;$i++) { $query="INSERT INTO categories(`products_id`,`categories_id`) select $i,categories_id from categories"; mysql_query($query) or trigger_error("SQL: $query, ERROR: ", E_USER_ERROR); } ?> However I get the following error: Fatal error: SQL: INSERT INTO categories ('products_id'. 'categories_id') VALUES ('', '18'), ERROR: in H:\Xampp\xampplite\htdocs\categories.php on line 13
  20. So I am trying to use an xml file to update a products quantity by checking the product id then updating it in the database. <?php session_start(); $_SESSION['parts'] = array(); error_reporting(E_ALL); ?> <html> <head> <link rel="shortcut icon" href="/favicon.ico" /> <title> </title> </head> <body> <?php mysql_connect('', '', ''); mysql_select_db('products'); $parser = xml_parser_create(); function start($parser, $element_name, $element_attrs) { switch($element_name) { case "SKU": // this is the start of a set of data $_SESSION['parts'] = array(); // create an empty set break; case "TIME": $query = sprintf("UPDATE products SET products_quantity = $quantity WHERE products_model = $part"); mysql_query($query); break; default: } } function stop($parser, $element_name) { } function char($parser,$data) { $data = trim($data); $quantity = trim($quantity); $part = trim($part); if($data != ''){ if(!isset($_SESSION['parts']['SKU'])){ $_SESSION['parts']['SKU'] = $data; } elseif (!isset($_SESSION['parts']['QTY'])){ $_SESSION['parts']['QTY'] = $quantity; } elseif (!isset($_SESSION['parts']['PART'])){ $_SESSION['parts']['PART'] = $part; } } } xml_set_element_handler($parser, "start", "stop"); xml_set_character_data_handler($parser, "char"); $fp=fopen("http://morris.morriscostumes.com/out/available_batchnynyy_001.xml","r"); while ($data=fread($fp,4096)) { xml_parse($parser,$data,feof($fp)) or die (sprintf("XML Error: %s at line %d", xml_error_string(xml_get_error_code($parser)), xml_get_current_line_number($parser))); } xml_parser_free($parser); ?> </body> </html> I get this error: Notice: Undefined variable: quantity in on line 45 Notice: Undefined variable: part in on line 46
  21. i added that and it threw this error: Fatal error: SQL: INSERT INTO categories(`products_id`,`categories_id`) select 0,categories_id from categories, ERROR: in F:\Xampp\xampplite\htdocs\categories.php on line 13
  22. cags: the same error The html document contains an error now because we set it to tell us. Fatal error: SQL: INSERT INTO categories(`products_id`,`categories_id`) select 0,categories_id from categories, ERROR: in F:\Xampp\xampplite\htdocs\categories.php on line 13
  23. Fatal error: SQL: INSERT INTO categories(`products_id`,`categories_id`) select 0,categories_id from categories, ERROR: in F:\Xampp\xampplite\htdocs\categories.php on line 13
  24. Nothing gets inserted into the database and it throws no errors even with the e_all reporting method enabled. It takes awhile to go through all 17659 instances but it does not insert anything.
×
×
  • 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.