SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: javascript var,onload
-
Aug 12, 2008, 00:56 #1
- Join Date
- Mar 2006
- Posts
- 701
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
javascript var,onload
I want to use the autocomplete function of scriptaculous .
I pass the code at a variable (basically the Ajax library of CodeIgniter do this), how can I,at onload function load the value of this variable?
Code:var autocompleter=new Ajax.Autocompleter(.....); document.objerve('dom.loaded',function{} { ??? }});
-
Aug 12, 2008, 01:35 #2
- Join Date
- Mar 2006
- Posts
- 701
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
As I notice when I put the value of the variable at document.objerve the autocomplete works fine but when the code is assigned at variable there is an error this.element has no properties.
What is wrong?
-
Aug 12, 2008, 02:29 #3
- Join Date
- Mar 2006
- Posts
- 701
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I thing I solved it, I put the code for the variable after the html code for the text input that need the autocompletion.
So now is ok as I tested it, maybe not theorically perfect.
Dimis
-
Aug 12, 2008, 02:35 #4
- Join Date
- Jun 2004
- Location
- Copenhagen, Denmark
- Posts
- 6,157
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
-
Aug 12, 2008, 04:45 #5
- Join Date
- Mar 2006
- Posts
- 701
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Bookmarks