struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "prasad.dls" <prasad....@gmail.com>
Subject Re: struts 1.2: calling an action by javascript
Date Thu, 03 Jan 2008 05:48:01 GMT

This is select box. u make this as html select

<select name="contentId" id="contentId"
onchange="getPage(<%=companyId%>,'./xxx.do?step=<bean:message
key="link.xxxx.xxxxx"/>&contentId=');">

This is javascript
--
function getPage(ccid,url){
	var cId = document.getElementById("contentId").value;
	document.location.href = url+cId+'&xxxId='+ccid;
}

by using this u can get what u want.


Ingo Villnow wrote:
> 
> Hello,
> 
> i want to call an action by javascript, when a value in a <html:select>
> field changes. I want to fill my <html:form> with the data provided by
> the action. Any ideas? I don't know a lot of javascript :-(
> 
> thanks & greetings from Berlin
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

-- 
View this message in context: http://www.nabble.com/struts-1.2%3A-calling-an-action-by-javascript-tp13510349p14592253.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message