lundi 20 avril 2015

How to call javascript functions from the views of rails?

I have got javascript function which popup the new screen . I have to use that javascript in view of rails so that after it opens into new window .

This is the script in /app/assets/signup.js

<script type="text/javascript">

function popup(){
  cuteLittleWindow = window.open("signup.html", "littleWindow", "location=no,width=320,height=200"); 
}

</script>

&& i have got /views/index.html.erb

HOW CAN USE javascript function IN THE index.html.erb

Aucun commentaire:

Enregistrer un commentaire