0

BrowserPlus and asp.net

I'm trying to integrate BP into a asp.net app and I'm getting errors when the page loads in IE but works okay in FF, when I remove the <form> tag it works in IE, any Ideas?

I know it's failing on this function in IE

BrowserPlus.init(function(res) {

Thanks

Todd

by
3 Replies
  • [quote name='bakert2k' date='Jun 18 2009, 03:29 PM' post='5472']
    I'm trying to integrate BP into a asp.net app and I'm getting errors when the page loads in IE but works okay in FF, when I remove the tag it works in IE, any Ideas?

    I know it's failing on this function in IE

    BrowserPlus.init(function(res) {

    Thanks

    Todd

    *********************************************************************
    Here is the code

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="DragNDrop._Default" %>










    loading...





    <script src="http://bp.yahooapis.com/2.3.1/browserplus-min.js"></script>

    <script type="text/javascript"><br /> function setDropAreaText(txt) {<br /> var div = document.getElementById("myTarget");<br /> while (div.firstChild) { div.removeChild(div.firstChild); }<br /> div.appendChild(document.createTextNode(txt));<br /> }<br /><br /> function hovering(hoverOn) {<br /> if (hoverOn) { setDropAreaText("drop it!"); }<br /> else { setDropAreaText("drag something to me."); }<br /> }<br /><br /> function dropped(arg) {<br /> var div = document.getElementById("lastDropDetails");<br /> while (div.firstChild) { div.removeChild(div.firstChild); }<br /><br /> var title = document.createElement("b");<br /> title.innerHTML = "Last drop details:";<br /> div.appendChild(title);<br /> div.appendChild(document.createTextNode(arg.length +<br /> " files dropped"));<br /> div.appendChild(document.createElement("p"));<br /> var lst = document.createElement("ul");<br /><br /> for (var i = 0; i < arg.length; i++) {<br /> var item = document.createElement("li");<br /> var e = document.createTextNode(arg[i].BrowserPlusHandleName);<br /> item.appendChild(e);<br /> lst.appendChild(item);<br /> }<br /> div.appendChild(lst);<br /> }<br /><br /> BrowserPlus.init(function(res) {<br /> if (res.success) {<br /> BrowserPlus.require({<br /> services: [{ service: &#39;DragAndDrop&#39;}]<br /> },<br /> function(res) {<br /> if (res.success) {<br /> var dnd = BrowserPlus.DragAndDrop;<br /> dnd.AddDropTarget(<br /> { id: "myTarget" },<br /> function(res) {<br /> dnd.AttachCallbacks({<br /> id: "myTarget",<br /> hover: hovering,<br /> drop: dropped<br /> },<br /> function() { });<br /> setDropAreaText("drag something to me.");<br /> });<br /> } else {<br /> alert("Error Loading DragAndDrop: " + res.error);<br /> }<br /> });<br /> } else {<br /> alert("Failed to initialize BrowserPlus: " + res.error);<br /> }<br /> }); <br /> </script>


    0
  • QUOTE (bakert2k @ Jun 18 2009, 03:29 PM) <{POST_SNAPBACK}>
    I'm trying to integrate BP into a asp.net app and I'm getting errors when the page loads in IE but works okay in FF, when I remove the <form> tag it works in IE, any Ideas?

    I know it's failing on this function in IE

    BrowserPlus.init(function(res) {

    Thanks

    Todd


    Tried first in IE8 and it worked. IE6 wasn't happy. I moved the end form tag "</form>" above the script tags, did a "Internet Options / Delete Files", hit refresh and all was well in IE land.

    Let us know if you run into anything else,

    Steve Spencer
    0
  • QUOTE (steven_spencer @ Jun 19 2009, 12:29 AM) <{POST_SNAPBACK}>
    Tried first in IE8 and it worked. IE6 wasn't happy. I moved the end form tag "</form>" above the script tags, did a "Internet Options / Delete Files", hit refresh and all was well in IE land.

    Let us know if you run into anything else,

    Steve Spencer


    Thanks Steve for the reply, this solution worked for me

    Thanks again
    0
This forum is locked.

Recent Posts

in Support & General Questions