We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,506 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

How can I call a Javascript event on HTML div border corners?

It sounds confusing, but is quite simple. I have a
square div, and using css I have four circles
replacing the corners of the of the divs border. I
want the user to be able to click on one of the
corner circles changing the curser image and
calling the Javascript onclick event. How do I did
that?

3
Contributors
6
Replies
1 Day
Discussion Span
1 Year Ago
Last Updated
7
Views
Question
Answered
Joe34
Junior Poster in Training
92 posts since Nov 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Do you use border images or border-radius?

twiss
Veteran Poster
1,005 posts since Apr 2010
Reputation Points: 177
Solved Threads: 102
Skill Endorsements: 5

Border images

Joe34
Junior Poster in Training
92 posts since Nov 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Well, than you can just assign onclick events to those images. PPK talks a lot about that here (traditional) and here (W3C and MS).

twiss
Veteran Poster
1,005 posts since Apr 2010
Reputation Points: 177
Solved Threads: 102
Skill Endorsements: 5

Well, than you can just assign onclick events to those images. PPK talks a lot about that here (traditional) and here (W3C and MS).

Sorry, I'm getting little confused ;)

I have a div with a black border...

<div style="border: 2px solid black;">&nbsp;</div>

I want the bottom right corner to have a small circle instead of the border. How can I do that? Also, when the user clicks the bottom right corner I want an onclick event to take place. So can you transform that code above to what I'm looking for?

Joe34
Junior Poster in Training
92 posts since Nov 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Position an image that has that on that place?

twiss
Veteran Poster
1,005 posts since Apr 2010
Reputation Points: 177
Solved Threads: 102
Skill Endorsements: 5

As @twiss says, position the image on this place and attach the event to the image. Just simple CSS.

ko ko
Practically a Master Poster
673 posts since Jan 2009
Reputation Points: 120
Solved Threads: 152
Skill Endorsements: 1
Question Answered as of 1 Year Ago by twiss and ko ko

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0810 seconds using 2.69MB