| Author |
input type
|
Giomar Guevara
Ranch Hand
Joined: Oct 18, 2006
Posts: 51
|
|
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'">
|
 |
Muhammad Saifuddin
Ranch Hand
Joined: Dec 06, 2005
Posts: 1318
|
|
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.
|
Saifuddin..
[Linkedin] How To Ask Questions On JavaRanch My OpenSource
|
 |
Giomar Guevara
Ranch Hand
Joined: Oct 18, 2006
Posts: 51
|
|
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
|
 |
vishwanath nadimpally
Ranch Hand
Joined: Jan 25, 2005
Posts: 116
|
|
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 ]
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
|
|
|
This has nothing to do with JSP. Moved to the HTML forum.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
|
|
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.
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
hint: you need to set document.location.href Eric
|
 |
 |
|
|
subject: input type
|
|
|