Jump to content
Old threads will finally start getting archived ×

heldenbrau

Members
  • Posts

    159
  • Joined

  • Last visited

Everything posted by heldenbrau

  1. The trouble is this is inside an onclick so is already encased in "".
  2. if (document.getElementById('plus').style.background=='url('/images/minus.png')'){ document.getElementById('plus').style.background='url('/images/plus.png')'; } else { document.getElementById('plus').style.background='url('/images/minus.png')'; } This is to change a + button to a _ button when it is clicked
  3. Thanks, that's done it, the javascript is working now. Cheers
  4. I have tried running the web page but there is an error because it won't come out of html after the <<<HTML bit.
  5. Thanks, I forgot about using \ to escape. For the echo<<<HTML thing, how do you exit it? When I end with HTML; it doesn't exit.
  6. I'm trying to generate a page with javascript in it with PHP. But the quotations are causing me problems, I need a third set of quotations. Here is the part I am having trouble with: echo"<div class='level'>Edit:</div><div class='box'><input type = 'text' size='50' name='cat' value='$cat'/> <b><input type='button' value='+ Details' onclick='document.getElementById('rev$clicker').style.display='block';'/></b> </div><br>"; When I view the html it comes out onclick='document.getElementById('rev$clicker').style.display='block';' I can't use "" quotations for 'block' and 'rev$clicker' because that would exit from the echo and I can't exit php because I need the $clicker variable.
  7. That solved it, I was looking at that for ages trying to work out what was wrong with it. Thanks loads.
  8. Here is the error I get ERROR: Could not execute query: INSERT INTO items (quickti, longti, desc, maincat, subcat1, subcat2, colour, size, style, price, stock, pic1, pic2, pic3, pic4, pic5, pic6, sold, saledate) VALUES ('quick', 'main title', 'description', 'Jewelry', 'Gemstones', 'Cubic Zirconia', 'Black', '50m', 'red', '1.50', '100', 'quick1', 'quick2', 'quick3', 'quick4', 'quick5', 'quick6', '0', '0'). You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc, maincat, subcat1, subcat2, colour, size, style, price, stock, pic1, pic2, ' at line 1 Here is the relevant code $sql = "INSERT INTO items (quickti, longti, desc, maincat, subcat1, subcat2, colour, size, style, price, stock, pic1, pic2, pic3, pic4, pic5, pic6, sold, saledate) VALUES ('$quickheading', '$heading', '$content', '$cat1', '$cat2', '$cat3', '$colour', '$size', '$style', '$total', '$stock', '$quick1', '$quick2', '$quick3', '$quick4', '$quick5', '$quick6', '0', '0')"; if I remove desc and $content from the query, then it works. desc is a text field.
  9. Doesn't matter, it is me looking at the wrong page. Thanks for the help, it works fine in IE8.
  10. Yes it is the pink one on the left. I'm viewing with internet explorer 8.
  11. I have made a popup menu with javascript and CSS for my website http://www.diamondcz.co.uk/index.shtml When I was working on it I was viewing it in Firefox. But it doesn't work at all in internet explorer. I have set a div id in CSS to not display and using javascript, changed the CSS to display when the mouse goes over the menu item. eg. <div class="menutitles" onmouseover="document.getElementById('ha').style.display='block';document.getElementById('ha2').style.display='block';" onmouseout="document.getElementById('ha').style.display='none';document.getElementById('ha2').style.display='block';" > <a class="topseltxt" href="heartsarrows.shtml">Hearts & Arrows</a><br/> <div class="contain" id="ha"> <div class="menuitems" id="ha2"> <a class="topseltxt2" href="8heartsarrows.shtml">8 Hearts & Arrows</a><br/> <a class="topseltxt2" href="heartsarrows.shtml">10 Hearts & Arrows</a><br/> </div> </div> </div>
  12. Just realised it doesn't even work in IE, you can only see it in firefox.
  13. I am trying to make a popup menu on my website: http://www.diamondcz.co.uk/index.shtml I want it to pop up in the position where is is popping up now, but without shifting the other links in the menu down. here is the css: .menuitems{ position:relative; top:-10; right:-100; width:150px; text-align:left; color:darkblue; text-decoration:none; padding-left:5px; padding-right:5px; padding-top:2px; padding-bottom:2px; display:none; }
  14. Not sure if I understand, but I would change it from <a href="/getlink.php?id=<?php echo $row['id']; ?>">More Info</a> to <a href="/getlink.php?id=$row['id']">More Info</a> then the retrieving code $name = $_GET[id]; echo" Name: $name"; etc. If $name is going to be used in a database query then you need to make it safe.
  15. Is there a way to style google ads, or can I only have them in white?
  16. Sorry, I was changing the wrong part of the program. I was changing the opening post instead of the replies, so nothing worked. I have used the line above and it has stripped the returns. Thanks.
  17. I am trying using this echo rtrim(nl2br(stripslashes($case)),"<br />"); But it isn't working, I tried it this way too echo nl2br(stripslashes(rtrim($case, "<br />)));; Neither of those 2 will get ride of the <br />s at the end. I can't strip html tags because I want to keep the returns that are in the middle of sentences. When I look at the database in php admin, the post is stored in the database with returns just showing as blank space returns.
  18. I have a forum and I display peoples posts by using nl2br(stripslashes($case)) But if somebody presses return, say, 10 times at the end of the sentance. Those returns are displayed. I'm not sure what is going on, but I think if you delete a paragraph from the end of the post, it still posts the same amount of lines as <br/>. Whatever is happening a few posts are coming up with extra <br/>s at the end. I know that rtrim removes the whitespace and carriage returns, but it won't remove these <br/>s when displayed with nl2br. How do I strip the <br/s> from the end?
  19. Thanks a lot, that sorted it.
  20. I get this error Warning: Invalid argument supplied for foreach() in /home/kangerc1/public_html/postonsuper.php on line 112for the following code: $sortedvotes = sort($votecounter); $smallcount=1; foreach ($sortedvotes as $c){ $sql="INSERT IF NOT EXISTS INTO supersum$casenum (field, votes) VALUES ($c,1)"; if ($mysqli->query($sql)===true){ }else{ die("could not insert vote into supersum" . $mysqli->error); } if ($c==$foreachcounter){ $smallcount++; $sql="UPDATE supersum$casenum votes='$smallcount'";; if ($mysqli->query($sql)===true){ }else{ die("could not insert vote into supersum" . $mysqli->error); } }else{ $smallcount=1; } $foreachcount=$c; } Why am I getting this error?
  21. the html is <div id=\"casecontent\"> <div class='caseconlc'> <div class='caseconrc'> casecontent is: #casecontent { width:auto; padding-left:30px; padding-right:30px; padding-top:15px; padding-bottom:15px; margin-left:35px; border-right:1px solid black; border-bottom:0px solid black; border-left:1px solid black; border-top:1px solid black; text-align: left; float:none; background-color:rgb( 203, 210, 218 ); }
  22. sorry, I did it wrong, but now I have done #caseconlc{background-image: url(defbotcornl.jpg) 0 100% no-repeat;} #caseconrc{background-image: url(defbotcornr.jpg) 0 100% no-repeat;} and it is showing nothing.
  23. That doesn't work for me, even though I put no repeat, the picture repeats all across the screen and isn't anywhere near the place it should be. I changed the CSS to do the bottom corners to this: #caseconlc{ background-image: url(defbotcornl.jpg); background-repeat: 0 100% no-repeat; } #caseconrc{ background-image: url(defbotcornr.jpg); background-repeat: 0 100% no-repeat; } If you look at the link I posted earlier, you will see what I mean.
  24. and in internet explorer, there is an annoying gap between the corner and the bottom. How do you get rid of this?
  25. http://www.kangercourt.com/maincase.php?case=20 In the above page I am trying to do rounded corners. I can do the top ones ok, but on the bottom one, it needs 3 divs, one left 1 right and 1 middle. I am using the following CSS for the 3 divs. #caseconlc{ height:5px; width:5px; padding:0px; margin-left:35px; float:left; clear:none; border-width:0px; background-image: url(defbotcornl.jpg); background-repeat: repeat-x; } #caseconbot{ height:5px; width:auto; padding:0px; margin-left:40px; margin-right:5px; float:none; clear:none; border-width:0px; background-image: url(defbot.jpg); background-repeat: repeat-x; } #caseconrc{ height:5px; width:5px; padding:0px; margin:0px; float:right; clear:none border-width:0px; background-image: url(defbotcornr.jpg); background-repeat: repeat-x; }
×
×
  • 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.