Check Cookie Code Doesn't Work / Sort It?
Nov 25, 2011I wrote this code to open a page if doesn't exist a cookie but it doesn't open the page do you know where I wrong?code...
View 3 RepliesI wrote this code to open a page if doesn't exist a cookie but it doesn't open the page do you know where I wrong?code...
View 3 RepliesI have this marquee code that works fine with IE6 on a Win 2K PC, works fine on IE7 with 2K server and also 2003 server,
but will not work on 2 computers with IE7 on XP.
Anyone know why? code...
So the following code hides/shows fields in a form when radio buttons are clicked, the problem is on the same form I have a checkbox and when said check box is selected the showing and hiding of the fields doesn't work.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">[code]...........
Very basic jquery statement. Works in all other browsers tested except IE7 gives me an error.code...
View 2 Replies View RelatedI have this part of php code...
when I click an unitid, The alert message doesn't work
what's wrong? (i'm newbie to javascript/php/....)
I can call a rest service I have running in a 'test' environment fine from other tools (or directly in browser for that matter).
When I call using jQuery nothing happens.
No errors, no javascript messages. Nothing. [code]...
This is a code for a simple calculator that requires the input of an Area and then calculates how many packs of product are then required to cover that area, rounding up to the next full pack, The results should be displayed in a simple HTML form but its not happening. I can't see any obvious errors. Am I missing something.code...
View 3 Replies View Related1 site sets a cookie on your machine when you have logged in.
The other site is a wordpress blog. In the index.php (at the root level), I wanted to basically shield the site from running if this cookie is not found on their machine. If it is, the blog will run like normal.
Is there a way I can do this without doing a bunch of redirects or form postings?
I'm trying to set a cookie for this file location, but when I leave the site and come back, it doesn't work. Why?
<html>
<head>
<title>Return file directory</title>
[code]....
The code below works fine on IE and FF but not on Google Chrome.
You can preview the below code by pasting it to Frontpage, Dreamweaver and etc.
I'm developing a relatively simple html based site for a gallery. Small images of paintings link to a popup window with a larger image of the painting. The problem is that the javascript code doesn't seem to work in Chrome or the new version of Firefox (where it only opens a new blank tab), though it works perfectly in Safari. This is my code (for vertical images):
var viewerWin=0;
function windowPopVer(URLStr)
{
if(viewerWin)
{
What am I doing wrong? We've changed the settings in Chrome and Firefox so that it enables javascript and all that. Why won't this work?
I recently made a simple tool that opens a website in an iFrame and tells the user how long the page took to load. I made it out of a premade stopwatch
When i run the test in most browsers (Chrome, Firefox 3.6 and older, IE) it works fine with the output textbox going from "Please run the test" to "Test Running" to [TIME TAKEN FOR PAGE TO LOAD] but in firefox 3.7 (Minefield) it goes from "Please run the test" to "0" every time and the page in the iFrame doesn't load.
I've read that Firefox 3.7 has a new Javascript Engine
The test is at [URL] and the problem code is on THIS PAGE (Use View Source in your browser)
I have a problem with quotes.
$(document).ready(function(){
$('#txtValue').keyup(function(){
sendValue($(this).val()); [code]....
if $T contains just "text", the code works perfectly.
if $T contains line break, quotes " or ', the code doesn't work.
If visual basic and firebug doesn't show me any error and if code doesn't work on any browser...so what should i do. I did a little boring - to read my code again to find a simple syntax errors like - writte() for exemple.
But even that does not give me anything! Is there any good recomendations how to change it all?
Look at this code:
Browser gives me out only - Please enter a valid name
I created a page with a thumbnail viewer. Click on a thumbnail and a larger version appears on the same page, NOT a pop up or Lightbox. It previews and validates fine. Even runs in IE. But not in FF(V. 3.6.18). Ideas? Code below with JS highlighted.
[Code]...
I currently have a form named "survey". I found here a JavaScript to validate my form.
I am having serious issues with this script, either it won't execute at all (the form doesn't work, as well as the validation) or the form submits without validating the form.
Here is the current JavaScript I am using.
In the head section
Code:
Code:
I want to give a warning to user when she tries to navigate away from the page. So I am using a 'Confirm' dialogue. Pressing cancel should stop her from leaving the page.
This is my function which is called from the onUnload of the body tag of the page. code...
When I click on 'Cancel' button (part of the form within the same page), then this code is called and if I press cancel in the dialogue, user stays on same page.
However, I press any outside link, which takes user to some other page, then pressing cancel in the dialogue doesn't stop user moving away from the page.
I had php form in a page and I make the submit function using a javascript function ( some thing like protypes.js ). It is working fine in IE , Opera ... Nut doesn't in Firefox. Here is the code...
View 1 Replies View RelatedI am working on a piece of pseudocode for an assignment and as I am new to Javascript, I would like some confirmation I am on the right track with the code.
All of the research I have found has only shown ascending order formulas, so if I am wrong with my if statement and the temp statement and they should i+1 and a[j+1] can you please give a shake of the head; that way I can read my research further and edit my work. If I am on track a nod of the head is a big encouragement.
I cant get my cookie to work. I believe its not my javascript that is wrong. Can anyone take a look to see what i did wrong in my cookie? I have to pages dropdown1.html and dropdown2.html. Both pages have the same exact dropdown list. There is also a javascript file called script.js which makes it so you get an error if you select the same option on the second drop down list as the first. Also in the script.js i have a cookie that should run so dropdown2.html should now what was selected in dropdown1.html Can anyone see if i made a mistake in either my javascript code in my cookie? Right now I am not getting the error message if you select the same option as the first. Ill show all my code incase you need it for reference
dropdown1.html
Code:
Code:
Script.js (this is the part where I cant figure out why the error message does not appear on the second dropdown menu if user selects the same option as the first)
Code:
This is a makeshift sort function for a table. I want to replace a div contents with a javascript function call. It works fine if I define the individual case, but the general case doesn't work. The problem lies with the +divHold+ part. It never converges to the passed value on the 2nd iteration. This is my Div:
[Code]...
I am a php programmer and not a Javascript programmer and I am trying to help a friend out with his shopping cart. The original programmer (who wrote this years ago and is no longer around) has a button that looks up the quantities in the database for the submitted items, and then displays a prompt if you selected a quantity that is less than the minimum purchase amount.The issue is if the user enters a smaller amount than allowed and hits the enter key instead of the "Buy" button, it allows the order.how to use the current code to also check for an Enter key submission.I can handle the PHP and the db lookup for minimum quantities. Here is the page code and the Javascript code.
Code:
<a href="javascript:checkQuantity(document.form<?php echo $formCount; ?>,
<?php echo $row_rsProduct['lotQty']; ?>,
[code]....
Our client has asked that we things up so that the user must fill out
a short form with some basic information if they want to access a
number of PDFs on their website, once per session (please don't ask me
why). Submitting the form sets a session cookie.
Specifically, if the user clicks on "example.pdf," I'd like to have
one of two things happen:
1) If the session cookie is set, the PDF is accessed transparently.
2) If the session cookie is not set, the user is sent to the info
form, and on submission is either (a) passed through to the PDF they
clicked the link for, or (b)at least is sent back to the original page
where the link resides so they can select it again. My initial thought
for the latter case was to have the form open in a new window, then
have a close button on the subsequent confirmation page so the
original page is still open in the background.
I have a page which I have protected using a password page. When the person viewing the site clicks on the link to the protected page, I have placed a script on onload that checks whether a cookie exists. If the cookie doesn't exist then the person is redirected to the password page. If they enter the correct password then the cookie is created using the following code and they are allowed to enter the protected page:
document.cookie="true";
If the cookie exists however, then they are allowed straight into the protected page. This is the code that I use to check whether or not the cookie exists: Code:
If sort this work:
var myarray= new Array(10,16,35,"0.1",8,4,22,19,1,22,35,9,26,38,40);
with code
function function1(a,b)
{return a - b}
var order02=new Array();
order02=myarray.sort(function1);
but instead of 0.1 I use 0,1 (with comma) not work;
Is possible to solve?
Further, in the function for to sort, what is the difference
between this
function function1(a,b)
{return a - b}
and this
function function2(a, b) {
if (a b) { return 1; }
if (a == b) { return 0; }
if (a < b) { return -1; }
}
If I use 0.1 they work good both;
If I use 0,1 (with comma)
they work dissimilar (different result) and both whatever not work.
My girlfriend wrote an electronic form with some Java script code.
However some buttons don't work on IE (like the "submit and "default values" battens).
Could someone please have a quick view and maybe tell me what should be changed?