[Proto-Scripty] -tag problem

Sun, 19 Apr 2009 03:45:08 -0700

When I'm trying to embed a YouTube-video, I'm using the standard embed-
code of YouTube (without a classid in the object-tag).

Besides the embed-code I've got these three pieces of code on a page:

// QUOTE COMMENT
<script type="text/javascript">
// <![CDATA[
function quoteComment(url,data) {
  var aj = new Ajax.Request(
  url, {
   method:'get',
   parameters: data,
   onComplete: getResponsea
   }
  );
}
function getResponsea(oReq) {
  $('comment_txtarea').value = oReq.responseText;
}
// ]]>
</script>

// EDIT COMMENT
<script type=\"text/javascript\">
// <![CDATA[
 new Ajax.InPlaceEditor('edit-".$comment["id"]."', '/controller/
updatecomment.php', {
 cancelControl: false,
 clickToEditText: 'Klik hier om je bericht te bewerken',
 savingText: 'Bijwerken..',
 okText: '',
 highlightcolor: '#cdeaff',
 rows:5,
 cols:63,
 callback: function(form, value) { return 'commentid=".$comment
['id']."&user=".$comment['user_id']."&content=' + encodeURIComponent
(value) },
 loadTextURL: '/controller/getcomment.php?id=".$comment["id"]."'
 });
// ]]>
</script>

// ADD COMMENT
<script type="text/javascript">
// <![CDATA[
document.observe('dom:loaded', function() {

        function sendForm(event){
        Event.stop(event);
        var oOptions = {
        method: "POST",
        parameters: Form.serialize("commentForm"),
        asynchronous: true,
        onFailure: function (oXHR) {
                $('feedback').update(oXHR.statusText);
        },
        onLoading: function (oXHR) {
                $('feedback').update('<img src="/template/images/waita.gif"
height="16" width="16" align="absmiddle" /> <strong>Opslaan..</
strong>');
        },
        onSuccess: function(oXHR) {
                Form.disable('commentForm');
                $('feedback').fade({ duration: 1.0, from: 0, to: 1 });
                $('feedback').update(oXHR.responseText);
        }
};
var oRequest = new Ajax.Updater({success:
oOptions.onSuccess.bindAsEventListener(oOptions)}, "/controller/
addcomment.php", oOptions);
}
Event.observe('submitButton', 'click', sendForm, false);

});
// ]]>
</script>

If I try to add a comment in Internet Explorer, the comment isn't
posted by AJAX, I'm also getting the error that there is needed an
object on line 3937 (Prototype V1.6.0.3). If I remove the Quote and
Edit-code, the comment is posted fine by AJAX. If I remove either the
Quote OR the Edit-code, the comment isn't posted by AJAX. If I'm
putting the classid in the <object>-tag, the comment is posted fine by
AJAX.

This is only in Internet Explorer (only tested in IE7), in FF it's
working fine.

What's the problem??

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to