These are chat archives for synrc/n2o

22nd
Dec 2015
Ram Kumar
@ramka001
Dec 22 2015 07:26

Hi,

I'm trying to do a basic alert using the event by clicking the button but I don't seem to get any response. When I try to trace on the Erlang observer, I notice that only GET requests are being made, no POST requests. I'm unable to produce the LOG output or the alert. Any advise on this would be much appreciated.

registration()->
[

#'div' {id=firstNameDiv, class=["form-group"],  body=[
  #'div' {id=firstNameDivCol, class=["col-md-12"], body=[
    #input {id=fName, type="text", class=["form-control"], name="firstName", placeholder="First Name", autofocus=true }
      ]
    }
  ]
},

#'div' {id=lastNameDiv, class=["form-group"],  body=[
  #'div' {id=lastNameDivCol, class=["col-md-12"], body=[
   #input {id=lName, type="text", class=["form-control"], name="lastName", placeholder="Last Name", autofocus=true }
     ]
   }
 ]
},

#'div' {id=emailDiv, class=["form-group"],  body=[
  #'div' {id=emailDivCol, class=["col-md-12"], body=[
    #input {id=eMail, type="text", class=["form-control"], name="email", placeholder="Email Address", autofocus=true }
      ]
    }
  ]
},

#'div' {id=passwordDiv, class=["form-group"],  body=[
  #'div' {id=passwordDivCol, class=["col-md-12"], body=[
    #input {id=pWord, type="password", class=["form-control"], name="password", placeholder="Password", autofocus=true }
      ]
    }
  ]
},

#'div' {id=signupButtonDiv, class=["form-group"],  body=[
  #'div' {id=signupButtonCol, class=["col-md-12"], body=[

    #button {id=signupButton, type="button", class=["btn btn-info"],  body="Sign Up",
      source=[fName, lName, eMail, pWord], postback={signup} }
    ]
  }
 ]
}

].
event(signup) ->
wf:wire(#alert{text="N2O"});
event(_) -> [].

Andy
@m-2k
Dec 22 2015 15:18
@fycth пофиксал баги эрлача с вылетами по памяти как на сервере так и в браузере :smile:
erl-hires-bpg.jpg
Namdak Tonpa
@5HT
Dec 22 2015 15:22

@ramka001 your mistake is here:

postback={signup}

you specify {signup} postback while in your event you are catching signup.
you should change to

event({signup}) ->
Andy
@m-2k
Dec 22 2015 15:45
17.2 MB JPG файл с камеры bpgenc превратил в 3.7 MB лол
bpgenc -e x265 -m 6 -b 8 -q 21
7251x4079