Jump to content

skym

Members
  • Posts

    253
  • Joined

  • Last visited

Posts posted by skym

  1. Interesting rollover, never thought of it. It's all done in CSS, no JS at all.All menu buttons are 'mainlevel' class, and the CSS for them is:

    a.mainlevel:link, a.mainlevel:visited {	background: url(../images/menu_bg.png) no-repeat;...}a.mainlevel:hover {	background-position: 0px -25px;...}

    So the button has a png image as background, which is moved up 25px on mouseover. If you look at menu_bg.png, you will see it has 50px in height, the upper half if just a fade of gray (which you see initially in the background of the button), and in the lower half you have the sniper (what you see at mouseover when this image is moved up). The text on the buttons are plain texts.

  2. There thousands of scripts to bookmark a page.I use:function setBookmark(url,str) { if(str=='')str=url; if (document.all) window.external.AddFavorite(url,str); else alert('Press CTRL-D or CTRL-T to add a bookmark to:\r\n"'+url+'".'); }Rarely, I don't think it's used very much. The user can bookmark your page at any time without any links, plus he probably wants to store the link in a certain category of his bookmarks.

  3. So, on all pages where the button appears, there must besession_start();and then$memberid=session_id();(you can't use session_id() without session_start before it).And in the link you type:<a href="showcart.php?memberid=<?php echo $memberid; ?>" ...>

  4. You can use % (mod operator) to see if a number is odd or even.if ($no % 2 != 0)echo "odd";elseecho "even";Probably you can also use (but it's a little harder to understand):if ($no & 1)echo "odd";elseecho "even";

  5. It is possible to store files in MySQL databases (like images), but it's not recommended, it's a little harder to backup and I think it would be much slower than using simple files on the server.

  6. Cant believe I missed that, but it still isn't working.
    I didn't see it yesterday, put method="post" in the <form>, and also changeif ($badlogin = 0) {toif ($badlogin == 0) {
  7. There is no 'memberid' generated when you click on the "SHOPPING CART" menu button.You made the scripts? If not, you should see how the 'memberid' is generated on the submitcart.php page, then do that on every page where the "SHOPPING CART" appears and put it in the href for the button (like showcart.php?memberid=...). It looks like a session id.

  8. You can use foreach to make the string of those numbers:

    $str = "";foreach($_POST['idemid'] as $value) {$str .= (int)$value.",";}$str = substr($str,0,-1);$query = "DELETE FROM mf_links WHERE itemid(".$str.")";...

  9. With name="itemdel" you will get the value of the last checked box.With name="itemdel[]" you get an array with all the values of the checked boxes. Just var_dump($_POST['itemdel']); and you'll see them.

  10. I'm lost... I don't really understand what you want. Anyway, you don't need to set height/width when using open().To find out the current window size, I have some code, I'm not sure if it's working:

    // Simple Browser Check//var moz = (document.getElementById && !document.all) ? 1 : 0;var dom = (document.getElementById) ? true : false;var ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;var ie4 = (document.all && !dom) ? true : false;if (ie5 && ie4)	moz = true;	else	moz = false;// Browser Window Dimensionsfunction winWid(){ return (moz) ? window.innerWidth : document.body.clientWidth; }function winHei(){ return (moz) ? window.innerHeight : document.body.clientHeight; }<script>// Example Usevar displaywitdh = winWid();var displayheight = winHei();goodHeight = displayheight-181;//alert('Width = '+displaywitdh+' : Height = '+displayheight);// orig height=846 </script>

    I do not want that to open in a separate window. If I need to change the location of the file how should I make it.
    How about <a> ?
  11. $count = count($ne);What's this for?My proposal:

    <table><?php$ne = 5;$size = ceil($ne/2);for($i=1; $i<=$size; $i++){  $number = $i;  print "<tr><td>Entry $number</td>";  $number = $i +$size;  if ($number <= $ne)  print "<td>Entry $number</td></tr>";  else  print "<td> </td></tr>";}?></table>

×
×
  • Create New...