473,395 Members | 1,668 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

how to hide fields in the same form

149 100+
hi,
in my application i m using Struts2..i had designed a form..in it i m using..by clicking 'Next' button it should open other page in the same form..i need that in another page..but im not getting.Here is the code can any one provide me the solution.
Expand|Select|Wrap|Line Numbers
  1. <%@ page contentType="text/html; charset=UTF-8" %>
  2. <%@ taglib prefix="s" uri="/struts-tags" %>
  3.  
  4. <html>
  5.     <head>
  6.         <title>Upload Audio Content</title>
  7.         <script type="text/javascript" src="/Cms/js/UploadAudioContent.js"></script>
  8.     </head>
  9.     <body>
  10.         <s:form action="" method="POST">
  11.             <div id="div1">
  12.                 <table align="center" width=610 cellspacing=0 cellpadding=3 style="border:1px solid gray">
  13.                     <s:textfield name="ContentAudioTitle" id="UploadAudioTitle" label="ContentTitle "/>
  14.                     <s:textfield name="ContentAudioDescription" id="UploadAudioDesc" label="ContentDescription "/>
  15.                     <s:textfield name="ContentAudioTags" id="UploadAudioTags" label="ContentTags "/>
  16.                     <s:textfield name="AudioExpiryDate" id="UploadAudioExpiry" label="ExpiryDate "/>
  17.                     <s:textfield name="AudioCost" id="UploadAudioCost" label="Audio Cost "/>
  18.                     <s:submit  type="button" value="Next" align="center" onclick="document.getElementById('div1').style.display='none'; 
  19.  document.getElementById('div2').style.display=''; return false;"  />
  20.                 </table>
  21.             </div>
  22.             <div id="div2">
  23.                 <table align="center" width=610 cellspacing=0 cellpadding=3 style="border:1px solid gray">
  24.                     <s:file name="AudioFile" id="UploadAudioFile" label="Audio File "/>
  25.                     <s:select name="AudioType" id="UploadAudioType" label="Audio Type" headerKey="1" headerValue="-- Please Select --"
  26.                               list="#{'01':'TT','02':'PTT','03':'MP3','04':'PMP3','05':'POLY','06':'PPOLY',
  27.                                       '07':'MONO','08':'PMONO','09':'IVR','10':'PIVR','11':'URL'}" />
  28.                     <s:submit type="button" value="Upload" align="center" />
  29.                 </table>
  30.             </div>
  31.         </s:form>
  32.     </body>
  33.     <Script>
  34.         document.getElementById("div1").style.display="none";
  35.         document.getElementById("div2").style.display="none";
  36.     </Script>
  37. </html>  
Sep 15 '10 #1
1 1283
acoder
16,027 Expert Mod 8TB
It won't show the next button if you're going to hide "div1".
Sep 23 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: DettCom | last post by:
Hello, I would like to be able to display or hide fields based on whether a specific Yes/No radio button is selected. This is in conjunction with a posting a just made here in the same group...
4
by: jerryyang_la1 | last post by:
I've found this script that allows be to hide/show form elements.. <script language="JavaScript"><!-- var toggle = true; function show(object) { if (document.layers && document.layers)...
1
by: alex | last post by:
How to hide the form window when it's minimized? Please help.
5
by: Kirk Graves | last post by:
Can anyone tell me why this code does not work? Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.Hide() End Sub If runs, but the...
5
by: akowald | last post by:
For some reason Form1.hide() won't hide the form. I run this command at form load. I need it to hide because I'm placing an icon on the system tray. Any ideals? I probley changed something that...
8
by: sumansengupta | last post by:
Is it possible to hide a form in ms-access2003 , but keeping the timer running with that form ?
2
by: =?Utf-8?B?VG9kZCBKYXNwZXJz?= | last post by:
Hey guys, I've got a MAIN form, which I have a series of navigational buttons on. When I open a secondary form from that form, I'd like to be able to HIDE the original form. The reason is, if...
10
by: mulamootil | last post by:
Is there a way to hide fields in a report that do not have any data. I have few fields that have images and I would like to hide them as well whenever there is none. I am using Access 07.
5
by: muddasirmunir | last post by:
I want to hide the form in vb6 before it appear to the screen , if i use form1.hide on click button after loading it works fine , but when i use the same code on Load event , or Activate Event ...
2
by: rywags11 | last post by:
Hello, Can anyone help me figure out how to show/hide fields based on information entered in other fields in a form in Access 2007? What I'm looking to do is: When a selection from a drop down is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.