Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


THARANI
link
2 Answer(s)      3 years and 11 months ago
Posted in : JavaScript Questions


Thank you Friend.Another think i want to ask is when i click the link the table is displayed and other links were hidden if i want to click the next link i have to refresh the page instead i want to do is when i click the link the table should display and again when i click the link the table should not display


Advertisement
View Answers

December 23, 2010 at 1:41 PM


Hello Friend,

Try this:

<html>
<script>
function fun1(h) {
  var tbl = document.getElementById('div1');
  tbl.style.display = h;
  document.getElementById('link2').style.visibility='hidden';
  document.getElementById('link3').style.visibility='hidden';

}
function fun2(h) {
  var tbl = document.getElementById('div2');
  tbl.style.display = h;
  document.getElementById('link1').style.visibility='hidden';
  document.getElementById('link3').style.visibility='hidden';
}
function fun3(h) {
  var tbl = document.getElementById('div3');
  tbl.style.display = h;
  document.getElementById('link1').style.visibility='hidden';
  document.getElementById('link2').style.visibility='hidden';
}
function func(){
window.location.reload();
}
</script>

<p><br>
<a id="link1" href="javascript:fun1('block')" onDblClick="func()">Show1</a></p>

<div id=div1 name=div1 style="overflow:hidden;display:none">
<center><h2>Personal Details:</h2></center>
<form name="form" method="post" onsubmit="return validate();">
<center>
<table>
<tr><td>First Name:</td><td><input type="text" name="fname"></td></tr>
<tr><td>Last Name:</td><td><input type="text" name="lname"></td></tr>
<tr><td>Date Of Birth:</td><td><input type="text" name="dob"></td></tr>
</table>
</div>

<p><br>
<a id="link2" href="javascript:fun2('block')" onDblClick="func()" >Show2</a></p>

<div id=div2 name=div2 style="overflow:hidden;display:none">
<center><h2>Contact Details:</h2></center>
<center>
<table>
<tr><td>Address:</td><td><input type="text" name="address"></td></tr>
<tr><td>Contact No:</td><td><input type="text" name="contact"></td></tr>
<tr><td>Email:</td><td><input type="text" name="email"></td></tr>
</table>
</center>
</div>

<p><br>
<a id="link3" href="javascript:fun3('block')" onDblClick="func()">Show3</a></p>

<div id=div3 name=div3 style="overflow:hidden;display:none">

<center><h2>Qualification:</h2></center>
<center>
<table>
<tr><td>Highest Qualification(With University):</td><td><input type="text" name="qua1"></td></tr>
<tr><td>Second Highest Qualification(With University:</td><td><input type="text" name="qua2"></td></tr>
</table>
</form>
</center>
</div>
</div>
</html>

Thanks



December 23, 2010 at 1:41 PM


Hi Friend,

Try this:

<html>
<script>
function fun1(h) {
  var tbl = document.getElementById('div1');
  tbl.style.display = h;
  document.getElementById('link2').style.visibility='hidden';
  document.getElementById('link3').style.visibility='hidden';

}
function fun2(h) {
  var tbl = document.getElementById('div2');
  tbl.style.display = h;
  document.getElementById('link1').style.visibility='hidden';
  document.getElementById('link3').style.visibility='hidden';
}
function fun3(h) {
  var tbl = document.getElementById('div3');
  tbl.style.display = h;
  document.getElementById('link1').style.visibility='hidden';
  document.getElementById('link2').style.visibility='hidden';
}
function func(){
window.location.reload();
}
</script>

<br>
<a id="link1" href="javascript:fun1('block')" onDblClick="func()">Show1</a>
<div id=div1 name=div1 style="overflow:hidden;display:none">
<center><h2>Personal Details:</h2></center>
<form name="form" method="post" onsubmit="return validate();">
<center>
<table>
<tr><td>First Name:</td><td><input type="text" name="fname"></td></tr>
<tr><td>Last Name:</td><td><input type="text" name="lname"></td></tr>
<tr><td>Date Of Birth:</td><td><input type="text" name="dob"></td></tr>
</table>
</div>
<br>
<a id="link2" href="javascript:fun2('block')" onDblClick="func()" >Show2</a>
<div id=div2 name=div2 style="overflow:hidden;display:none">
<center><h2>Contact Details:</h2></center>
<center>
<table>
<tr><td>Address:</td><td><input type="text" name="address"></td></tr>
<tr><td>Contact No:</td><td><input type="text" name="contact"></td></tr>
<tr><td>Email:</td><td><input type="text" name="email"></td></tr>
</table>
</center>
</div>
<br>
<a id="link3" href="javascript:fun3('block')" onDblClick="func()">Show3</a>
<div id=div3 name=div3 style="overflow:hidden;display:none">

<center><h2>Qualification:</h2></center>
<center>
<table>
<tr><td>Highest Qualification(With University):</td><td><input type="text" name="qua1"></td></tr>
<tr><td>Second Highest Qualification(With University:</td><td><input type="text" name="qua2"></td></tr>
</table>

</form>
</center>
</div>
</div>
</html>

Thanks



Related Tutorials/Questions & Answers:
link
the link the table is displayed and other links were hidden if i want to click the next link i have to refresh the page instead i want to do is when i click the link the table should display and again when i click the link the table should
link
link  hey frnds can anyone plz tell me how can i store my videos as link in my database and can retrive the video using servlet by clicking on to that link .it may be confusing sorry about that and if someone can than plz help me
Advertisements
LINK
LINK  Thank you friend.cant we use single click instead of double click and also for four link u has given the example but i have 14 links in that case wat i should do
link
link  how can we give hyperlinks on data retrieved from the database and when a particular option is clicked it should be saved in another database and details related to that link should be diaplay and stored in the database
LINK
LINK  I have four links which link to a table,if i click one link... i want to ask is when i click the link the table is displayed and other links were hidden if i want to click the next link i have to refresh the page instead i
Hypertext link
Hypertext link  What is a Hypertext link
Hypertext link
Hypertext link  hii, What is a Hypertext link?   hello, A Hypertext link is a special tag that links one page to another page or resource. If you click the link, the browser jumps to the link's destination
Link to a website
Link to a website  I have created a mobile application.Now I want to insert a link to a website so that when mobile user selects that link he is directed to that website
HTML link
HTML link  How do I create a link
Hypertext link
Hypertext link  hello,, What is a Hypertext link?   hii, A hypertext link is a special text that perform the linkage between two web page. <a href="www.roseindia.net">roseindia site</a>
HTML Link
HTML Link  How do I create a link that opens a new window
position of a link
position of a link the table appears at the bottom i want it to be display at the top pls help me.Each link if i click it should display in the same position
attaching a link
attaching a link  I want the program code for , creating an application form and it is attached to our code, by clicking on this link, the form should be open
Link on Image
Link on Image  HTML link question mark Image can anyone please suggest how can i link the question mark image in HTML?   <p> <a class="mainLinks" href="#">Currency Converter&nbsp;<img src
mfmailComposeViewController link
mfmailComposeViewController link  Is there any way to get a hyperlink on email text using mfmailComposeViewController in my iPhone application?   To get link on the text, you need to make it HTML enable
JavaScript link
JavaScript link...; In this section, you will learn about the text property of Link object in JavaScript. JavaScript's Link object has the property text which allow the user to get the text
Html image link
Html image link  How do I link an image to something
Broken link list
Broken link list   Please provide me a java code to find the broken link list of url's for a given url
link border 0 css
link border 0 css  Hi, What will the css for making links border 0 in image? I am looking for example code for link border 0 css. Thanks
link list in c++
link list in c++  What is hash table in java,what is use? and how to use
php a href link
php a href link  i guess... we can write the href in a similar way as in html to create a link
link to other frame - Applet
link to other frame  how a button to open to another frame? and the frame can keyin the data and it can show at the previous frame
Dynamic link in JSP
Dynamic link in JSP  Hii everyone...I have stuck from last 2 days... Three columns i.e. souce name, Target name and Link. and that link should be only... to choose some checkboxes n save it in collection. So, for every link, we can select
Retrieve data by clicking a link
Retrieve data by clicking a link  In a page there are 5 links.Every link has a hidden value. According to that hidden value data should be retrieved from the database and data should be displayed in a new page.How to do it?Please
make a picture a link
make a picture a link  hello, What is the way to make a picture a link?   hii, This is the tab for image linking <A HREF="http://www.roseindia.net"><IMG SRC="image.gif"></A>
Countdown timer to show a link
finish, a link appears. The thing is that my musical group will be presenting an EP.... The day arrives, and the link that leads to the songs appears. This is the code (you... and paste to the countdown code that I have for the link thing to appear...thanks
substitute image link
a default image or link in the image source file
HTML link code.
HTML link code. Description : It is also called hyper link. HTML provides... we wants to visit. Syntax : <a href="index.jsp" >Link Code<...;/title> </head> <body> <h1>Example of HTML Link
HTML - Image link code.
HTML - Image link code. Description : HTML image link is a combination of two HTML tags. One is anchor and another is image tag.  Image tag image...;h1>Example of HTML Link code.</h1> <p>Please visit
JavaScript Change link
JavaScript Change link's text...; In this section, you will learn how to change the link's text in JavaScript. The modification of HTML code is quite simple. Now to modify the link's text
Advertisements
 

 

 

DMCA.com