Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

page sends to homepage once button clicked #2

Open
daisys77 opened this issue Apr 3, 2018 · 4 comments
Open

page sends to homepage once button clicked #2

daisys77 opened this issue Apr 3, 2018 · 4 comments

Comments

@daisys77
Copy link

daisys77 commented Apr 3, 2018

hi i am using your code, my problem is once the submit button is pressed it sends me back to the homepage. do you know how to get the page to stay on the contact page and not divert to different page,

thank you for the code

@Datikzz
Copy link

Datikzz commented Apr 3, 2018

Hi, you might be missing preventDefault(), thus it redirect to different page

i can check the issue if you show me code on codepen, jsfiddle, jsbin or whatever

@daisys77
Copy link
Author

daisys77 commented Apr 3, 2018 via email

@Datikzz
Copy link

Datikzz commented Apr 4, 2018

apparently you didn't initialize "firebase", console is warning with this

ReferenceError: Can't find variable: firebase

you are missing these, author did mention to add your own data

// Initialize Firebase (ADD YOUR OWN DATA)
var config = {
  apiKey: "xxxxx",
  authDomain: "xxxxx",
  databaseURL: "xxxxx",
  projectId: "xxxxx",
  storageBucket: "xxxxx",
  messagingSenderId: "xxxxx"
};
firebase.initializeApp(config);

and put this before the closing tag
<script src="https://www.gstatic.com/firebasejs/4.3.0/firebase.js"></script>

@daisys77
Copy link
Author

daisys77 commented Apr 4, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants