What's new
  • Howdy, Guest!

    We have issued a forced password reset on all user accounts, meaning you will not be able to login until this process is complete. Instructions will be displayed when you login with your previous credentials, however if for any reason you do not have access to your associated email address, you will need to contact us at [email protected].

    For more information, please read this Important Announcement

    Thank you for being awesome!

Web Javascript homework help

  • Thread starter Lucifers Dog
  • Start date
  • Views 359
Lucifers Dog

Lucifers Dog

Enthusiast
Messages
318
Reaction score
83
Points
150
Sin$
0
So I finished all my assignment except the last part. If anyone can help out that would be great. The part that I don't get it the section where it says to add an on-load method.

My assignment can be found here:

[Click here to view this link]

Thanks.
 
Y

YYes

Enthusiast
Messages
177
Reaction score
52
Points
85
Sin$
7
Code:
app.Screen.prototype.hide = function() {
this.getDiv().style.display = 'none';
};
idk
 
Lucifers Dog

Lucifers Dog

Enthusiast
Messages
318
Reaction score
83
Points
150
Sin$
0
Code:
app.Screen.prototype.hide = function() {
this.getDiv().style.display = 'none';
};
idk


Thanks so I guess after this code I should rewrite the show function to use the Hide function right?
 
Y

YYes

Enthusiast
Messages
177
Reaction score
52
Points
85
Sin$
7
Well, that's the thing, I'm not sure where to call that function. Maybe in the div's onload?
Code:
<div onload="app.Screen.prototype.hide()">

And apparently onload is censored, but on-load isn't.
 
Lucifers Dog

Lucifers Dog

Enthusiast
Messages
318
Reaction score
83
Points
150
Sin$
0
Well, that's the thing, I'm not sure where to call that function. Maybe in the div's ******?
Code:
<div ******="app.Screen.prototype.hide()">

And apparently ****** is censored, but on-load isn't.


So I just had to create the hide function like the one you listed and then just implement it into the show method. Was simpler than I thought. Thanks for the help.
 
Top Bottom
Login
Register