Welcome Guest, Not a member yet? Register   Sign In
javascript variable to form from different views
#2

[eluser]sirfilip[/eluser]
I believe that the js cant find the document you are looking for cause it should be
called after the document has been loaded in order to perform getDocumentById successfully. Try to place the javascript functions into an window or document.onload = function() { here };

Anyway the much better solution will be using an unobtrusive javascript ex. try adding a autocompleatable class to the input field you try to auto complete and target that field with the js.
<input type="text" class="normal css classes and autocompletable" value="whatever" />

using jquery for ex
$(document).ready(function(){
$('.autocompleatable').onsomeevent(function() {
// add autocomplete behavior....
});
});


Messages In This Thread
javascript variable to form from different views - by El Forum - 04-05-2011, 08:42 AM
javascript variable to form from different views - by El Forum - 04-06-2011, 05:44 PM
javascript variable to form from different views - by El Forum - 04-07-2011, 12:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB