PDA

View Full Version : fluidtextresizer localstorage ?



liat
07-01-2015, 08:06 AM
1) Script Title: fluidtextresizer

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex9/fluidtextresizer.htm

3) Describe problem: there is a cookies/session . there is no local storage. is there an option to add it ? how ?

regards - liat

ddadmin
07-01-2015, 10:07 PM
There's no tangible benefits to switching over to using LocalStorage in this case as far as I can see. Is there a reason for your asking?

liat
07-02-2015, 01:38 PM
ddadmin hi, when using the fluidtextresizer in an app - after close and a open again the app the user should set again and again the font size he prfer that is why i think it will be benefits using local storage. what do you think about it ?
best regards

liat
07-12-2015, 11:42 AM
at the dynamicdrive site the demo is great and even after reload it save the data. but when i used the script on site and at an app it did'nt save any data. is it a solution for that ?

Beverleyh
07-12-2015, 12:50 PM
It's impossible to answer or troubleshoot something we can't see. If you provide a link we can help troubleshoot why cookies aren't working for you.

liat
07-12-2015, 03:57 PM
hi beverleyh thank for your answer. the code is exactly as http://www.dynamicdrive.com/dynamicindex9/fluidtextresizer.htm. i copied step 1 and step 2 and add [url] http://www.dynamicdrive.com/dynamicindex9/fluidtextresizer.js so the text resize fine but the cookies aren't working.
i wonder, is there something i should add or change like set cookies function for sepcific days and etc . (i havn't doen it) ?

Beverleyh
07-12-2015, 04:03 PM
The demo page works fine so we don't need to troubleshoot that. We need to see YOUR page in order to work out why YOUR setup isn't working as expected.

liat
07-12-2015, 04:52 PM
this is the html

<!DOCTYPE html>
<html>
<head>

<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/jquery.mobile-1.4.5.css">

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

<script type="text/javascript" src="js/fluidtextresizer.js">

/***********************************************
* Fluid Text Resizer- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/
</script>
<script type="text/javascript">
var mytextsizer=new fluidtextresizer({
controlsdiv: "sizecontroldiv", //id of special div containing your resize controls. Enter "" if not defined
targets: ["body"], //target elements to resize text within: ["selector1", "selector2", etc]
levels: 6, //number of levels users can magnify (or shrink) text
persist: "session", //enter "session" or "none"
animate: 200 //animation duration of text resize. Enter 0 to disable
})
</script>
<div data-role="page" id="page10">
<div data-role="header" data-position="fixed" data-fullscreen="true">
<h1>test</h1>
<div data-role="main" class="ui-content">
<p> Mobile Developer!!</p>
<div id="sizecontroldiv" class="controlstyle">
Increase/Decrease controls: <a href="#smaller"><img src="fontminus.gif" /></a> *<a href="#bigger"><img src="fontplus.gif" /></a><br /><br />
Font levels controls: <a href="#fontsize-1"><img src="-1.gif" /></a> <a href="#fontsize0"><img src="0.gif" /></a> <a href="#fontsize1"><img src="1.gif" /></a> <a href="#fontsize2"><img src="2.gif" /></a>
</div>
<p>Arbitrary link control: <a href="javascript:mytextsizer.setFontLevel(0)">Set font level to default</a>
</div>
<div data-role="footer" data-position="fixed" data-fullscreen="true">
<h1>Footer Text</h1>
</div>
</div>
</body>
</html>
the js is the same exactly as (no any change) http://www.dynamicdrive.com/dynamici...textresizer.js

Beverleyh
07-12-2015, 07:29 PM
I'm afraid I can't phrase it any other way. We need to see your actual live web page.

Guessing might present 20 possible reasons as to why your page isn't working, but realistically, nobody is going to waste their time thinking of them and typing them, when the quickest way is for you to provide the link to the problematic page. If you want help, you need to make it easy for people to give you help.

Think of it this way - I have the same car as my next door neighbour. He's been having problems starting his this past week, yet mine has started first time, every time. What do you think the mechanic would say if he took MY car to the garage and asked why HIS wont start?

liat
07-13-2015, 06:23 AM
I appreciate your attempt to figure it out. Although due to unworking cookies the fluidtextresizer is'nt combined now in any site so all it has now is the two file above.A code as shown at the dynamicdrive site as it recommended for use. Thank you any way. If you will have any idea or possible options it will be welcome.

liat
07-13-2015, 07:02 PM
so what i found is that chrom browser is disable cookies for local file but in explorer it work fine. but do not work when package it to an apk file.
do you think there a chance to figure it ?