Skip to content

Commit

Permalink
firebase
Browse files Browse the repository at this point in the history
  • Loading branch information
aakash1234567 committed Sep 7, 2020
1 parent 6822325 commit d46986f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Binary file modified .vs/slnx.sqlite
Binary file not shown.
1 change: 1 addition & 0 deletions contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ <h3>1.800.000.0000</h3>
<script src="js/vendors/map.js"></script>
<!-- The core Firebase JS SDK is always required and must be listed first -->
<script src="https://www.gstatic.com/firebasejs/7.19.1/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.19.1/firebase-database.js"></script>
<script src="js/main.js"></script>
</body>
</html>
13 changes: 7 additions & 6 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@ function checkmail(input){
appId: "1:316714595807:web:b7242af53393cb1a44806a"
};
firebase.initializeApp(firebaseConfig);

// Get a reference to the database service
var database = firebase.database();
var errors = "";
if(name.value == ""){
name.className = 'error';
Expand All @@ -342,10 +343,10 @@ function checkmail(input){
{

firebase.database().ref('feedback').push({
name: name,
email: email,
phone: company,
message: msg
name: name.value,
email: email.value,
phone: company.value,
message: msg.value
}, function(error) {
if (error) {
// The write failed...
Expand All @@ -355,7 +356,7 @@ function checkmail(input){
$('#contact_form').fadeOut(1000);
$('#contact_message').fadeIn(1000);
document.getElementById("contact_message");
return true;
//return true;
}
});
}
Expand Down

0 comments on commit d46986f

Please sign in to comment.