Jump to content

FeRo

Members
  • Posts

    14
  • Joined

  • Last visited

Posts posted by FeRo

  1. Alright I got it... The image size was too big... It's working now... And it took me hours -.-And I used the $_SERVER['DOCUMENT_ROOT'] variable, that helped too! Thank you! :)

  2. PHP is not accessing the root of your website, it's trying to get a file in the root of the computer that your website is hosted on which is a different directory. Use relative file paths.
    but how am I supposed to do that? I mean the two files are in the same directory...
  3. The problem is, when I leave the slash I get a 500 internal error(in firebug) and I don't know why, because I obviously have the image in my root website folder.

  4. Hi, I've been sitting on this problem for days now...I've got two files:index.php:

    <html>    <head>    </head>    <body>  <img src='getImage.php' />    </body></html>

    getImage.php:

    <?php$img = imagecreatefromjpeg("/datei.jpg");  header("Content-Type: image/jpeg");  imagejpeg($img);  imagedestroy($img);?>

    Those 2 php files and the image are all in the root directory. I think the code is correct and using firebug I don't get an error, but still there is only an empty image icon displayed...I made both php files executable and the imagefile writable just to be sure, but still, no change.Help is reaaaally appreciated!Thanks

  5. Hi! So this is the situation:I've got a window-wrap and inside it I have a window. I want to make the window-wrap draggable, but not the window. Now I guess the window inherits the draggable from the window-wrap, so I tried to turn it off but it doesn't work... This is what I got:

    $(".window_wrap").draggable({containment: '#screen'}); $(".window").draggable("disable");

  6. Like I said, the ajax response is whatever the page outputted. You can see what the output is if you just pull up the PHP page in the browser, whatever the browser shows is the output.
    Thank you for your replies!But why doesn't it work when I type, instead of the $id, some random echo (echo "whatever"; )?It still alerts nothing(it's empty), but when I open the test.php file itself the text does show up....
  7. Thank you for the fast answer!Then how can I get some kind of return value?Or how would you approach this?I'm just trying to get that Session Array back into javascript somehow...

  8. Hi! I've been working on this thing for hours and I would reeeally appreciate some help... I'm using this Code in my js-File:

    function runPosition(the_id, left, top){$.get("test.php?id="+the_id+"&left="+left+"&top="+top, {}, function(position) {   alert(position);});}

    the_id, left, and top are just parameters which are being delivered to this function by some other function (they are correct) And the test.php looks like this:

    <?phpsession_start();$id = $_GET["id"];$top = $_GET["top"];$left = $_GET["left"];$_SESSION[$id] = [$top, $left, $id];return $id;?>

    But the alert() is completly empty and I don't understand why... :( Can u help me? Thanks!

  9. Hey! I tried this code:

    <div value="1" ondblclick="createWindow(this.value)" class="button"></div>

    It's not important what the function createWindow() does, but the "this.value" is just not getting the value "1". It keeps saying that "value" is undefined and I don't know why! :( It may have to do with some other part of the code, so I was just wondering if this should work... Thank You!

  10. Thanks. I guess I forgot to take that out. I used the alert() to see if the function was working at all... I'm just gonna post the whole code because I went through it for hours and still have no clue what could be wrong... (since it is still not working)HTML(+js):

    <html>  <head>    <title>Canvas Paint - Example 5</title><link rel="stylesheet" type="text/css" href="style.css">  </head>  <body>  <script>  function changeColor(color)  {   document.getElementById("chosenColor").style.backgroundColor = color;   alert(color.innerHTML);  }  </script>   <div id="chosenColor"></div>  <div id="c1" onClick="changeColor(this.style.backgroundColor)"></div></body></html>

    CSS:

    #chosenColor {width: 40px;height: 40px;background-color: black;}#c1 {width: 20px;height: 20px;background-color: yellow;}

  11. Hi!I've got a slight problem I'm just not able to work out.I'm trying to change the backgroundColor of a div to the backgroundColor of another div, by clicking on the second one with the following code, but it doesn't work and I have no idea why. Html:

    <div id="chosenColor"></div>  <div id="c1" onClick="changeColor(this.style.backgroundColor)"></div>

    JavaScript:

    function changeColor(color){document.getElementById("chosenColor").style.backgroundColor = color;alert(color.innerHTML);}

    CSS:

    #chosenColor {background-color: black;}#c1 {background-color: yellow; }

    Thank you in advance!

×
×
  • Create New...