Hello, I'm pretty new to this. Using 1.6.0.3, though tried 1.6.1 and
it didn't make a difference. Oh, and thanks for a great framework btw.
I have a form where I'm generating rows on the fly. One of the form
fields is using Ajax.autocompleter, so based on this link (http://
proto-scripty.wikidot.com/prototype:how-to-load-scripts-dynamically),
I'm loading the script dynamically. Example:
function generateAutoCompleter()
{
var head;
var autoCompleterScript;
head = $$('head')[0];
if (head)
{
autoCompleterScript = new Element('script', { type: 'text/
javascript'});
$(autoCompleterScript).insert("var
autocomplete_oop_description_" +
numOopRows + " = new Ajax.Autocompleter(\"oop_description_" +
numOopRows + "\", \"oop_autocomplete_choices_" + numOopRows + "\",
\"<cfoutput>#CGI.SCRIPT_NAME#</cfoutput>?
event=er.form.item.descriptions\",{minChars:\"3\",paramName:
\"description_parameter\"});");
head.appendChild(autoCompleterScript);
}
}
Note that numOopRows is a global variable that is set elsewhere
This works fine in Firefox and Chrome, but IE is giving me Unexpected
call to method or property access. Looks like the error is occurring
on line 604 of prototype.js.
A couple things - I've tried "chaining a call" using .update when
creating the element, but that wasn't working in either browser. Is
there another way to generate the content of the script?
One thing that did work in both browsers was to add a src attribute
pointing to a file with the contents of the js to create the
autocomplete - however, this is not really an option to me because I
need to pass the numOopRows variable.
Thanks in advance.
--
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.