Keyarn
Graham Plz i didnt get you am confused can you break down de explanation with xample?
Graham
Keyarn its probably get variables and a include using the get variable
something like this
<a href="?inc=this_file#">click me</a><xt:include file="/includes/{_$inc|default_file}"/>
Copy code
if you want to cycle through files put the links inside the included files (the link for 'this_file' would go in 'default_file') rather than on the main page so that clicking it loads the next one and so on
The same sort of action as the first javascript except it reloads the page and will work on any browser
Plus the included files can contain xt:script and xt:functions
example added to
http://baretest.xtgem.com/button
Keyarn
Graham Thanks sir. Plz i also want you to tell me dis one. It is de menu button at de left of de forum header of this page
http://strikecoded.xtgem.com/forum
plz i wan to know if it is a javascript or made of xt getvariables
Graham
Keyarn For a start <div> should not be in <span> div is a block element span is inline and your nesting is wrong
<p> should not be in <span> either and you have that nested wrong as well
wrap the menu code in a outer <div>
Separate script or add the function to the other
<script>
function show_hide(elem) {
obj = document.getElementById(elem);
if( obj.style.display == "none" ) {
obj.style.display = "block";
}
else {
obj.style.display = "none";
}}
</script>
<button onclick="show_hide('menu_outer')"> menu </button>
<div id="menu_outer" style="display:none>
your menu code goes here
</div>
Copy code Click the button to show the menu code
demo on
http://baretest.xtgem.com/button
remember a lot of mobile browsers cannot handle "dynamic" code
this nor the other will work on many versions of opera mini or ucweb
Keyarn
Graham Thanks sir!! Plz i also av this
<script>
function first(){
document.getElementById('main1').innerHTML='<b>The first page</b>';
document.getElementById('main2').innerHTML='<b>The second page</b>';
document.getElementById('main3').innerHTML='<b>The third page</b>';
}
</script>
<span class="zxfourborder"><div class="top_nav"><button onclick="first()"> menu </button></span></div><br /><span class="full"><p id="main1" align="left"></span></p><span class="full"><p id="main2" align="left"></span></p><span class="full"><p id="main3" align="left"></span></p><p id="main4" align="left"></p>
Copy code now i need a click button xo that when ever someone click on it all de tree values will disapear asin i want to hide them back with a click button
Graham
Keyarn http://baretest.xtgem.com/button <script>
function first(){
document.getElementById('main').innerHTML='<b>The first page</b>';
document.getElementById('button').setAttribute('onclick','second()');
document.getElementById('button').innerHTML='second';
}
function second(){
document.getElementById('main').innerHTML='<b>The second page</b>';
document.getElementById('button').setAttribute('onclick','third()');
document.getElementById('button').innerHTML='third';
}
function third(){
document.getElementById('main').innerHTML='<b>The third page</b>';
document.getElementById('button').setAttribute('onclick','first()');
document.getElementById('button').innerHTML='first';
}
</script>
<div id="main">default content on first load</div>
<button id="button" onclick="first()">first</button>
Copy code The content will be loaded and the button will change when clicked
Keyarn
Graham Plz Sir, in this type of script, what kind of click button will i use to display all de tree values at ones
<script>
function first(){
document.getElementById('main').innerHTML='<b>The first page</b>';
}
function second(){
document.getElementById('main').innerHTML='<b>The second page</b>';
}
function third(){
document.getElementById('main').innerHTML='<b>The third page</b>';
}
</script>
Copy code asin when i click on de button den dis tree value will apear
The First Page,
The 2nd Page,
The 3rd page
Copy code all in one button. Plz sir help me
Keyarn
Lordeagle Lordeagle am still weting 4ur reply
Keyarn
Keyarn Hmmm how can you ask rat if he want to eat fish am 24hr reaady and 100% prepare to learn my boss