Your HostICan Community  


Go Back   Your HostICan Community > Programming & Design > Javascript / Java Applets

Javascript / Java Applets Are you a JavaScript guy? Do you need help with JavaScript? This is the place to talk about anything related to Java.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-16-2009, 03:26 PM
-A-R-H- -A-R-H- is offline
Junior Member
 
Join Date: Apr 2009
Posts: 3
Default code for dynamic rotation of text for a website in my hosting

I looked around but I could not find a code for dynamic rotation of text for the website in my hosting. I want to change a part of text from my web page without refreshed that page.
Reply With Quote
  #2  
Old 08-16-2009, 04:41 PM
hood's Avatar
hood hood is offline
Senior Member
 
Join Date: Jan 2009
Posts: 107
Default Re: code for dynamic rotation of text for a website in my hosting

Edit the web page and put this code between head tag:
HTML Code:
<script type="text/javascript">
function toggleDiv(divid){
if(document.getElementById(divid).style.display == 'none'){
document.getElementById(divid).style.display = 'block';
}else{
document.getElementById(divid).style.display = 'none';
}
}
</script>
In the body tag add this code where you need:
HTML Code:
<div id="mydiv" style="display:none">paragraph1</br>paragraph2</div>
<a href="javascript:;" onmousedown="toggleDiv('mydiv');">commit change</a>
I hope this code is useful for you.
Reply With Quote
Reply

Tags
code, dynamic, hosting, rotation, text, website

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On

Forum Jump


All times are GMT -4. The time now is 03:20 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.

Copyright © 2003 - 2008 HostICan. All Rights Reserved.