I tested on the latest version, IE 7. Firefox is perfect yet I
receive a "Members not found" error with IE?
This occurs during the drop into a droppable area.
Any ideas? Here is the code:
<!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" />
<script src="js/prototype.js"
type="text/javascript"></script>
<script src="js/scriptaculous.js"
type="text/javascript"></script>
<script language="javascript">
function show_element()
{
element = document.getElementById(''new_page_name'');
new Effect.Grow(element);
}
function addElement(element)
{
if ( element == 0 )
element_text = "Element 1";
else if ( element == 1 )
element_text = "Element 2";
parent_element = document.getElementById(''page_container'');
table = Builder.node(''table'',
{width:''500'',cellpadding:''2'',cellspacing:''0'',border:''0''});
tbody = Builder.node(''tbody'');
tr =
Builder.node(''tr'',{className:''header''});
td =
Builder.node(''td'',{className:''td_element'',style:''background-
color:#E9C2A6''},[
Builder.node(''strong'',element_text)]);
tr.appendChild(td);
tbody.appendChild(tr);
table.appendChild(tbody);
parent_element.appendChild(table);
}
</script>
</head>
<body>
<h1>Test Page</h1>
<p>
Your Pages:
<select name = "pages" id = "current_pages">
<option>Main Page</option>
<option>Page 1</option>
</select>
<a href = "javascript:show_element()">Add Page</a>
</p>
<br />
<div id = "new_page_name" style="display:none">
<table width = "200" height = "50" bgcolor =
"#E9C2A6">
<tr>
<td><input type = "text" id = "txtPageName"
/></td><td><input type
= "button" id = "submit" value = "add page"
onclick="" /></td>
</tr>
</table>
</div>
<br />
<p>Select an Element to Add </p>
<div style="margin-bottom:20px;height:120px;">
<img alt="0" class="products" id="product_1"
src="images/text.gif" />
<script type="text/javascript">new
Draggable(''product_1'',
{revert:true})</script>
<img alt="1" class="products" id="product_2"
src="images/
google_video.jpg" />
<script type="text/javascript">new
Draggable(''product_2'',
{revert:true})</script>
</div>
<h2>Your Elements:</h2>
<div id="page_container" class="cart"
style="clear:left; height:
132px;margin-top:10px;">
<div id="items">
</div>
<div style="clear:both;"></div>
</div>
<div style="height:40px;padding-top:10px;">
<p id="indicator"
style="display:none;margin-top:0px;">
<img alt="Indicator" src="images/indicator.gif" />
Adding new
Element...
</p>
</div>
<div id="wastebin">
<img src = "images/trashcan.gif" />
</div>
<div style="height:40px;padding-top:10px;">
<p id="remove_indicator"
style="display:none;margin-top:0px;">
<img alt="Indicator" src="images/indicator.gif"
/>Removing
Element...
</p>
</div>
<script type="text/javascript">
Droppables.add(''page_container'', { accept:
''products'', onDrop:
function(element) { Element.show(''indicator'');
addElement(element.alt); Element.hide(''indicator'') } } );
Droppables.add(''wastebin'', { accept:
''products'', onDrop:
function(element)
{ addElement(element.alt);Element.show(''remove_indicator''); }
} );
</script>
</body>
</html>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---