• NudeCelebForum has been moved from the vBulletin to the XenForo platform.
    For additional information, see: NCF Moved To XenForo
  • New threads will not be visible until approved by a moderator.

  • Welcome to the forum!
    You must activate your account in order to post and view all forum content
    Please check your email inbox & spam folders for our activation email, then follow the link to validate your email address.
    Contact Us if you are having difficulty posting or viewing forum content.
  • You are viewing our forum as a guest, with limited access.
    By joining you will gain full access to thousands of Videos, Pictures & Much More.
    Membership is absolutely FREE! Registration is FAST & SIMPLE.
    Register Today to join the first, most comprehensive and friendliest communities of nude celebrity fans on the net!

I'm in need of help with HTML/JS...again.

-KA-

Staff Alumn
Joined
Sep 15, 2006
Messages
12,379
Reaction score
40,211
I'm in need of help with HTML/JS...again. I have this big HTML test to do and I have completed 49/50 tests. Now this last one...well I can't get it...Maybe you can help me?

I need to create a green box (using css and <div>), then I need to place a random two-three word text in it, which is all easy. But here's the hard part for me - I need to write a javascript that makes it to pop up an error text box with the random text in it, when I double-click the box. (alert() function - must be used somewhere)




I meant that when i double-click the green box div I created...an alert box (like these error boxes) pops up and displays the text I had written in the green box. How to do that?

Help, PLEASE.
 

deeznutzdp

Registered User
Joined
Sep 8, 2004
Messages
1
Reaction score
2
Give the green div an id (like say <div id="greenbox">)
Then in javascript you should be able to do something like alert(document.getElementById("greenbox").innerHTML);
 

GrapJ

Balki Bartokamus
Joined
Sep 12, 2006
Messages
1,338
Reaction score
2,540
if you want a popup screen you need to use open window and close

or if you use alert

alert("text of your choice")

maybe i just don't understand the question

you can use on_error
 

-KA-

Staff Alumn
Joined
Sep 15, 2006
Messages
12,379
Reaction score
40,211
Thank you, both of you. Both of your suggestions work. Thanks.
 
Top