File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes input type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "input type" Watch "input type" New topic
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: 1321

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..
[Blog][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: 60975
    
  65

This has nothing to do with JSP. Moved to the HTML forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60975
    
  65

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: 15376
    
    6
hint: you need to set document.location.href

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: input type