/    Sign up×
Community /Pin to ProfileBookmark

Buttons are doing the same thing!

I am trying to embed a form. From what I can see this is not possible. I have a loop that includes a “move” button, and at the bottom is a “Save” button. This save button must save and send the information in the entire loop so all of the information is included in a form. My problem is that the move button is inside this loop as well, and no matter what I do to it I can’t get it to have a different function as the “Save” button. They both do the same thing ~_~. Here is that chunk of code:

[CODE]<form action=”SuccessfulSave.jsp” name=”Successful” method=”post”>

<center>
<div align=”center”; style=”overflow:auto;height:400px; width:625px; border:1px solid #000000;”>

<table frame=”void” id=”table8″ align=”center” width=”100%” class=”tableSet”>

<% for ( int cnt = 0; cnt < empList.size(); cnt++ ){
EmployeeInformation emp1 = empList.get(cnt);
if(cnt%2 == 0){ %>
<tr bgcolor=”#d0d0d0″>
<td align=”left”><%=emp1.getDisplayName()%></td>
<td align=”center”>&nbsp;&nbsp;<%=emp1.getCubeDesc()%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td><input type=”text” name=”newCube<%=cnt%>” size=”5″>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td><input type=”submit” style=”width: 60; height: 24″name=”forward” value=”Map” onclick=”moveBox()” >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

</tr>
<% }else {%>
<tr bgcolor=”#ffffff”>
<td align=”left”><%=emp1.getDisplayName()%></td>
<td align=”center”>&nbsp;&nbsp;<%=emp1.getCubeDesc()%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td><input type=”text” name=”newCube<%=cnt%>” size=”5″>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td><input type=”submit” style=”width: 60; height: 24″name=”forward” value=”Map” onclick=”moveBox()”>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

</tr>
<%}%>
<%}%>

</table>
</div>
</center>
<br />
<br />

<table border=”0″ id=”table9″ align=”center” width=”600″>
<tr>
<td align=”center”><strong>Move Date: </strong>
<input type=”text” name=”startDate” maxlength=”10″ size=”8″><em>mm/dd/yyyy</em>
</td>
</tr>
</table>

<br />
<br />

<table align=”center”>
<tr>
<td><input type=”submit” style=”width: 60; height: 26″name=”Save” value=”Save”>
</td>
</form>
<td>
<input type=”submit” style=”width: 60; height: 26″ name=”Cancel”value=”Cancel” onClick = “cancelBox()”>
</td>
</tr>
</table>[/CODE]

I was hoping to put a form around each move button, and thus disclude them from the original form but that has not worked. Any suggestions??? I appreciate them all ^_^.

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@FangSep 25.2008 — Use [I]type="button"[/I] not [I]type="submit"[/I] for the 'move' buttons.
Copy linkTweet thisAlerts:
@JadieGlitchauthorSep 25.2008 — You rock SO HARD... thank you! I'm getting a different error now but at least it's not copying exactly what the save button does. Hopefully I can work through this one on my own ~_^.

I appreciate it, thanks again ^_^.
×

Success!

Help @JadieGlitch spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...