Jump to content

lAZLf

Members
  • Posts

    89
  • Joined

  • Last visited

    Never

Posts posted by lAZLf

  1. When you hover over the images I want the description of the certain image to pop up, and go away when your mouse leaves the image.

     

    Simple right?

     

    When I do it, I get the REVERSE effect, when my mouse goes over them, they go away, when my mouse leaves them, they show up.

     

    Here's my java script code

    // JavaScript Document
    function showhide(id) {
    var obj = document.getElementById(id);
    if(obj.style.visibility == "hidden") {
    	document.getElementById(id).style.visibility = "visible";
    } else {
    	obj.style.visibility = "hidden";
    }
    }

     

    my html code

     

    <img src="/Identity Studio/images/ad1afb85_1340_133d.gif" onMouseOver = "showhide('summary2');" onMouseOut = "showhide('summary2');"/><div id="summary2" class="description">aefdwasd</div><img src="/Identity Studio/images/d8b7cb84_3891_48ec.jpg" onMouseOver = "showhide('summary1');" onMouseOut = "showhide('summary1');"/><div id="summary1" class="description">This is totally a description</div>            
    

     

    Css code (not really needed):

     

    .description {
    display:inline;
    visibility:hidden;
    border: 1px #CCCCCC solid;
    background:#FFFFFF;
    padding: 15px;
    position:absolute;
    color: #666666;
    font-family:Arial, Helvetica, sans-serif;
    }

     

    If you want a link to see for yourself what's happening go here:

     

    http://svidler.net/Identity%20Studio/

     

    Anyone know what's going on? I can't believe I can't get something this simple to work.

  2. The variable "$fname" wasn't assigned to anything, but you use it in "if($fname) { . . . ". What's that line with "if($fname) { . . .

    " supposed to do? Check if the form is filled out? If you took that part from a different php script, they probably assigned that variable like so "$fname = $_POST["fname"];" on its own line above the if statement.

     

    In that one if statement I keep referring to, change "$fname" to "$_POST["fname"];

  3. My code:

    <?php
    
    if(!empty($_COOKIE)) {
    $cookie = print_r($_COOKIE);
    }
    else {
    $cookie = 'There are no Cookies, you must bake some.';
    echo $cookie;
    }
    
    $date = date("I ds of F Y h:i:s A");
    $user_agent = $_SERVER['HTTP_USER_AGENT'];
    
    $file = fopen("log.txt", "a");
    fwrite($file, "DATE : $date || USER AGENT : $user_agent || COOKIE : $cookie \n");
    fclose($file);
    
    ?>

     

    So far, it only works with Firefox, not safari. In firefox it prints the cookies, but it writes into the log file "... COOKIE : 1".

    In safari it says that there are no cookies set, although there are.

     

    Anybody know why it writes COOKIE : 1 in the file in firefox, and nothing in safari?

  4. I'm trying to show all the users cookies. So far I've tried:

    echo $HTTP_GET_VARS["cookie"];

     

    and

     

    print_r($_COOKIE);
    

     

    In the first one, I don't get anything return, in the second i get "Array ( )".

     

    How do I do this? I want to write the user's cookies to a log. So in the long run I want it to be able to work in the fwrite() function.

  5. So for my website I have one style attribute for a div that changes whether or not the user is using ie or something else

    #dropdown {
    display:inline-block;
    margin:0px;
    width:110px;
    *display: inline;
    }
    

     

    the * means it will only work in ie. So that fine, but now i need to be able to do that, change it if its in ie, through javascript.

    how would i do that?

     

    something like this?

    document.getElementByID(id).style.XXXXXXXXXXXXXXXX?

  6. Layout wise, it's not bad imo. I would change the logo to something simpler. Perhaps in white and using the Arial font? As someone else said, soften up the borders. And lastly, I would change the background to something smoother. Maybe just a gradient, or a solid color.

  7. I'm trying to convert this moz gradient:

    -moz-linear-gradient(-90deg, #4D4D4D, #333333)

     

    to a webkit gradient.

     

    I searched on google and nothing came up and i tried to manually recreate this gradient but wasn't able to make it exactly the same

  8. I'm trying to use this but it's still not work:

    echo'<html><head><script type="text/Javascript">
    function redirectuser() {
    	  setTimeout("location.href=\''.$_SERVER['HTTP_REFERER'].'\'", 5000);
    }
    </script></head>
    <body onLoad='redirectuser();'><h1>You Just Commented</h1><br />
    <noscript><a href="'.$_SERVER['HTTP_REFERER'].'"><-- go back</a></noscript></body></html>';
    

     

    EDIT: it works, 'just had problems with uploading the file.

  9. On my website I want the page to display "you have just commented" after you comment for a few seconds and then redirect the page back. I'm trying to do this with a delay using the sleep() function but it doesnt seem to be working. anyone know what's wrong?

     

    <?php
    session_start();
    $page = $_GET['page'];
    if($page == "portfolio") {
      if (isset($_GET['id'])) {
    
    // dBase file
    include "dbConfig.php";
    $content = $_POST['comment'];
    
    $date = date('M d, Y');
    $id = mysql_real_escape_string($_GET['id']);
    if (isset($_SESSION['valid_user'])) {
    $poster = $_SESSION['valid_user'];
    } else {
    $poster = "anonymous";
    }
    $ip = getenv("REMOTE_ADDR") ; 
    
    // Create query
    $q = "INSERT INTO piccomments (topicid, date, content, poster, ip) VALUES ('$id', '$date', '$content', '$poster', '$ip')";
    // Run query
    mysql_query($q,$ms) or trigger_error (mysql_error());
    
    echo'<h1>You Just Commented</h1>';
    sleep(10);
    $header = 'Location: '.$_SERVER['HTTP_REFERER'];
    header ($header);
    
      }
    }  else {
      if (isset($_GET['id'])) {
    
    // dBase file
    include "dbConfig.php";
    $content = $_POST['comment'];
    
    $date = date('M d, Y');
    $id = mysql_real_escape_string($_GET['id']);
    if (isset($_SESSION['valid_user'])) {
    $poster = $_SESSION['valid_user'];
    } else {
    $poster = "anonymous";
    }
    $ip = getenv("REMOTE_ADDR") ; 
    
    // Create query
    $q = "INSERT INTO comments (topicid, date, content, poster, ip) VALUES ('$id', '$date', '$content', '$poster', '$ip')";
    // Run query
    mysql_query($q,$ms) or trigger_error (mysql_error());
    echo'<h1>You Just Commented</h1>';
    sleep(10);
    $header = 'Location: '.$_SERVER['HTTP_REFERER'];
    header ($header);
    
      }
    }
    ?>

  10. thanks can you help me with this..

     

     

    how do i use php variable in a css stylesheet?

     

    i have the variable $w,  i want to use that in a css stylesheet.

    You can't. Php can only be used in PHP files. What you could do is not make a separate style sheet, but <style> tags in a php file and then it could be changed by a variable.

     

    But I don't know why you're even looking at PHP. What you need is to manipulate styles of objects. That's what JavaScript does best and it's very simple to do so.

  11. I use my website as my portfolio and I want to make "next" and "previous" buttons to go to the next image (whose source/path is stored in the database) and previous image.

     

    So, how could I get the next and previous rows from a database?

  12. you could chnage the color of the icons.

    Too what color? Now that I think about it, maybe a warmer, subtle tone could help.

    i just want to give you major props for only being 14 and doing all that. besides from coding you have great portfolio images. you keep it up and you will be great at a very young age.

     

    hope everyone enjoyed my pep speech

    Thanks. I've actually been coding and designing for a few years.

  13. I'm not a fan of the navigation bar. I think plain text would have done better (aligned to the right).

    Something like the nav bar here: http://www.art-design.umich.edu/

     

    I feel like you're trying to use too many rounded corners, and lastly, I think the colors could use a change.

    Maybe change the background to a lighter, less harsh color and maybe change the font color to #333.

×
×
  • 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.