struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Li Ying <liying.cn.2...@gmail.com>
Subject Re: How to use tabbed panels with <s:form>
Date Tue, 18 Oct 2011 06:03:13 GMT
Hi, I wrote a simple sample include only pure html + javascript.

It works pretty well.

I believe the same thing will works for JSP,
because JSP will produce HTML,
so the finally result displayed by the browser will be [pure html + javascript].

Here is my sample:

===========================================

<html>

<head>
	<meta http-equiv="Pragma" content="no-cache">
	<meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8">

	<link rel="stylesheet" type="text/css"
href="../css/jQueryUI/jquery-ui-1.8.15.redmond.css"/>
	<link rel="stylesheet" type="text/css"
href="../css/jQueryUI/jquery-ui-custom.css"/>
	<link rel="stylesheet" type="text/css" href="../css/common.css"/>

	<script type="text/javascript" src="../js/lib/jquery-1.6.2.min.js"></script>
	<script type="text/javascript"
src="../js/lib/jquery-ui-1.8.15.custom.min.js"></script>

	<script type="text/javascript" src="../js/pageCommon/common.js"></script>

	<title>Test</title>
</head>

<body>

<div class="main">
	<form action="http://www.google.com/search">
		<div class="mainTab">
			<ul>
				<li><a href="#tab_01"><span class="tabTitle">Tab_01</span></a></li>
				<li><a href="#tab_02"><span class="tabTitle">Tab_02</span></a></li>
				<li><a href="#tab_03"><span class="tabTitle">Tab_03</span></a></li>
			</ul>
			<div id="tab_01">
				Q: <input name="q" />
			</div>
			<div id="tab_02">
				Age: <input name="age" />
			</div>
			<div id="tab_03">
				<input type="submit" value="Search" />
			</div>
		</div>
	</form>
</div>

</body>

<script type="text/javascript">
function initTabs() {
	$(".mainTab").tabs();
}

initTabs();
</script>
</html>

===========================================

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


Mime
View raw message