/    Sign up×
Community /Pin to ProfileBookmark

Use an image map for searching site

I want to use an image map for something unique. The image would have about 10 to 15 (religious) symbols. When the user clicks on a particular symbol it will search the site for a few strings relating to that symbol. For example: Symbol 1 would be a cross when clicked it search the site for “christ, crucifix, christianity”. I am sure I can make the image map but how do I make the image map call a function instead of a link.

Thank You
Matt S

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@tirnaFeb 11.2011 — I am sure I can make the image map but how do I make the image map call a function instead of a link.

Thank You

Matt S[/quote]


Put an onclick in the <area /> tag to call your function. After the call to the function add "return false;" to stop the default href action.
Copy linkTweet thisAlerts:
@a4jp_comFeb 11.2011 — You could add Google search engine code and when a user clicks on the mapped area of the image it would open the Google search engine with links only related to your website.

Do a search for the Google search engine form.

GCR (Sorry, I can't say my real name. Someone in the forum said we aren't allow to use real full names)

http://a4jp.com/index-en.html
Copy linkTweet thisAlerts:
@matt8088authorFeb 12.2011 — Put an onclick in the <area /> tag to call your function. After the call to the function add "return false;" to stop the default href action.[/QUOTE]

Thanks I got it to work
Copy linkTweet thisAlerts:
@a4jp_comFeb 13.2011 — Hi Matt,

If it is working now and on the internet for everyone to see, I would love to see it. Your idea sounds very interesting. I might be able to give you some good ideas or quicker code after looking at it.

Also if you have time look at my website and tell me what you think of it. I'm trying to make it work on IPods, IPads and regular computers at the moment.

I think an idea like yours might be good for my site map.

Regards,

Glen R

Cheap websites and 3D design

http://a4jp.com/index-en.html
Copy linkTweet thisAlerts:
@matt8088authorFeb 14.2011 — I realized I can just use the built in search function from WP and for the normal link I just put the search term, that way I can save some coding time

ie,

http://www.gnosticthought.org/?s=confucianism
Copy linkTweet thisAlerts:
@a4jp_comFeb 14.2011 — Having a huge background image like that is cool but the main address needs a stroke or something added to it.

Not all the images are working yet.

I'll check again tonight if you like.

Glen

http://a4jp.com/index-en.html
Copy linkTweet thisAlerts:
@matt8088authorFeb 15.2011 — I have to figure out the image coordinates it takes time and is tedious. The site is currently down for maintenance until I get it done. As for no content, I am waiting for people to sign up I want to make this a community site.
×

Success!

Help @matt8088 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...