NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page CSS Issue

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
5 members in live chat ~  


Reply
 
LinkBack Thread Tools
Old 12-17-2010, 07:06 PM THREAD STARTER               #1 (permalink)
NamePros Regular
 
snike's Avatar
Join Date: Mar 2006
Location: USA
Posts: 497
snike has a spectacular aura aboutsnike has a spectacular aura about
 


Save a Life

CSS Issue


I have this script that is supposed to fade content in a div element in and out.

content > fades away to blank > new content fades in

This is the basic setup:

Code:
function displayMenu(currentMenu) {
setTimeout("fadeOut()",0);
setTimeout("fadStay()",1000);
setTimeout('ps_change(currentMenu)',1100);
setTimeout("fadeIn()",1200);
};
The problem I am having has to deal with line 4 of the code. I can't get the ps_change() to run. ps_change changes the content in the div. The content fades away and the content reappears unchanged. Any help is appreciated.
????: NamePros.com http://www.namepros.com/programming/692339-css-issue.html

This is ps_change():
Code:
function ps_change (cMenu) {
var thisMenu = document.getElementById(cMenu).innerHTML;
document.getElementById('ps_area').innerHTML = thisMenu;
}
Thanks!
snike is offline   Reply With Quote
Old 12-18-2010, 03:07 AM   #2 (permalink)
New Member
Join Date: Jul 2010
Posts: 10
adam091 is an unknown quantity at this point
 



The vars need to be outside of the string, try this.

Code:
function displayMenu(currentMenu) {
setTimeout("fadeOut()",0);
setTimeout("fadStay()",1000);
setTimeout("ps_change(" + currentMenu + ")",1100);
setTimeout("fadeIn()",1200);
};
adam091 is offline   Reply With Quote
Old 12-18-2010, 03:49 AM THREAD STARTER               #3 (permalink)
NamePros Regular
 
snike's Avatar
Join Date: Mar 2006
Location: USA
Posts: 497
snike has a spectacular aura aboutsnike has a spectacular aura about
 


Save a Life
It works! Thank you!
snike is offline   Reply With Quote
Old 12-18-2010, 03:28 PM   #4 (permalink)
New Member
Join Date: Jul 2010
Posts: 10
adam091 is an unknown quantity at this point
 



Glad to hear
adam091 is offline   Reply With Quote
Old 12-24-2010, 04:55 AM   #5 (permalink)
NamePros Member
Join Date: Nov 2010
Posts: 34
pausch is an unknown quantity at this point
 



The script really works.Thanks
pausch is offline   Reply With Quote
Old 01-09-2011, 06:39 PM   #6 (permalink)
First Time Poster!
Join Date: Jan 2011
Posts: 1
aubreya94 is an unknown quantity at this point
 



Trying to get CSS-based websites to look the same across all browsers can often be difficult. Many of the problems however lie with Internet Explorer implementing CSS commands differently to other, more standards compliant browsers.
____________
SEO
Search Engine Optimization
aubreya94 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS for dummies in 10 lines gaucho1976 Webmaster Tutorials 14 09-04-2009 11:30 PM
CSS Navigation Menu IE Issue Moondreamer Web Design Discussion 0 11-14-2008 03:47 PM
CSS - centering issue Daniel Exe Programming 5 04-16-2006 08:36 PM
CSS Layout Issue In I.E. (figures) XX7509 Web Design Discussion 3 03-25-2005 11:34 PM

 
All times are GMT -7. The time now is 02:42 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger