64 689
Assignments Done
99,3%
Successfully Done
In September 2018

Answer to Question #4578 in AJAX | JavaScript | HTML | PHP for yuganthi

Question #4578
how to use java to insert image
Expert's answer
Here is the example of a code that opens a window with an image with specified parameters:

function openImage(name,w,h)
{
& var ImgWin = window.open('', ""+name+"", config="height="+h+",width="+w+"");
& ImgWin.document.write("<HTML><TITLE>" + name + "</TITLE>")
& ImgWin.document.write("<IMG onClick='self.close()' src='Dir/" + name + ".jpg'>")
& ImgWin.document.write("</body></HTML>")
}

To use it, add

onClick="openImage('name','100','200')"

to the current img tag.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions