Problem typing into form text field

Page: 1

Author Post
Member
Registered: May 2009
Posts: 9
I'm using floatbox 3.51 to display a div with a simple form. When displayed in the main page, the forms works fine. However, when the div is popped up inside a floatbox, I can't type any whitespace characters into the text field.

Here's what I have:


<!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>
<script type="text/javascript" src="/floatbox/floatbox.js"></script>
<link rel="stylesheet" type="text/css" href="/floatbox/floatbox.css" />
</head>
<body>
<div id="my_div">
<form>
<input type="text" name="my_text" />
</form>
</div>

<a href="#my_div" class="floatbox">Start</a>
</body>
</html>


I'm using Firefox 3.0.10 on Mac OS X.
Administrator
Registered: Aug 2008
Posts: 3382
Forms are best loaded as iframe content from a separate page. When loaded from inline, the keyboard handler can interfere with data entry, as you found out. The space key is not available and you can't tab between form fields.

To load this as an iframe, put your form by itself on its own page and then refer to that page url in a floatboxed anchor on your main page. When it runs as iframe content, it gets its own keyboard handler separate from the main page one.

Page: 1