• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

input type

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to call an action inside an input type, how can I do this? I tried the following but didn't work


"<";input type="image" src="../images/button_cancel.gif" alt="Cancel" title="Cancel" onclickk="/nserverManager/sam/blank.do"/">
"<";input type="image" src="../images/button_cancel.gif" alt="Cancel" title="Cancel" onclickk="a href='/nserverManager/sam/blank.do'">
 
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to javaranch.

Originally posted by Giomar Guevara:

"<";input type="image" src="../images/button_cancel.gif" alt="Cancel" title="Cancel" onclickk="/nserverManager/sam/blank.do"/">
"<";input type="image" src="../images/button_cancel.gif" alt="Cancel" title="Cancel" onclickk="a href='/nserverManager/sam/blank.do'">




correct onclickk with onClick then try.
 
Giomar Guevara
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know it is not correct...I wrote it like that so I could submit my message (with "onclick" the page was giving an error)

can anyone help me???

thanks
 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


onclick is a UI event. You can call a javascript function 'onclick' and redirect to the url you want to inside the javascript
[ October 19, 2006: Message edited by: vishwanath nadimpally ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This has nothing to do with JSP. Moved to the HTML forum.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The value of onclick cannot be a URL. It must be Javascript, which (as was previously pointed out) can be used to redirect to the URL you want.

It's probably a good idea to get some basic HTML and Javascript skills under your belt if you are going to write web apps.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hint: you need to set document.location.href

Eric
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic