Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 11-05-2004, 01:25 PM cookies...
Buchannon's Avatar
Average Talker

Posts: 15
Trades: 0
Ok I had a post in here about changing the font size of a document, and I finally got it working, now I'm trying to store and unload that value into a cookie for when the user comes back it will remain the same size font. I'm totally new to all this so whatever help you guys can give me would help. So far I have:

Quote:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title>Test</title>
<script type="text/javascript">

function changeSize(size)
{
var date = new Date("December 31, 2023");
var the_date = date.toGMTString();
var the_size = "sizecookie=" + size +";expires=" + the_date;
document.cookie = the_size;
//cookie saved as sizecookie=xxpx;expires=December 31, 2023

//Starts unloading cookie
var csize = document.cookie;
var csize = csize.split("=");
var csize = csize[1];
var csize = csize.split(";");
var csize = csize[0];

document.getElementById('test').style.fontSize = csize;
document.getElementById('tabletest').style.fontSiz e = csize;
}//changeSize


</script>
</head>

<body>
<form>
<select title="Select a Font Size" name="FontSize" id="FontSize" style="width:75px" class="layoutMenu">
<option value="10px">10px</option>
<option value="11px">11px</option>
<option value="12px" selected>12px</option>
<option value="13px">13px</option>
<option value="14px">14px</option>
<option value="15px">15px</option>
<option value="16px">16px</option>
<option value="17px">17px</option>
<option value="18px">18px</option>
<option value="19px">19px</option>
<option value="xx-large">extra Large</option>-->
</select>

<input type="button" onclick="changeSize(document.getElementById('FontS ize').val ue);" value="GO TO IT!">
</form>

<div id="test">
Here is some text
<br>

<br>
Here is some text


<table id="tabletest"><tr><td>did it work on me?</td></tr><tr><td>How about me?</td></tr></table>


</div>

</body>
</html>
Buchannon is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to cookies...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.85485 seconds with 12 queries