• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to pass from windows.location.assign a variable to another jsp page

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I need to pass from search.jsp the id of the checked row of the table to delete.jsp in order to delete it , but when i am doing this with the bellow code , nothing happens , none checked row deleted from database


delete.jsp




search.jsp

 
Ranch Hand
Posts: 624
9
BSD Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java code should never be written inside JSP. JSP is for view.
You can move that code to Java file and try again.
 
John Vario
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tapas Chand wrote:Java code should never be written inside JSP. JSP is for view.
You can move that code to Java file and try again.



My exercise says it...
 
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's a pity. It's not unusual, but it does seem to create some bad habits.

Anyway, this bit:

is your delete link?

If I'm right on that then it will need to supply the id as a parameter (called 'id1' in your delete.jsp) so that the delete page can pick it up.
 
John Vario
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Dave Tolls wrote:That's a pity. It's not unusual, but it does seem to create some bad habits.

Anyway, this bit:

is your delete link?

If I'm right on that then it will need to supply the id as a parameter (called 'id1' in your delete.jsp) so that the delete page can pick it up.




yea its my delte link
 
Dave Tolls
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So if you pass the parameter through in that link then (assuming the code in delete.jsp is correct) it should work.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic