Forum Moderators: open

Message Too Old, No Replies

iframe & textfield = dropdown too low

         

webmokk

2:28 am on Aug 26, 2006 (gmt 0)

10+ Year Member



Hey there!

When i revisit my form in an iframe the dropdowns with my recent entries show up way too low. Like 20px under the actual field. It must be the iframes fault (stupid iframe!) because it works without it just fine. yeah, but i need to get it to work in the iframe.

Anyone?

tedster

4:08 am on Aug 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums, webmokk. How are the dropdowns positioned? It sounds like a possible absolute positioning problem.

webmokk

6:47 am on Aug 26, 2006 (gmt 0)

10+ Year Member



Thanks!
Well, the dropdowns are not positioned. It's just regular textfields in a form - and the dropdowns appear to show what got entered at earlier visits (recent entries).
I never worked with absolute positioning...

tedster

7:20 pm on Aug 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



OK -- not sure I understand the situation then. First thing to check in rendering problems is that the mark-up has no nasty errors:
W3C Validator - HTML [validator.w3.org]

If that's all OK -- then we need the DTD and a short snippet of the HTML (replace urls with "example.com")

webmokk

11:55 pm on Aug 28, 2006 (gmt 0)

10+ Year Member



ok here the code for the main page:
--------------------------------------

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>IFRAME Test</title></head>

<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle"><table width="400" border="1" cellspacing="0" cellpadding="0">
<tr>
<td height="50"></td>
</tr>
<tr>
<td><iframe src="content.html" name="content" width="500" height="400" scrolling="Yes" frameborder="0" id="content"></iframe></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>'

--------------------------------------
ok here the code for the content.html page:
--------------------------------------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>content</title>
</head>

<body>
<form id="form1" name="form1">
<label>name
<input type="text" name="textfield" />
</label>
<p>
<label>
<input type="submit" name="Submit" value="Submit" />
</label>
</p>
</form>
</body>
</html>

--------------------------------------

Now fill out the textfield and hit submit. then doubleclick into the textfield again. The dropdown with the recent entries is now way too low.
It seems the recent entry dropdown refers to the parent frame and not to the iframe and adds the 50 px from the parent table.

I've checked out absolute positioning but i need to center the page in the browser and it got too comlicated.

webmokk

10:16 pm on Aug 31, 2006 (gmt 0)

10+ Year Member



This must happen to everybody who has a form in an iframe. Is there any way to get this to work?

opifex

1:38 am on Sep 1, 2006 (gmt 0)

10+ Year Member



this indeed happens when you plug a xhtml or php pahe with a foem into an iframe. also you might see extra space at the bottom of the frame .... try html loose
old, but generally works and solves the problem
but depends on the browser

webmokk

1:05 am on Sep 2, 2006 (gmt 0)

10+ Year Member



Thanks opifex for you input!
"html loose"? never heard of it - probably used it without knowing :)
Can you give me an idea what it is and how it would work?