|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I need some help. I have a tab menu with a hyperlink on the second tab. the problem that I am having is when I click on the second tab and then click on a link to reload the same page it will reload the page and then take me to the first tab instead of the second tab. so, if I am working on the second tap and click on a link to reload the same page. it would reload the same page fine but I want it to go to the second tab not the first tab. <a href="mail.asp?id=<%=objRS2("id")& "#onClick=showtab('MailTab')"%>"> the code above reload the same page mail.asp retrieve an id code then I want it to go to the second tab. (it go to showtab('MailTab') for one second then it will take me to the first tab but I want it to stay on the second tab.) the id for the second tab is: <div id="MailTab"> that's what I have above each tab. (either hide or show) <td width="10%" onClick="showtab('MailTab');hidetab('singleTab');hidetab('E ditTab');hidetab('ViewTab');hidetab('PhTab');hidet ab('BlockTab');" onMouseUp="style.cursor='hand';" valign="middle" height="12" bgcolor="#FFFFFF"> Thanks, lulu |
|
#2
|
||||
|
||||
|
to actually go to this URL attached to the second tab I can think of 2 things:
1. when you go to the second tab you have to load this second page like you would with any hyperlink. 2. (the better idea), when a user clicks a tab, set a cookie value to reflect the number of the tab (default should be tab 1). When someone reloads the page you'll have to have a script run in the <head> that determines whether or not the cookie exists and if it does, perform whatever code is necessary to have the second tab active instead of the first. It'll be relatively simple Javascript to accomplish this.
__________________
If you found a post of mine helpful, please click on the on my post to add to my reputation.
|
|
#3
|
|||
|
|||
|
hi shamrog12,
Thank you for your reply. <a href="(How can I create a cookie and set the cookie to = to <%= objRS2("id")%>) <a href="javascript:document.cookie = 'memid=<%= objRS2("id")%>'"> I have tryied the code above it creates the cookie but it takes me to a blank page with an id number in it. How can I let it create a cookie and stay at the same page? Thanks, lulu |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > Javascript (tabs) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|