I cant delete the image from Java

5 replies
Hi ,
I have the below code for Java function which is calling to show image as for hide.PNG,
but I have deleted the image hide.PNG from server where it is calling to show,,,
but still the image is showing up.

what is the issue with this...

function show_box(id)




document.getElementById("1").innerHTML="<img src='hide.PNG' id='video1' onclick='javascript:hide_box(this.id);' alt='Click to hide &quot;YouTube Video Snippet #1&quot; setting' />";

document.getElementById("box1").style.display="blo ck";


java HTML:

<span id="1"><img src="show.PNG" id="video1" onclick="javascript:show_box(this.id);" alt="Click to edit &quot;YouTube Video code#1&quot; setting" /></span><img align="right" src="help.png" alt="Help" onclick="javascript:help_box();" />

<div id="box1" style="display:none;"><textarea name="youtube1" rows="8" cols="39" style="overflow:hidden;"><?php echo $row2["youtube1"];?></textarea></div>

Thanks for any help.
#delete #image #java
  • Profile picture of the author onsmith
    Hey ferenan,

    I want to help you with your problem, but I'm still having trouble understanding what's wrong.

    It sounds like you have a file called "show.png", and this image shows on the page. When you click on this image, it is being replaced with a different image called "hide.png", but you don't want this to happen.

    What should happen when "show.png" is clicked?

    Also, your code is actually javascript, not java. It's super confusing, but JavaScript and Java are actually completely different programming languages!

    Java is used for programming Android apps and some website backends (server-sides), while JavaScript is used only for web programming (traditionally front-end browser programming, but also some back-end server-side programming as well).
    {{ DiscussionBoard.errors[10117472].message }}
    • Profile picture of the author ferenan
      Hi onsmith,

      Thanks for your reply.
      I am sorry ,I am not a programmer so I did not know that java and javascript are different.

      actually the code I mentioned is for opening and closing a box when click on show.png for open the box and close the box when click on the image hide.png.

      I am trying to change the hide.png image with another image but it does not get replaced as I have uploaded the new image into myserver.

      I had success with show.png image but not hide.png and I do not know why.
      I am thinking if the hide.png image is getting called from different area other than the code I mention earlier.

      any idea?
      Thank You
      {{ DiscussionBoard.errors[10117650].message }}
      • Profile picture of the author ferenan
        Just to mention....I have even deleted the old image from server ,but still is showing up.
        this is very confusing for me.
        {{ DiscussionBoard.errors[10117714].message }}
  • Profile picture of the author Member8200
    Oh, Maybe the format of the codes is not directly link to your database? Do you have? The code must be directly linked to Database. Check the codes again
    {{ DiscussionBoard.errors[10119751].message }}
    • Profile picture of the author ferenan
      Originally Posted by Member8200 View Post

      Oh, Maybe the format of the codes is not directly link to your database? Do you have? The code must be directly linked to Database. Check the codes again
      Thanks for your comment.
      Sorry but I do not get what you mean...

      it is simply 2 images as show.png and hide.png which the first one open a box and the other one is closing the box when click on.

      I have mentioned the code in my earlier thread above and I do not know if they are directly linked to database or not as what you asked.

      As for me ,I can see clearly that the code has a link to hide.png image .
      Thank you
      {{ DiscussionBoard.errors[10119814].message }}

Trending Topics