Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onClick event to call Java

Status
Not open for further replies.

PGMR1998

MIS
Apr 10, 2001
29
US
I want to create a link on a web page such that when clicked, it will invoke a java program and also go to the desired web page. How do I refine my code?

<A HREF="onClick=JavaProgram to exec;>To My Page</A
 
onclick is an event handler used to make calls to scripting on the page (like Javascript or VBScript), so would not be able to call a Java program. Changing to a new URL would prevent any scripting from executing on that page.

Lee
 
i am trying to count the number of times a certain link is clicked on this page. Since javascript cannot do database updates, i need a way to call another program that adds 1 to a numeric item in a database. How might this be done?
 
Use server-side scripting to get the referrer to the following page and save that to your database. From there you can calculate which links led to which pages on your site.

Lee
 
server-side(livewire) javascript scripting is not supported in my release of sun-one web server. Is there something else I could use?
 
Lee didn't say you had to use javascript as your server side language, you can use any server side language you choose - including JSP which is java based - surely your server supports that.

-kaht

Looking for a puppy? [small](Silky Terriers are hypoallergenic dogs that make great indoor pets due to their lack of shedding and small size)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top