Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Story Toolbar

Status
Not open for further replies.
here's a rudimentary version:
Code:
<script type=&quot;text/javascript&quot;>
function storyText(cmd) {
	var div = document.getElementById(&quot;story&quot;);
	var fontSize = parseInt(div.style.fontSize, 10);
	var min = 8;
	var max = 20;

	if (isNaN(fontSize)) fontSize = 14;
	else fontSize += cmd;

	if (fontSize < min) fontSize = min;
	if (fontSize > max) fontSize = max;

	div.style.fontSize = fontSize + &quot;px&quot;;
}
</script>

<div id=&quot;toolbar&quot;>
	<input type=&quot;button&quot; value=&quot;-&quot; onclick=&quot;storyText(-1);&quot; />
	<input type=&quot;button&quot; value=&quot;+&quot; onclick=&quot;storyText(1);&quot; />
</div>
<div id=&quot;story&quot;>
	story text blah blah blah 
	story text blah blah blah 
	story text blah blah blah 
	story text blah blah blah 
	story text blah blah blah 
	story text blah blah blah 
	story text blah blah blah 
	story text blah blah blah 
	story text blah blah blah 
	story text blah blah blah 
	story text blah blah blah 
	story text blah blah blah 
</div>

=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); }
 
dang that story thing is hard, I love that thing, they shouldmake it static huh?
 
Hey you know, that's not a half bad idea.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top