Results 1 to 6 of 6
- 10-09-2012, 02:59 PM #1
Member
- Join Date
- Oct 2012
- Posts
- 6
- Rep Power
- 0
How to send the div values to java class?
have a product catalog that is showing different values using < div > tag, there should be a button for user to add the chosen products to shopping basket but I do not know send the ProductsID to java class.
Name:ProductA Name:ProductB
Price:3.5 Price:5.0
Add Add
- 10-09-2012, 03:36 PM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Re: How to send the div values to java class?
By having the id in the request?
Could be a hidden field, or simply appended to the submit URL the button is doing.Please do not ask for code as refusal often offends.
- 10-09-2012, 03:55 PM #3
Member
- Join Date
- Oct 2012
- Posts
- 6
- Rep Power
- 0
Re: How to send the div values to java class?
would you give a sample code? I used the hidden code but it does not work,
<s:form action="AddProduct" >
<tr><td><div id="image"><img src=${Product.thumbNailUrl} alt="image"/></div></td></tr>
<s:textfield name="Name" label="Name" />
<tr><td><div id="Name">Here:${Product.name}</div></td></tr>
<s:hidden id="Name1" value="name1">${Product.name}</s:hidden>
<s:label id="name2" name="name2" value="John"/>
<tr><td><div id="Rate:">Rate:${Product.highRate}</div></td></tr>
<tr><td><div id="Address">Address:${Product.address}</div></td></tr>
<tr><td>
<s:submit/>
</s:form>
<tr><td><div id="Name">Here:Beaufort</div></td></tr>
Beaufort<input type="hidden" name="" value="name1" id="Name1"/>
<tr>
<td class="tdLabel"></td>
<td><label id="name2">John</label></td>
</tr>
<tr><td><div id="Rate:">Rate:437.19</div></td></tr>
<tr><td><div id="Address">Address:33 Beaufort</div></td></tr>
<tr><td>
<tr>
<td colspan="2"><div align="right"><input type="submit" id="AddProduct_0"
value="Submit"/>
</div></td>
</tr>
</table></form>
- 10-09-2012, 04:48 PM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Re: How to send the div values to java class?
Please use [code] tags [/code] when posting code.
I can't read any of that.
Also what does "it does not work" mean?Please do not ask for code as refusal often offends.
- 10-10-2012, 08:15 AM #5
Member
- Join Date
- Oct 2012
- Posts
- 6
- Rep Power
- 0
- 10-10-2012, 09:30 AM #6
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Re: How to send the div values to java class?
I just showed you in that post.
WHen you wrap your code in [code] tags [/code] it retains its formatting.
eg
Show us the html (in code tags) that is produced.Java Code:public void someMethod() { all nicely laid out. }
At least an example of that table.Please do not ask for code as refusal often offends.
Similar Threads
-
how to send scanned in arrary to class?
By j@v@ in forum New To JavaReplies: 3Last Post: 12-07-2010, 10:06 AM -
Send selective objects in a class over network
By RDReavis in forum Advanced JavaReplies: 2Last Post: 01-18-2010, 08:45 AM -
problem in accessing array values of one class in to jframe class
By cenafu in forum AWT / SwingReplies: 8Last Post: 03-21-2009, 09:34 AM -
how to send values from servlet..
By hussainzim in forum Java ServletReplies: 1Last Post: 08-06-2008, 07:28 AM -
Accessing boolean Values of another values in one class.
By a_iyer20 in forum Advanced JavaReplies: 4Last Post: 04-15-2008, 01:04 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks