zachary Posted June 3, 2006 Share Posted June 3, 2006 Ok I made a simple javascript when clicking on choice changes the pages contents to comming soon <html><head><script type="text/javascript">function comingsoon(){document.write("Comming soon<br />")}</script></head><body><select size="5"><option onclick="comingsoon()" disabled>test<option onclick="comingsoon()" disabled>test2</select></body></html> What I want it to do is instead of taking away all the content and displaying this text is to add: <div align="center"><div style="background-color: #f4e7ea; border: 1px solid #986265; padding: 5px; font-weight: normal; width: 50%; text-align: center;">Coming soon....</div></div> Link to comment Share on other sites More sharing options...
skym Posted June 3, 2006 Share Posted June 3, 2006 <html><head><script type="text/javascript">function comingsoon(){//document.write("Comming soon<br />")document.getElementById('container').innerHTML = '<div align="center"><div style="background-color: #f4e7ea; border: 1px solid #986265; padding: 5px; font-weight: normal; width: 50%; text-align: center;">Coming soon....</div></div>';}</script></head><body><select size="5"><option onclick="comingsoon()">test<option onclick="comingsoon()">test2</select><span id="container"></span></body></html> Link to comment Share on other sites More sharing options...
zachary Posted June 3, 2006 Author Share Posted June 3, 2006 <html><head><script type="text/javascript">function comingsoon(){//document.write("Comming soon<br />")document.getElementById('container').innerHTML = '<div align="center"><div style="background-color: #f4e7ea; border: 1px solid #986265; padding: 5px; font-weight: normal; width: 50%; text-align: center;">Coming soon....</div></div>';}</script></head><body><select size="5"><option onclick="comingsoon()">test<option onclick="comingsoon()">test2</select><span id="container"></span></body></html> <{POST_SNAPBACK}> I edited it a little bit and it works like I want it to. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now