Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2017
  • Last Modified:

Convert jquery link to an image button.

I am using the following link to call up a page: <a href="javascript:sortSummaries('views')">Sort By Views</a>

The jquery function this triggers is: function sortSummaries(id) {$("#summaries").load("browse_content.php?sort="+id+"");}

How can I convert this to use an image button?

(Note: for some reason EE removes the plus signs on either side of  id in the function)


<a href="javascript:sortSummaries('views')">Sort By Views</a>
 
function sortSummaries(id) {$("#summaries").load("browse_content.php?sort="+id+"");}

Open in new window

0
birwin
Asked:
birwin
1 Solution
 
ali_pakkanCommented:
You want to change your link to a button?

If so

instead of

<a href="javascript:sortSummaries('views')">Sort By Views</a>

use:

<input type="image" src="x.jpg" onclick="sortSummaries('views')"/>


Another example:

http://www.webdevelopersnotes.com/tips/html/using_an_image_as_a_submit_button.php3
0
 
birwinAuthor Commented:
Thank you. This worked perfectly.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now