SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru
    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{} {  ??? }});

  2. #2
    SitePoint Guru
    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?

  3. #3
    SitePoint Guru
    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

  4. #4
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dimis283 View Post
    document.objerve
    Just a wild guess, but shouldn't that be document.observe ?

  5. #5
    SitePoint Guru
    Join Date
    Mar 2006
    Posts
    701
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kyberfabrikken View Post
    Just a wild guess, but shouldn't that be document.observe ?
    I thing it was a typing error!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •