Trying to make my own project

@emgo_dev Good explanation :slight_smile:

Makes sense to me, although it might be a good idea to add e.preventDefault(); inside the click() listener for that tag. That way, a user could open the login page in a new tab if they wanted, or click normally and see the form.

1 Like

@zystvan
So it will look like this?

 $('.sign-in-button').click(e.preventDefault(); (function(){
    sign_in();
  });

});

I just mean, where would I place e.preventDefault();

@printcoder_eric it goes inside the function() {...} part.

$('.sign-in-button').click(function() {
  e.preventDefault();
  sign_in();
});

@zystvan @emgo_dev @amanuel2 @stetim94 @mrjlopez

Ok I see. Are there any more problems? Let me try what it well do in the preview.(sometime later)Ok, it still isn't working. By the way I also followed emgo_dev's advice of changing 'Sign In' to plain text.Also, I am using the Brackets Editor, one good thing about it is that they can preview the results of an Html page into a browser window.

Wait, I never told you would I wanted to do right? Well I the user to be able to click the sign in button and then a drop down for the sign in comes down).

In case anybody needs the pen again(I also did some switching around).

1 Like

@printcoder_eric Itā€™s working for me right now. Did you change anything since you posted that?

I didn't do change anything because I was on a trip. Sorry now it works.

Also, how can I make it actually serve as a 'sign in' (such as the one on CodeAcademy). I use JavaScript, right?

The sign-in would either use cookies/session, a database/php, or you could write a userā€™s registered information to a file with php and retrieve that file text depending on their cookie, or the credentials they use to sign in with.

The most practical method that everyone uses is a database. User information is stored in a table.[quote=ā€œprintcoder_eric, post:53, topic:18477, full:trueā€]
@emgo_devYou mean an SQL database?
[/quote]
Yes

@emgo_dev

You mean an SQL database?

Also it doesn't seem to work in my browser preview but it does work in the pen (I am talking about the sign in button). Any help?

@stetim94 @emgo_dev @amanuel2 @zystvan @mrjlopez
Also, I added a video tag (code here) to my html.

You added a local file to a codepen? That is not going to work. this:

file:///Users/eric/Desktop/SciSols/SciSols_Announcement.mp4

indicates to me the file is on your computer, which works fine on your computer, but not on codepen, codepen canā€™t access this, if it could, everyone could just access your computer from the internet, lets say that would be a tiny security problem

edit, hold on, i am stupid. Guess i havenā€™t used windows in a while. The source should be C:\Users\ericā€¦
windows use backslash (i could make a horrible joke here), so the path should contain backslashes.

I know that. But it isn't really working that well on my own computer either.

I edited my answer, your path is incorrect (sorry, havenā€™t used windows in ages to program)

How to do that? I mean, I know how to create a table but how to put information in via {insert language here(PHP,HTML}.

Well, given you use windows i recommend xampp, this will give you a webserver in your lan with database + php, then you just need to learn it. php is server side language, you need something to make it work. xampp is a good start

in that case, the path should be:

/Users/eric/Desktop/SciSols/SciSols_Announcement.mp4

I have no idea about mac, but it also unix based. and i googled, this seems to be the path you need

@stetim94

Isn't that what I used?

I use Mac OSX El Capitan not Windows. By the way, what do you use?

Assuming MySQL, the only way to manipulate itā€™s data is with itā€™s own queries. To do so externally you use a language that bridges the connection. PHP has features built in that allow you manage a database. There are tutorials available for how to do this, but itā€™s not something I would explain.

nope, you used:

file:///Users/eric/Desktop/SciSols/SciSols_Announcement.mp4

and it should be:

/Users/eric/Desktop/SciSols/SciSols_Announcement.mp4

that is different. Mac is fine. I use linux, both unix derivatives. You can also set up xampp for mac, you read about here

@emgo_dev, i am personally not a huge fan of w3fools, and some people here nail it why. For example, it took ages to update there php statements to prepared statements, which is a must for security reasons

1 Like