This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disabling a href=...

 
Jan Ivanov
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two HTML <a> tags in my servlet. I need to disable them for a time when servlet do some jdbc operations. How can I do it ?
 
Rusty Smythe
Ranch Hand
Posts: 93
Mac Objective C Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm confused. Are you saying that you want to prevent the user from leaving the page while you get data from a database, or something else?

Can you post the code that shows the two "a" tags, as well as the start of the code that does the "jdbc operations"?
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you don't want those links, then don't write them to the page when they are not relevant.
 
Jan Ivanov
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes exactly !

That servlet import something to DB from file. It can last from seconds to couple of minutes. Servlet also shows percentage process progress. I want to disable two hrefs until it's finished.

How can I do it ?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64833
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not a servlet issue. Moved to the HTML forum.
 
Rusty Smythe
Ranch Hand
Posts: 93
Mac Objective C Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Answering this question is impossible (or very hard) without code.

I can think of several ways to do this, using a servlet, javascript, or whatever, but until I can see your approach, I can't help you.
 
Jan Ivanov
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Code is huge

I must simplify it

doPost() method

 
Jan Ivanov
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

[ August 15, 2006: Message edited by: Jan Ivanov ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the code is running on the server, it can not change what is happening on the client until it is processed. So you would have to remove the links before you submit the page to the server for processing.

Eric
 
Liu Zhixiang
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This my idea.Test please!
[ August 15, 2006: Message edited by: Liu Zhixiang ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64833
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why on earth would you generate HTML markup in Java strings?
 
Jan Ivanov
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Liu it's not working Any idea ?
 
Liu Zhixiang
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
are yue sure?
dont forget the "id" in line 3
oh,maybe it is right that is said by Eric.




if it's not working all the same,i think i only say sorry to you.
Maybe javascript cant help you.
[ August 16, 2006: Message edited by: Liu Zhixiang ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic