User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 392,022 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,268 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 2926 | Replies: 1
Reply
Join Date: Jul 2005
Posts: 11
Reputation: muktidaniweb is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
muktidaniweb muktidaniweb is offline Offline
Newbie Poster

How to get the link that was clicked even after the page gets refreshed

  #1  
Aug 26th, 2005
Hello,
I have a menu.jsp included in all the jsps. When I click a link in the menu it calls the respective page and the menu.jsp is also refreshed.
I want to write a java script to highlight the menu link that was clicked. But since the menu jsp is refreshed every time a link is clicked I am not able to show the highlighted link.
Below is the script I am using to highlight the menu link that is clicked

<script type="text/javascript" language="JavaScript">
var lastrowObj="";
function addArrow(rowObj){
if(lastrowObj != ""){
lastrowObj.cells[0].innerHTML = "&nbsp;";
lastrowObj.cells[1].getElementsByTagName('A')[0].className = "greybg";
for(j=0;j<rowObj.cells.length;j++){
lastrowObj.cells[j].className = "greybg";
}
}
rowObj.cells[0].innerHTML = "<img height=7 src='images/rezadminimages/arrow.gif' width=12>";
rowObj.cells[1].getElementsByTagName('A')[0].className = "highlight";

for(i=0;i<rowObj.cells.length;i++){
rowObj.cells[i].className = "highlight";
}
lastrowObj=rowObj;

}
</script>

Is there any way I can get the value of the link that was clicked even after the page is refreshed.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Location: Socialist Republic of Boulder
Posts: 216
Reputation: hooknc is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 6
hooknc hooknc is offline Offline
Posting Whiz in Training

Re: How to get the link that was clicked even after the page gets refreshed

  #2  
Aug 26th, 2005
Since you're using jsp's it might be easier to store the page that was clicked in the request object and use java programming (not java script) to highlight the page that was selected. The request should keep the page that was selected even after a refresh.

Regards,

Nate
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JSP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 10:46 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC