Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Old 07-13-2007, 05:41 AM About hide option
Average Talker

Posts: 28
Name: Punitha
Trades: 0
Hi,

I design one search engine in that i am using two radio buttons like by word,by character and two tables word table and character table if i run radio button ad i select one option for eg if i am selecting by word option then i want to display word table and if i select character table i want to display character table(i want to hide other table) tell me are give some exples how to do this using javascript.


thanks
kavithadevan is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-13-2007, 05:42 AM Re: About hide option
Average Talker

Posts: 28
Name: Punitha
Trades: 0
How to give javascript link into xtpl(xtemplates)file
kavithadevan is offline
Reply With Quote
View Public Profile
 
Old 07-13-2007, 07:56 AM Javascript link with xtpl
Average Talker

Posts: 28
Name: Punitha
Trades: 0
How to give javascript link into xtpl(xtemplates)file
kavithadevan is offline
Reply With Quote
View Public Profile
 
Old 07-13-2007, 09:22 AM Re: Javascript link with xtpl
Super Talker

Posts: 104
Location: http://www.joomladevs.com
Trades: 0
can you provide a sample please?
saurabhj is offline
Reply With Quote
View Public Profile Visit saurabhj's homepage!
 
Old 07-14-2007, 03:41 AM Hide option in javascript
Average Talker

Posts: 28
Name: Punitha
Trades: 0
Hi,

I design one search engine in that i am using two radio buttons like by word,by character and two tables word table and character table if i run this page first i want to hide two tables(i-e word table and character table) after that if i select one radio option for eg if i am selecting by word option then i want to display word table only and if i select character table i want to display character table(i want to hide other table) tell me are give some exples how to do this using javascript.


thanks
kavithadevan is offline
Reply With Quote
View Public Profile
 
Old 07-14-2007, 05:54 AM Hide and visible option in js
Average Talker

Posts: 28
Name: Punitha
Trades: 0
Hi,

Here i pasted one javascript code in this code i used three radio buttons (i-e country,State and festival) and i used three tables(i-e country table,state table,festival table).First if i run this script first i want to see radio button options only so i hided other three tables.Now if i select anyone radio button for example if i select country button i want to display country table below the radio button table.I created some codes hide coding is working it hides three tables but if i select radio option it wont displaying the relevent table (here i pointed one line in red color) tell me whether that is correct for my question if not tell me which condition is best to type there (If i select country option then only i want to display country table only not all three).Pls help me

Thanks.

<script language="javascript">
function hidetable()
{
if(document.getElementById('country_id').style.vis ibility ="visible")
{
document.getElementById('state1').style.visibility = "hidden";
document.getElementById('country1').style.visibili ty = "hidden";
document.getElementById('festival1').style.visibil ity = "hidden";
document.getElementById('button_id').style.visibil ity = "hidden";
document.getElementById('statediv_id').style.visib ility = "hidden";
document.getElementById('coundiv_id').style.visibi lity = "hidden";
document.getElementById('fesdiv_id').style.visibil ity = "hidden";
}
}
function visibletable()
{
if(document.getElementById('country_id').style.vis ibility ="visible")
{
document.getElementById('state1').style.visibility = "hidden";
document.getElementById('festival1').style.visibil ity = "hidden";
document.getElementById('statediv_id').style.visib ility = "hidden";
document.getElementById('fesdiv_id').style.visibil ity = "hidden";
document.getElementById('coundiv_id').value = "visible";
document.getElementById('country1').value = "visible";
document.getElementById('button_id').value = "visible";
return false;
}
}
</script></head>
<body onLoad="hidetable(); visibletable()">
<BR><BR><div align="center">
<form >
<div align="center" ><b><h2>Search any Events</b></h2> </div>
<table border="0">
<tr>
<td><input type="radio" align="center" id="country_id" name="country " onFocus="visibletable();"></td>
<td>Country</td><br>
</tr>
<tr>
<td><input type="radio" align="center" id="state_id" name="state" onFocus="visibletable();"></td>
<td>State</td><br><br><br>
</tr>
<tr>
<td><input type="radio" align="center" id="festival_id" name="festival" onFocus="visibletable();"></td>
<td>Festival</td><br><br><br>
</tr>
</table>
<table width="3" border="1" align="center" id="country1">
<div id="coundiv_id" align="center">Country details Search</div>
<tr>
<td>Country</td>
<td><select name=""></select></td>
</td>
</tr>
<input type="button" value="submit" name="Go" id="button_id">

</table>

<table width="3" border="1" id="state1" align="center" >
<div id="statediv_id" align="center">State details Search</div>
<tr>
<td>State</td>
<td><select name=""></select></td>
</tr>
</table>
<table width="3" border="1" align="center" id="festival1">
<div id="fesdiv_id" align="center">Festival details Search</div>
<tr>
<td>Festival</td>
<td><select name=""></select></td>
</tr>
</div>
</form>
</body>
</html>
kavithadevan is offline
Reply With Quote
View Public Profile
 
Old 07-14-2007, 02:43 PM Re: Hide and visible option in js
Average Talker

Latest Blog Post:
New Site -- ArcadeRex.com
Posts: 18
Name: danno
Trades: 0
Try this:

======================================

<html>
<head>
<script language="JavaScript">
<!--
function FP_changeProp() {//v1.0
var args=arguments,d=document,i,j,id=args[0],o=FP_getObjectByID(id),s,ao,v,x;
d.$cpe=new Array(); if(o) for(i=2; i<args.length; i+=2) { v=args[i+1]; s="o";
ao=args[i].split("."); for(j=0; j<ao.length; j++) { s+="."+ao[j]; if(null==eval(s)) {
s=null; break; } } x=new Object; x.o=o; x.n=new Array(); x.v=new Array();
x.n[x.n.length]=s; eval("x.v[x.v.length]="+s); d.$cpe[d.$cpe.length]=x;
if(s) eval(s+"=v"); }
}
function FP_getObjectByID(id,o) {//v1.0
var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
return null;
}
// -->
</script>
</head>
<body>
<div align="center">
<div align="center">
<b>
<h2>Search any Events</b></h2>
</div>
<form>
<table border="0" id="select">
<tr>
<td>
<input type="radio" align="center" id="country_id" name="select" value ="country" onclick="FP_changeProp(/*id*/'country1',0,'style.visibility','visible'); FP_changeProp(/*id*/'state1',0,'style.visibility','hidden'); FP_changeProp(/*id*/'festival1',0,'style.visibility','hidden')"></td>
<td>Country</td>
<br>
</tr>
<tr>
<td>
<input type="radio" align="center" id="state_id" name="select" value="state" onclick="FP_changeProp(/*id*/'country1',0,'style.visibility','hidden'); FP_changeProp(/*id*/'state1',0,'style.visibility','visible'); FP_changeProp(/*id*/'festival1',0,'style.visibility','hidden')"></td>
<td>State</td>
<br>
<br>
<br>
</tr>
<tr>
<td>
<input type="radio" align="center" id="festival_id" name="select" value="festival" onclick="FP_changeProp(/*id*/'country1',0,'style.visibility','hidden'); FP_changeProp(/*id*/'state1',0,'style.visibility','hidden'); FP_changeProp(/*id*/'festival1',0,'style.visibility','visible')"></td>
<td>Festival</td>
<br>
<br>
<br>
</tr>
</table>
<div id="country1" style="position: absolute; visibility: hidden">
<table width="3" border="1" align="center">
<div id="coundiv_id" align="center">
Country details Search</div>
<tr>
<td>Country</td>
<td><select name></select></td>
</td>
</tr>
<input type="button" value="submit" name="Go" id="button_id">
</table>
</div>

<div id="state1" style="position: absolute; visibility: hidden">
<table width="3" border="1" align="center">
<div id="statediv_id" align="center">
State details Search</div>
<tr>
<td>State</td>
<td><select name></select></td>
</tr>
</table>
</div>

<div id="festival1" style="position: absolute; visibility: hidden">
<table width="3" border="1" align="center">
<div id="fesdiv_id" align="center">
Festival details Search</div>
<tr>
<td>Festival</td>
<td><select name></select></td>
</tr>
</div>
</table>
</div>
</form>
</div>
</body>
</html>

========================================
__________________
*
Please login or register to view this content. Registration is FREE

*
Please login or register to view this content. Registration is FREE

*
Please login or register to view this content. Registration is FREE
dynaweb is offline
Reply With Quote
View Public Profile Visit dynaweb's homepage!
 
Old 07-14-2007, 02:47 PM Re: Hide option in javascript
Average Talker

Latest Blog Post:
New Site -- ArcadeRex.com
Posts: 18
Name: danno
Trades: 0
See similar here http://www.webmaster-talk.com/javasc...ion-in-js.html
__________________
*
Please login or register to view this content. Registration is FREE

*
Please login or register to view this content. Registration is FREE

*
Please login or register to view this content. Registration is FREE
dynaweb is offline
Reply With Quote
View Public Profile Visit dynaweb's homepage!
 
Old 07-14-2007, 08:31 PM Re: About hide option
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
several threads on the same subject merged

To kavithadevan

Use the reply button DO NOT keep starting new threads
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to About hide option
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.30388 seconds with 12 queries