473,378 Members | 1,426 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Display results on clicking hyperlink

hi to all


Expand|Select|Wrap|Line Numbers
  1. <html>
  2.     <head>
  3.         <link rel="stylesheet" href="./css/Form.css">
  4.         <script language="javascript" >
  5.     </script>
  6.     </head>
  7.     <body id="body" onload="focs()">
  8.     <h1><center>Welcome To Admin Page</center></h1>
  9.     <h3>Click here to display all the employees</h3>
  10.     <form name="f1">
  11.         <center>
  12.             <table>
  13.                 <tr>
  14.                     <td><a href="">A</a>|</td>
  15.                     <td><a href="">B</a>|</td>
  16.                     <td><a href="">C</a>|</td>
  17.                     <td><a href="">D</a>|</td>
  18.                     <td><a href="">E</a>|</td>
  19.                     <td><a href="">F</a>|</td>
  20.                     <td><a href="">G</a>|</td>
  21.                     <td><a href="">H</a>|</td>
  22.                     <td><a href="">I</a>|</td>
  23.                     <td><a href="">J</a>|</td>
  24.                     <td><a href="">K</a>|</td>
  25.                     <td><a href="">L</a>|</td>
  26.                     <td><a href="">M</a>|</td>
  27.                     <td><a href="">N</a>|</td>
  28.                     <td><a href="">O</a>|</td>
  29.                     <td><a href="">P</a>|</td>
  30.                     <td><a href="">Q</a>|</td>
  31.                     <td><a href="">R</a>|</td>
  32.                     <td><a href="">S</a>|</td>
  33.                     <td><a href="">T</a>|</td>
  34.                     <td><a href="">U</a>|</td>
  35.                     <td><a href="">V</a>|</td>
  36.                     <td><a href="">W</a>|</td>
  37.                     <td><a href="">X</a>|</td>
  38.                     <td><a href="">Y</a>|</td>
  39.                     <td><a href="">Z</a>|</td>
  40.                 </tr>
  41.             </table>
  42.         </center>
  43.     </form>
  44.     </body>
  45. <html>
  46.  
in the above code when ever i click on those hyperlinks the result shoud display below those hyper links. how to do it

regards
Apr 13 '07 #1
8 1801
r035198x
13,262 8TB
hi to all


Expand|Select|Wrap|Line Numbers
  1. <html>
  2.     <head>
  3.         <link rel="stylesheet" href="./css/Form.css">
  4.         <script language="javascript" >
  5.     </script>
  6.     </head>
  7.     <body id="body" onload="focs()">
  8.     <h1><center>Welcome To Admin Page</center></h1>
  9.     <h3>Click here to display all the employees</h3>
  10.     <form name="f1">
  11.         <center>
  12.             <table>
  13.                 <tr>
  14.                     <td><a href="">A</a>|</td>
  15.                     <td><a href="">B</a>|</td>
  16.                     <td><a href="">C</a>|</td>
  17.                     <td><a href="">D</a>|</td>
  18.                     <td><a href="">E</a>|</td>
  19.                     <td><a href="">F</a>|</td>
  20.                     <td><a href="">G</a>|</td>
  21.                     <td><a href="">H</a>|</td>
  22.                     <td><a href="">I</a>|</td>
  23.                     <td><a href="">J</a>|</td>
  24.                     <td><a href="">K</a>|</td>
  25.                     <td><a href="">L</a>|</td>
  26.                     <td><a href="">M</a>|</td>
  27.                     <td><a href="">N</a>|</td>
  28.                     <td><a href="">O</a>|</td>
  29.                     <td><a href="">P</a>|</td>
  30.                     <td><a href="">Q</a>|</td>
  31.                     <td><a href="">R</a>|</td>
  32.                     <td><a href="">S</a>|</td>
  33.                     <td><a href="">T</a>|</td>
  34.                     <td><a href="">U</a>|</td>
  35.                     <td><a href="">V</a>|</td>
  36.                     <td><a href="">W</a>|</td>
  37.                     <td><a href="">X</a>|</td>
  38.                     <td><a href="">Y</a>|</td>
  39.                     <td><a href="">Z</a>|</td>
  40.                 </tr>
  41.             </table>
  42.         </center>
  43.     </form>
  44.     </body>
  45. <html>
  46.  
in the above code when ever i click on those hyperlinks the result shoud display below those hyper links. how to do it

regards
What results do you want to display? Where are they supposed to come from?
Apr 13 '07 #2
Hi pal,
check this,

i think u will like it, let me know :)

Expand|Select|Wrap|Line Numbers
  1. Quote:
  2. Originally Posted by menmysql
  3. hi to all
  4.  
  5.  
  6. Code:
  7.  
  8. <html>
  9.     <head>
  10.         <link rel="stylesheet" href="./css/Form.css">
  11.         <script language="javascript">
  12. //Author : fjhdehoog
  13. //    Employees Names A 
  14. EmployeesNamesA=new Array();    
  15. EmployeesNamesA[0]='Anthon';
  16. EmployeesNamesA[1]='Andy';
  17. EmployeesNamesA[2]='Allen';
  18. EmployeesNamesA[3]='andre';     
  19. //    Employees Names B
  20. EmployeesNamesB= new Array(); 
  21. EmployeesNamesB[0]='BEN';
  22. EmployeesNamesB[1]='BILL';
  23. EmployeesNamesB[2]='BART';
  24. EmployeesNamesB[3]='BERNARD';
  25. // and so on ....
  26. EmployeesNamesC= new Array(); 
  27. EmployeesNamesC[0]='charles';
  28. EmployeesNamesC[1]='charly';
  29. EmployeesNamesC[2]='chriss';
  30. EmployeesNamesC[3]='carlo'; 
  31.  
  32. EmployeesNamesD= new Array(); 
  33. EmployeesNamesD[0]='';
  34. EmployeesNamesD[1]='';
  35. EmployeesNamesD[2]='';
  36. EmployeesNamesD[3]='';
  37.  
  38. EmployeesNamesE= new Array(); 
  39. EmployeesNamesE[0]='';
  40. EmployeesNamesE[1]='';
  41. EmployeesNamesE[2]='';
  42. EmployeesNamesE[3]='';  
  43.  
  44. EmployeesNamesF= new Array(); 
  45. EmployeesNamesF[0]='';
  46. EmployeesNamesF[1]='';
  47. EmployeesNamesF[2]='';
  48. EmployeesNamesF[3]='';  
  49.  
  50. EmployeesNamesG= new Array(); 
  51. EmployeesNamesG[0]='';
  52. EmployeesNamesG[1]='';
  53. EmployeesNamesG[2]='';
  54. EmployeesNamesG[3]=''; 
  55.  
  56. EmployeesNamesH= new Array(); 
  57. EmployeesNamesH[0]='';
  58. EmployeesNamesH[1]='';
  59. EmployeesNamesH[2]='';
  60. EmployeesNamesH[3]='';    
  61.  
  62. EmployeesNamesI= new Array(); 
  63. EmployeesNamesI[0]='';
  64. EmployeesNamesI[1]='';
  65. EmployeesNamesI[2]='';
  66. EmployeesNamesI[3]='';  
  67.  
  68. EmployeesNamesJ= new Array(); 
  69. EmployeesNamesJ[0]='';
  70. EmployeesNamesJ[1]='';
  71. EmployeesNamesJ[2]='';
  72. EmployeesNamesJ[3]=''; 
  73.  
  74. EmployeesNamesK= new Array(); 
  75. EmployeesNamesK[0]='';
  76. EmployeesNamesK[1]='';
  77. EmployeesNamesK[2]='';
  78. EmployeesNamesK[3]='';  
  79.  
  80. EmployeesNamesL= new Array(); 
  81. EmployeesNamesL[0]='';
  82. EmployeesNamesL[1]='';
  83. EmployeesNamesL[2]='';
  84. EmployeesNamesL[3]=''; 
  85.  
  86. EmployeesNamesM= new Array(); 
  87. EmployeesNamesM[0]='';
  88. EmployeesNamesM[1]='';
  89. EmployeesNamesM[2]='';
  90. EmployeesNamesM[3]=''; 
  91.  
  92. EmployeesNamesN= new Array(); 
  93. EmployeesNamesN[0]='';
  94. EmployeesNamesN[1]='';
  95. EmployeesNamesN[2]='';
  96. EmployeesNamesN[3]=''; 
  97.  
  98. EmployeesNamesO= new Array(); 
  99. EmployeesNamesO[0]='';
  100. EmployeesNamesO[1]='';
  101. EmployeesNamesO[2]='';
  102. EmployeesNamesO[3]='';
  103.  
  104. EmployeesNamesP= new Array(); 
  105. EmployeesNamesP[0]='';
  106. EmployeesNamesP[1]='';
  107. EmployeesNamesP[2]='';
  108. EmployeesNamesP[3]=''; 
  109.  
  110. EmployeesNamesQ= new Array(); 
  111. EmployeesNamesQ[0]='';
  112. EmployeesNamesQ[1]='';
  113. EmployeesNamesQ[2]='';
  114. EmployeesNamesQ[3]=''; 
  115.  
  116. EmployeesNamesR= new Array(); 
  117. EmployeesNamesR[0]='';
  118. EmployeesNamesR[1]='';
  119. EmployeesNamesR[2]='';
  120. EmployeesNamesR[3]=''; 
  121.  
  122. EmployeesNamesS= new Array(); 
  123. EmployeesNamesS[0]='';
  124. EmployeesNamesS[1]='';
  125. EmployeesNamesS[2]='';
  126. EmployeesNamesS[3]=''; 
  127.  
  128. EmployeesNamesT= new Array(); 
  129. EmployeesNamesT[0]='';
  130. EmployeesNamesT[1]='';
  131. EmployeesNamesT[2]='';
  132. EmployeesNamesT[3]=''; 
  133.  
  134. EmployeesNamesU= new Array(); 
  135. EmployeesNamesU[0]='';
  136. EmployeesNamesU[1]='';
  137. EmployeesNamesU[2]='';
  138. EmployeesNamesU[3]=''; 
  139.  
  140. EmployeesNamesV= new Array(); 
  141. EmployeesNamesV[0]='';
  142. EmployeesNamesV[1]='';
  143. EmployeesNamesV[2]='';
  144. EmployeesNamesV[3]=''; 
  145.  
  146. EmployeesNamesW= new Array(); 
  147. EmployeesNamesW[0]='';
  148. EmployeesNamesW[1]='';
  149. EmployeesNamesW[2]='';
  150. EmployeesNamesW[3]='';
  151.  
  152. EmployeesNamesX= new Array(); 
  153. EmployeesNamesX[0]='';
  154. EmployeesNamesX[1]='';
  155. EmployeesNamesX[2]='';
  156. EmployeesNamesX[3]=''; 
  157.  
  158. EmployeesNamesY= new Array(); 
  159. EmployeesNamesY[0]='';
  160. EmployeesNamesY[1]='';
  161. EmployeesNamesY[2]='';
  162. EmployeesNamesY[3]='';
  163.  
  164. EmployeesNamesZ= new Array(); 
  165. EmployeesNamesZ[0]='';
  166. EmployeesNamesZ[1]='';
  167. EmployeesNamesZ[2]='';
  168. EmployeesNamesZ[3]='';
  169.  
  170. //---------
  171. //match clicked link to an array
  172. //if link clicked with the id 0 (Zero) get array EmployeesNamesA 
  173. //if link clicked with the id 1 get array EmployeesNamesB 
  174. //and so on
  175. // do not change-------------------------------------
  176. MatchThis=new Array();
  177. MatchThis[0]=EmployeesNamesA;
  178. MatchThis[1]=EmployeesNamesB;
  179. MatchThis[2]=EmployeesNamesC;
  180. MatchThis[3]=EmployeesNamesD;
  181. MatchThis[4]=EmployeesNamesE;
  182. MatchThis[5]=EmployeesNamesF;
  183. MatchThis[6]=EmployeesNamesG;
  184. MatchThis[7]=EmployeesNamesH;
  185. MatchThis[8]=EmployeesNamesI;
  186. MatchThis[9]=EmployeesNamesJ;
  187. MatchThis[10]=EmployeesNamesK;
  188. MatchThis[11]=EmployeesNamesL;
  189. MatchThis[12]=EmployeesNamesM;
  190. MatchThis[13]=EmployeesNamesN;
  191. MatchThis[14]=EmployeesNamesO;
  192. MatchThis[15]=EmployeesNamesP;
  193. MatchThis[16]=EmployeesNamesQ;
  194. MatchThis[17]=EmployeesNamesR;
  195. MatchThis[18]=EmployeesNamesS;
  196. MatchThis[19]=EmployeesNamesT;
  197. MatchThis[20]=EmployeesNamesU;
  198. MatchThis[21]=EmployeesNamesV;
  199. MatchThis[22]=EmployeesNamesW;
  200. MatchThis[23]=EmployeesNamesX;
  201. MatchThis[24]=EmployeesNamesY; 
  202. MatchThis[25]=EmployeesNamesZ; 
  203. //---------------------------------
  204. function sHowEmployees(e){
  205. //Thisobj=CatchE(e); == catch the current even
  206. Thisobj=CatchE(e);
  207. //empty the Employeeslist span
  208. Employeeslist.innerHTML='';
  209. //determine what link was clicked by id
  210. for (XxX=0;XxX<=25;XxX++){
  211. if (Thisobj.id==XxX){
  212. //if the match has been found assign thislist as MatchThis[XxX] -- *example* MatchThis[0] equals EmployeesNamesA
  213. Thislist=MatchThis[XxX]; 
  214. //now write thislist from start to end to the Employeeslist span
  215. for (Y=0;Y<Thislist.length;Y++){
  216. Employeeslist.innerHTML+=Thislist[Y]+'<br>';
  217. }//close for Y
  218. }else{}
  219. }// close for XxX
  220.  
  221. }//close func 
  222. //function to catch an event
  223. function CatchE(e){if(!e)e=event;return e.srcElement||e.target;}
  224. //highlight     
  225. function highlight(e){
  226. Thisobj=CatchE(e);
  227. Thisobj.style.color='white';
  228. Thisobj.style.backgroundColor='black';
  229. Thisobj.style.cursor='pointer';     
  230. }
  231. //lowlight 
  232. function lowlight(e){
  233. Thisobj=CatchE(e);
  234. Thisobj.style.color='black';
  235. Thisobj.style.backgroundColor='white';
  236. }
  237.     </script>
  238.     </head>
  239.     <body id="body">
  240.     <h1><center>Welcome To Admin Page</center></h1>
  241.     <h3>Click here to display all the employees</h3>
  242.     <div style="text-align: center">TO test Select A ,B ,C . the rest is blank</div>
  243.     <form name="f1">
  244.         <center>
  245.             <table>
  246.                 <tr>
  247.                     <td><a id="0" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">A</a>|</td>
  248.                     <td><a id="1" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">B</a>|</td>
  249.                     <td><a id="2" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">C</a>|</td>
  250.                     <td><a id="3" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">D</a>|</td>
  251.                     <td><a id="4" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">E</a>|</td>
  252.                     <td><a id="5" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">F</a>|</td>
  253.                     <td><a id="6" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">G</a>|</td>
  254.                     <td><a id="7" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">H</a>|</td>
  255.                     <td><a id="8" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">I</a>|</td>
  256.                     <td><a id="9" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">J</a>|</td>
  257.                     <td><a id="10" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">K</a>|</td>
  258.                     <td><a id="11" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">L</a>|</td>
  259.                     <td><a id="12" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">M</a>|</td>
  260.                     <td><a id="13" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">N</a>|</td>
  261.                     <td><a id="14" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">O</a>|</td>
  262.                     <td><a id="15" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">P</a>|</td>
  263.                     <td><a id="16" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">Q</a>|</td>
  264.                     <td><a id="17" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">R</a>|</td>
  265.                     <td><a id="18" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">S</a>|</td>
  266.                     <td><a id="19" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">T</a>|</td>
  267.                     <td><a id="20" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">U</a>|</td>
  268.                     <td><a id="21" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">V</a>|</td>
  269.                     <td><a id="22" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">W</a>|</td>
  270.                     <td><a id="23" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">X</a>|</td>
  271.                     <td><a id="24" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">Y</a>|</td>
  272.                     <td><a id="25" onmouseover="highlight(event)" onmouseout="lowlight(event)" onclick="sHowEmployees(event)">Z</a>|</td>
  273.                 </tr>
  274.             </table>
  275.         </center> 
  276.             </form>     
  277.             <span id="Employeeslist"></span>
  278.     </body>
  279. <html> 
  280.  
peace
dkc
Apr 13 '07 #3
thanks for your reply

i want to do it in jsp what changes i have to do
Apr 14 '07 #4
hmmm,
in jsp heh.
im not into jsp so i cant help u.
im planning to study jsp,
but first i must finish visual basic!
well happy coding pal.

peace
Apr 14 '07 #5
thnakyou

all the best for you

regards
Apr 16 '07 #6
r035198x
13,262 8TB
thnakyou

all the best for you

regards
You will need to explain more on what you want to do in JSP.
Apr 16 '07 #7
yes i can,

in my jsp page there exist hyper links from "A" to "Z" and when ever i click on any one of the letter once again it calls itself with a parameter as that clicked character.while loading i get the value which is passed through hidden field and executes a sql command and the result is plcaed below those hyper links.


regards
Apr 16 '07 #8
acoder
16,027 Expert Mod 8TB
Changed thread title.
Apr 16 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: deko | last post by:
I store hyperlinks as text in a table like this: Invoice11-21-2003.pdf#file://P:\Finance\PrefVendors\Receipts\Invoice11-21-20 03.pdf I need to run a report that lists the documents - or...
4
by: Salad | last post by:
If I create a field as a hyperlink, Access will open the hyperlink if I single click it. Is there a method within the operating system that would tell access to only open the hyperlink if...
6
by: dale zhang | last post by:
Hi, I build a web form with a 4-cell table on the top (flawlayout), followed by some labels and textboxes (gridlayout). The web form is displayed well in dell m60 laptop with all resolution...
2
by: vndaxanh | last post by:
Hi everyone, I have an aspx page with a datagrid column which bound to a dataset at page_load. It contains 2 columns, Key and Hyperlink. What I want to do is when I click on the hyperlink it...
5
by: Stephen | last post by:
Hi, Is there anyway I can make a column thats databound into a hyperlink to navigate to another page? Suppose I have 3 columns: SortOrder, Description, UserName for eg: <Columns>...
9
by: loga123 | last post by:
I am using asp .net 2.0. I have a hyperlink asp control on my web page page1.aspx. On clicking this hyper;link, I would like to open page2.aspx (which is in the same web application) in a new IE...
15
by: cssExp | last post by:
hello, Rather than going on a wild explanation on what's the the problem, it'll be much quicker and easier if i let you look at it yourself, so I'll post my page source (actual contents taken out,...
5
by: NJonge01 | last post by:
Greetings, I've read some great advice on similar topics, just nothing matching exactly what I'm trying I'm pretty close I think on making this work, but note quite there. I want to print a...
1
by: mramsay | last post by:
Hi there, I have a dynamic hyperlink Baseball. When the user select the hyperlink they are redirected to another page. After that I want to display information on the page from my linkstbl. ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.