Jump to content

iframe display images


priyank

Recommended Posts

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

</head>

<body>

<form action="showPictures.php" method="GET" target="imageFrame">

<select  name="dropdown" onchange="this.form.submit()">

<option value="" selected> </option>

<option value="1">Image1</option>

<option value="2">Image2</option>

<option value="3">Image3</option>

</select>

</form>

<iframe name="imageFrame" align="middle" height="600px" width="500px" border="1">

</iframe>

</body>

 

I can display and see the images from php file but image is displayed in new window.

I want to display image in the iframe name="imageFrame".

Do i need to use javascript

Link to comment
https://forums.phpfreaks.com/topic/154478-iframe-display-images/
Share on other sites

You might want to try:

 

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

</head>

<body>

<form action="showPictures.php" method="GET" target="imageFrame">

<select  name="dropdown" onchange="this.form.submit()">

<option value="" selected> </option>

<option value="1">Image1</option>

<option value="2">Image2</option>

<option value="3">Image3</option>

</select>

</form>

<iframe src="showPictures.php" name="imageFrame" align="middle" height="600px" width="500px" border="1">

</iframe>

</body>

 

 

It may be because you havent sourced the iframe, try the code above ^^^

Archived

This topic is now archived and is closed to further replies.

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