Longer Cookies

Sep 12, 2004

I really like this script http://dynamicdrive.com/dynamicindex1/navigate2.htm

however, I can't seem to find a script that uses cookies for a long period of time, instead of just for browser sessions.

Is there any way someone could help me on this and make the script use longer cookies for so many days.

View 1 Replies


ADVERTISEMENT

How To Express Progress Of Longer Run Of JS?

Jul 23, 2005

I check data validity in html form by JS. Something like

for (i=0; i<document.form[0].elements.length; i++) {
chechkValidity(i);
}

Unfortunately, the form[0] has about two thousands elements (it is
statistical questioning form for companies) and execution of this one
cycle takes about twenty seconds.

The problem is, that during these 20 seconds the browser "freezes":
The button activating the cycle disappears and the mouse pointer
doesn't change into "watch" (sandglass) showing that something is
being carried out.

Although after the 20s everything is ok, it is not the nicest behavior
of the form. I don't assume somebody is so impatient to restart during
those 20 seconds. I just want to minimize the users' swearing on my
address and tha's why my question:

How to show the progress of that cursed for-cycle?

View 13 Replies View Related

CssRules No Longer Works In FireFox 1.5

Jan 22, 2006

I have a WYSIWYG editor based on the HTMLArea project that uses the
cssRules object of a stylesheet to add/update stylesheet rules for
table cells. Ever since I upgraded to FireFox 1.5, I get the following
error message when trying to access the cssRules object:

"Access to restricted URI denied"

The code I am trying to execute looks like this:

var currStyleSheet = editor._doc.styleSheets[0];
var currRules = currStyleSheet.cssRules;
var tdIndex = currRules.length;
for(i = 0; i < currRules.length; i++) {
if(currStyleSheet.cssRules.item(i).type == 1) {
//if it is a style rule
var currRule = currRules.item(i)
if (currRule.selectorText.toLowerCase() == "td") {
tdIndex = i;
}
}

}

This code is simply looking for any rules for TD elements. I am at a
loss as to what is going on and/or what changed if FireFox to cause
this error. It worked fine in previous releases of FireFox. The
document that I am trying to access the stylesheet for is within an
IFRAME, which is what I believe is causing the problem.

View 19 Replies View Related

JQuery :: AjaxSubmit Worked In 1.3.2 But No Longer In 1.4.xx?

Jan 21, 2011

We've been using ajaxSubmit to process a login form request (can be found here: [URL] Login Link in navigation). However when we attempted to upgrade from 1.3.2 to 1.4.4, we get the following error whenever we submit the form:

"jQuery(this).ajaxSubmit is not a function"

The only way we've been able to get the form to work again is to go back to vs. 1.3.2.

Has something changed in 1.4.4 that would prevent the form from working? Is "ajaxSubmit()" no longer a valid function?

Here's the javascript below:

jQuery(document).ready(function() {
jQuery("#show_login").click(function() {
formLogin();
jQuery('#user').focus();

[Code].....

View 2 Replies View Related

Script No Longer Working In New Version Of Firefox

Oct 28, 2009

Why this script no longer works in firefox? It works in the older version but since it got updated to version 3.5.3 it doesnt work anymore. It works fine in IE.

<script type="text/javascript">
function show_popup(s_file, msg, msg2, msg3, w, h) {
var p=window.createPopup()
var pbody=p.document.body
pbody.style.backgroundColor="white"
pbody.style.border="solid white 6px"
pbody.innerHTML="<table cellpadding=0 bgcolor=white style='border:0px solid #777777'><tr><td colspan='3'><img src='images/"+s_file+"'></td></tr><tr><td align=left><font face='times' color='black' size='1'><i>"+msg+"</i></font></td><td align=left><font face='times' color='black' size='1'><i>"+msg2+"</i></font></td><td align=left><font face='times' size='1' color='black'><i>"+msg3+"</i></font></td></tr></table>"
p.show(15,15,w,h+40,document.body)
}
</script>

This is then what I add for each of the images ->>
<a href="javascript:show_popup(image.jpg','Image Example ','acrylic on masonite','62 X 48 inches',430,564)"><img src="images/thumbs/image_thumb.jpg" alt="Images" width="100" height="128" border="0" align="center" valign="TOP" /></a>

View 6 Replies View Related

Two Javas - One Page - One In The Red Is No Longer Working After Adding The 2nd One

Jan 15, 2010

What do I need to do with this?

Code:
1st:
<script type="text/javascript" src="includes/js/jquery.js"></script>
<script type="text/javascript" src="includes/js/jquery.lightbox-0.5.js"></script>
<script type="text/javascript" src="includes/js/jquery.hoverIntent.minified.js"></script>
<script type="text/javascript" src="includes/js/jquery.tooltip.js"></script>
[Code]....

The one in the red is no longer working after adding the 2nd one.

View 5 Replies View Related

Query :: String Dilema - The Tab No Longer Open

Jan 31, 2010

i've built an app using extjs when it a user browses to the url domain.tld/#v=xxxxxx a new tab opens in a extjs panel to show content for the video with id xxxxx as soon as i submit a form from another page or even the same one and popuulate another variable, q, the tab no longer opens when the url looks like domain.tld/index.php?q=some+text#v=xxxxxx why it no longer gets the value of v? i'm using

[Code]...

to get v's value and if it is set then a javascript function is called to open the tab.

View 2 Replies View Related

Show / Hide DIV OnClick No Longer Works

Feb 8, 2011

I have a page where an alternate address area is kept hidden via JavaScript and CSS divs. If you click that you want to use an alternate billing address, two divs are expanded. One with the form fields for entering in your alternate address, the other area has further info about why we need that alternate address. (Code is below). This works PERFECTLY for my needs....however, if you reload the page, the "show" button remains selected and OFF=ON and ON=OFF if you get my meaning...so when you click the radio that should be hiding the divs, it shows them and vice versa. Additionally if there is an error in the form and the page reloads to display the error, only the billing address area stays expanded (its inside the <form> tags), the text area next to it goes back to being hidden, and the show/hide OnClick no longer works. Ideally, I'd like the two to maintain the same state (i.e. if both we're shown, both stay shown).

CODE (trimmed down of course):
Code:
<head>
<style type="text/css" media="all">
.invis { visibility: hidden; display: none; }
.vis { visibility: visible; display: inline; }
</style>
<script language="javascript" type="text/javascript">
var c = 'invis';
var ids = new Array('id1', 'id2'); // IDs of your <div>s
function doSwap() {
c == 'vis' ? c = 'invis' : c = 'vis';
for (var i=0; i<ids.length; i++) {
document.getElementById(ids[i]).className = c;
}}
</script>
</head>
<body>

<div id="id1" class="invis">This is all just plain text that appears when the NO radio is clicked but disappears on reload</div>
<form>
<table>
<tr>
<td>
<input type="Radio" name=" " value="hide" onClick="doSwap()" id=""> YES
<input type="Radio" name=" " value="show" onClick="doSwap()" id=""> NO
</td>
</tr>
<tr id="id2" class="invis">
<td>extra address entry stuff that appears when the NO radio and that stays on page after reload</td>
</tr>
</table>
</body>

View 2 Replies View Related

JQuery :: Set Relative Position For Dialog Box When Page Becomes Longer?

Aug 9, 2011

Have a web app which consists of a form and have it set up to launch a dialog box containing information next to the subject label text field.Everytime, someone fills out the form and clicks on submit, the form's message body (from the text area of the form) is displayed on top and theform is displayed underneath it. Before, I had it set up as fixed (x,y) for the dialog box to appear next to the subject label. But, now, whenthe page becomes longer, the dialog box doesn't appear next to my subject label text field. It is displayed a lot lower.

Here's the code to find the position:

// Finds the position and adds 40px to the left axis.
function findPosition(obj) {
var curleft = curtop = 0;
if (obj.offsetParent) {

[Code]....

How can I set it so my findPosition() calculation doesn't miscalculate when the page is too long (when scroll bars are needed)?

Is there a way to set the relative positioning to always have the dialog appear 40px right of the subject label?

View 2 Replies View Related

JQuery :: GetJSON In Firefox Takes Longer Than In Other Browses?

Sep 16, 2009

jQuery using getJSON calls specific handler, lets say MyHandler.ashx $.getJSON(/MyHandler.ashx?param1=someVal, function(data) {
some code;
}

In Opera and Explorer this is executed immediately. In FireFox it takes over 1s before request is executed. Even when I set breakpoint in my handler it will be hit after 1s... could you tell me why it is so slow? I got latest version of firefox.

View 1 Replies View Related

JQuery :: SimpleModal.js On A Page - Add Options To The Modal - No Longer Works

Sep 29, 2010

I'm using simpleModal.js on a page and it works great however, once I try to add options to the modal it no longer works.

Here's what I'm using now and it works successfully:

If I try adding a width option it breaks...absolutely nothing happens:

View 1 Replies View Related

Second Level Of Buttons (sub Menu) To Disappear Once The Cursor Is No Longer Hovering Over Them?

Jun 24, 2009

I would like the second level of buttons (submenu) to disappear once the cursor is no longer hovering over them - rather than appearing until another button in the top level is hovered over. modify the javascript below to do that?

[Code]....

View 3 Replies View Related

JQuery :: IE - Select Box Geting Longer Text And The Html Table TD Is Not Enlarging Itself Too

Mar 24, 2010

Ihave two select boxes. The second one is getting the content with ajax call, acording to the value selected at the first one.

My problemis onlyin IE. When the second select box geting longer text and the html table TD is not enlarging itself too.

FireFox works fine with this code.

View 2 Replies View Related

Drop Down Menu - Add SetTimeout() To Create A Delay - No Longer Runs Correctly

Apr 12, 2009

Trying to develop drop down menu... I'm showing a div, then hiding it. It works perfectly, but I need to set a time delay... that's where the problem exists. When I add SetTimeout() to create a delay, it no longer runs correctly...

Here is the code.

Code:

View 1 Replies View Related

JQuery :: Css Attribute Selectors No Longer Work With The '$' In The Attribute Value As Of 1.5+

Mar 4, 2011

I'm working with a large (and unweildy) ASP.NET application, and there is a lot of jQuery code that uses selectors like this:

[name=_aspnetControl$_withASubControl] And unfortunately, some selectors that also look like this:

[name^=_someAspNetControl$_radioButtonList].

In other words, the effort to remove the $ from the attribute selectors would be monumental. If it is possible to escape the $ symbols, I can do that easily enough, but unfortunately the situation right now means that I can't upgrade to jQuery 1.5.

View 2 Replies View Related

Form No Longer Submits After Adding A Second Form?

Sep 6, 2009

I am using a simple form to submit values to another website. This has been working without any problems. I now have added a second form to the page. I have separated the text boxes and duplicated the information from one form to another. The problem is, when I click on the link that use to submit the information, nothing happens. Before the addition of the new form a new window would open with the search that I had submitted. Am I missing something to point to one form or the other? The following is the code that i am using in the form that no longer submits.

<script language="javascript">
function submitPostLink()
{
document.postlink.submit();
}

[Code].....

View 1 Replies View Related

Sortable List / Data No Longer Sortable

Jul 9, 2007

My script is the same as this http://www.w3schools.com/php/php_ajax_database.asp

When the data comes back to me its using

document.getElementById("txtHint").innerHTML=xmlHttp.responseText

I get the data back fine. However inside getuser.php my data is in a sortable list. If i use this code above. My data comes back but I can no longer sort my list and move things around (I'm guessing because its returned as HTML only). Can anybody give me a solution of what i need to change so my list is also sortable again?

View 3 Replies View Related

Cookies And OOP

Dec 16, 2002

For all those "Cookie Problems" posts that are flooding this Forum:

function cookie(name,value)
{ this.name = name;
this.value = value;
this.attributes = new Array();
this.expiresIn = function (days)
{ expiration = new Date();
expiration.setTime(expiration.getTime() + (days*86400000));
this.attributes["expires"] = expiration.toGMTString();
};
this.set = function ()
{ var cookiestr = this.name + "=" + escape(this.value);
for(attr in this.attributes)
{ cookiestr += "; " + attr
if(this.attributes[attr].length > 0)
cookiestr += "=" + this.attributes[attr];
}
document.cookie=cookiestr;
};
this.erase = function()
{ this.expiresIn(-1);
this.set();
delete cookies[this.name];
};
}

function cookieContainer()
{ this.add=function (name,value)
{ this[name]=new cookie(name,value);
};
this.get=function (name)
{ for(o in this)
if(o == name)
return this[o];
return null;
}
var cstr=document.cookie;
var spaces=/s/gi;
cstr=cstr.replace(spaces,'');
while(cstr.length>0)
{ cequal=cstr.indexOf("=");
if(cequal==-1) cequal=cstr.length;
var name=cstr.substring(0,cequal);
cstr=cstr.substring(cequal+1,cstr.length);
cend=cstr.indexOf(";");
if(cend==-1) cend=cstr.length;
var value=unescape(cstr.substring(0,cend));
cstr=cstr.substring(cend+1,cstr.length);
this.add(name,value);
}
}
var cookies = new cookieContainer();

View 10 Replies View Related

Cookies Php Mix With JS?

Jun 20, 2011

If I create a cookie in PHP here.

setcookie('cookie_cl_'.$client_id, 'cookie_cl_'.$client_id, $time, "/","", 0);

the php script is set on domain B

the javascript I want to read the cookie is set on domain B as well

However, the

hosted on DOMAIN A <script src=domain B .js>

I want the cookie to remain on domain B, but if I open the JS file using domain A, both php and JS are using domain B, though I can't seem to get the JS to find the cookie, is it looking at domain A ?

am I suppose to set a domain on cookie for this to work?

View 1 Replies View Related

Cookies For Login

Jul 23, 2005

i am about to write my first javascript for a Login "remember me
cookie"...but i will say i am not sure of what method?

i dont want to save user id and password.....

View 2 Replies View Related

Setting 2 Cookies

Jul 23, 2005

I need to set two cookies. One to be used for redirection and page loading,
which i have now and works and a second one that is used to write
information on a page.

Both are to be set automatically when loading the page. The second will
will set a company name like "Your company name". Then when the next page
is loaded it will put "Your company name" on the webpage. And like I said
before the first cookie is set for navigation purposes.

View 1 Replies View Related

Cookies And Frames

Jul 23, 2005

What's the trick to sharing cookies between frames? I can set and read a
cookie in the same frame, but if I try to read the cookie in another frame
it is undefined. :o(

There are some other cookies that are available in all frames, so I know
that the frames are capable of reading cookies, just not the ones that I set
in the other frame.

View 1 Replies View Related

Cookies To Another Web Site

Oct 25, 2005

Got a client with three web sites. I want to be able to pass cookies between these sites, so far no luck. Tried:

document.cookie = name + "=" + escape (value) +
((exp == null) ? "" : ("; expires=" + exp.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
("; domain=.yorktest.com") +
((secure == true) ? "; secure" : "");

Code:

View 1 Replies View Related

Retrieving Cookies

May 15, 2006

I have the code below that will retrieve a cookie that was placed by the server (ie: joes.com) that the document resides on. I want to be able to retrieve a cookie set by another server (ie: freds.com) but I want to retrieve it from a page served by joes.com. This code apparently using 'document.cookie' determines the server that the document resides on and looks for cookies from that server. Anybody know of code that will let you determine the server?

var name = "cookie";
function getCookie(name) {
var cname = name + "=";
var dc = document.cookie;

if (dc.length > 0) {
begin = dc.indexOf(cname);
if (begin != -1) {
begin += cname.length;
end = dc.indexOf(";", begin);
if (end == -1) end = dc.length;
return unescape(dc.substring(begin,
end));
}
}
return null;
}

View 1 Replies View Related

Cookies And Webhop.

Nov 4, 2006

I am using IE6 to view pages from a corporate web server through
internet, not VPN. But, the I use a webhop service, so the URL I use is
silently redirected to another place. I think this is because the
company uses dynamic IP addresses for the server.

Anyway, I am trying to use a cookie to remember user login info, but
the cookie is not working. If connect to the server through the VPN
(when I know the IP address of the server) everything works fine. So, I
am thinking that the webhop thing is causing me a problem with cookie.

Reading about the cookie I think that either the path or the domain
needs setting. Am I on the right lines here, or is it something else?

View 7 Replies View Related

Javascript And Cookies

Jun 9, 2007

I use Javascript cookies in a web application with a command like this

document.cookie = NameOfCookie + "=" + escape(value) +
((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());

But it does not work in some cases that I dont understand ...

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved