CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   JavaScript programming (http://www.codingforums.com/forumdisplay.php?f=2)
-   -   roulette javascript (http://www.codingforums.com/showthread.php?t=273844)

andycode 09-22-2012 03:49 PM

roulette javascript
 
Hello! this is my first post.

I am working on a website where I need a roulette. I chose this one.

http://www.switchonthecode.com/tutor...#comment-11861

My problem is that I can not get the text to become a link. (clickable)(a href)

I am new to JavaScript and HTML 5 <canvas>

But I can not get it to work :/

Some good suggestions? I would Greatly appreciate.

Old Pedant 09-23-2012 12:40 AM

What test? And where is your code? We can't see what you did wrong if you don't show us your code.

Philip M 09-23-2012 09:51 AM

Quote:

Originally Posted by Old Pedant (Post 1272419)
What test? And where is your code? We can't see what you did wrong if you don't show us your code.

Text, not test. :) The code is presumably that given in the link.

var restaraunts = ["Wendy's", "McDonalds", "Chick-fil-a", "Five Guys",
"Gold Star", "La Mexicana", "Chipotle", "Tazza Mia",
"Panera", "Just Crepes", "Arby's", "Indian"];

He wants to make each restaurant a clickable link.

xelawho 09-23-2012 04:11 PM

the problem is that text on a canvas is not text but rather a drawn shape, and therefore it's not as simple as turning "normal" html text into a link.

what you basically have to do is save the locations of your text on the canvas and then turn them into clickable regions.

you can google the subject - there are plenty of tutorials out there, but I would say that if you have only a basic understanding of html and js, this is a very ambitious undertaking at this point.

andycode 10-03-2012 10:52 AM

ok thx!!:thumbsup:


All times are GMT +1. The time now is 04:36 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.