Redirecting If JavaScript Is Turned Off
Jul 20, 2005
I have a modest website that uses a lot of Javascript.
If anybody views the site and does not have Javascript enabled I want to
politely redirect them to another page, so I put this bit of code in my
<head> section :
<script type="text/javascript"
language="JavaScript">document.write("<!"+"--")</script>
<meta http-equiv="Refresh" content="0; URL=noscript.html">
<!--//-->
So far so good.
It appears to work, *and* it passes the the 'W3C MarkUp Validation Service'
test ( http://validator.w3.org/ ).
Now the bad news: Google doesn't index my site any more, presumably because
their crawler always gets redirected.
Does anybody have a solution to this dilema, please?
Redirecting to a 'with-script' page is not an option because my page is
linked-to by many other sites.
View 11 Replies
ADVERTISEMENT
Oct 18, 2004
Can anyone point me to statistics on how many people don't have javascript .. or have javascript turned off? I'm about to purchase a template to re-design a site. I know javascript can do some neat things, but I'd like to keep the site accessible to as many as possible .. and easy to maintain (it's a volunteer organization, which may pass the Web design responsibility around from time-to-time).
View 2 Replies
View Related
Jan 31, 2006
I want to redirect all pages from one website to another. They will be permanent redirects, but I am looking for a way to make it look cool.
Is it possible (It does not HAVE to be a 301 redirect) that when someone goes to a page on the old website, they automatically go to the new website with a message explaining the transfer, and everything around the message goes grayscale until the user clicks ok...?
View 2 Replies
View Related
May 3, 2011
I've found a neat little single drop down for a link list. It works fine, but if I turn JS off in my browser the links will not show. I do have a 100 liner that will show links when JS is off, but I'd rather adapt this to do it.
How do you make it so that the list will show regardless of whether JS is on of off. I want the drop if on, which is why I use it.
Code:
<html>
<head>
<title>Drop div</title>
<style type="text/css">
<!--
#ardd{width:180px;}
[Code]...
View 11 Replies
View Related
Jul 20, 2005
The following script raises the subject alarm.
<p><a href="javascript:void();"
onClick="mailto:sgagnon@cyberus.ca?Subject=BRITTANY WORKSHO P">
<img align=left src="britany.gif" width="231" height="40" border=0
alt="BRITTANY WORKSHOP
with Sylvio Gagnon" style="text-indent: .2em;
background:ffffff; color:bb5500;">
</a></p>
View 10 Replies
View Related
Dec 16, 2009
I am trying to make an order form I am working on accessible for users who have javascript turned off in their browser, and to do this I would like to hide a div if JS is disabled.
Searching the Web has led me to think that styling the div to not display is the way forward and then using JS to display it. It is the JS bit I am struggling with! The div in question is a set of radio buttons to allow a purchaser to choose how many gift memberships they want to buy:
<div id="giftmember-buttons" style="display:none";>
<h2 class="threepeaksform">How many gift memberships do you wish to purchase?</h2>
<fieldset class="threepeaksform">
<legend>Please select the number of people you are buying a gift membership for using the buttons below.</legend>
<div class="generalcontactform-group">
[Code]...
View 3 Replies
View Related
Sep 4, 2011
I am a student and new to JavaScript, my problem is I am willing to do JavaScript form validation for emails , text etc. But on one of the forum I found out JS is not a very good way to do validation as JavaScript can be easily turned off by end-user and we shld always do server side validation also, but due to some concerns I want to stick to JavaScript (client side) validation.
My scenario is somewhat like Ive a form and a button in it which on being clicked calls a JavaScript function that will validate the fields and then submit the form through form.submit(); So my question is if JavaScript is turned off on end user then with validation the end user will also be not able to submit the form as the form is being submitted in a JavaScript function (which is turned off)? If this is thn cool.
But is it somehow possible to hack this procedure, and one can skip the JavaScript validation but can still submit the form? My primary concern is not to let pass any malicious or improper data (sql-injections, poorly formatted strings etc. to the server db)
View 2 Replies
View Related
Oct 30, 2011
My page has a form which has some sections that do not show unless needed, but if JS is turned off then these section will never show, so looking for a way to test if it is on or not and if not allow the page to display everything that would normally be hidden unless needed.
View 4 Replies
View Related
Mar 10, 2005
i have a form that has both front end and backend validation (php)
basically i got the code off the net, and it needs the submit button to be of type "button" rather than "submit"
and obviously the form doesn't submit if javascript is turned off
i'm not a javascript expert, on the button it has onClick="formvalidate())"
and in the javascript it has
if form is ok form.submit() or something to that effect
now is it possible to use a submit type so that if javascript is turned off, the form will still submit
but won't submit if javascript is on and the form is invalid
does it have something to do with the onSubmit attribute for the form
currently there is none
because we have the backend validation it doesn't really matter if javascript is turned off but it does matter if the form can't even be submitted at all
View 4 Replies
View Related
Oct 29, 2002
Does any one know of a way to redirect someone with JavaScript disables to another page (or would we need a little JS to accomplish this?)
I'm putting together a site that uses a horizontal javascript drop down navbar, and thought it would be coolness to redirect those that either cannot read js, or have js turned off to my site map page.
View 5 Replies
View Related
Sep 4, 2011
I am a student and new to JavaScript, my problem is I am willing to do JavaScript form validation for emails , text etc.But on one of the forum I found out JS is not a very good way to do validation as JavaScript can be easily turned off by end-user and we shld always do server side validation also, but due to some concerns I want to stick to JavaScript (client side) validation.My scenario is somewhat like Ive a form and a button in it which on being clicked calls a JavaScript function that will validate the fields and then submit the form through form.submit();So my question is if JavaScript is turned off on end user then with validation the end user will also be not able to submit the form as the form is being submitted in a JavaScript function (which is turned off)? If this is thn cool.But is it somehow possible to hack this procedure, and one can skip the JavaScript validation but can still submit the form?
View 1 Replies
View Related
Dec 11, 2009
I'm trying to make my javascript linked "print" button NOT appear in browsers with js disabled? I'm a total js noob. Here's my code:
<a href="javascript:window.print()"><img src="images/PrintButton.png"></a>
View 9 Replies
View Related
Jul 4, 2011
I have a form that only shows the submit (update) buttons if the value select field beside it is changed. But what is someone has JS disabled, how can I enable them?
<select title="3553" name="3553" onchange="JavaScript:document.cart.add3553.disabled=false;">
View 8 Replies
View Related
Nov 29, 2011
I'm learning javascript. The portion I'm learning right now is how to write a short page that alerts the user that their javascript is not enabled. Then , when they enable it, javascript code written into this same page auto-redirects the user to a another page that requires javascript. I run firefox with the noscript add on. I'm learning to write code that first asks the user to enable javascript. When they do, redirect to mypage.html
The code below renders "Please enable javascript" when javascript is turned off - as it should. The autoredirect happens when javascript is turned on - as it should. The problem is the absolute url of the "mypage.html" file in the code is also rendered as a blue link when javascript is off. I don't want that rendering when off. I do use html comment tags as you can see in the code below.
[Code]...
View 15 Replies
View Related
Mar 20, 2006
I receive the following error from the browser, when I want to run the site I developed. Conditional compilation is turned off.
View 6 Replies
View Related
Apr 25, 2011
I am using a checkbox to turn on and off some labels on a line on a google map, which is working fine if the line is already drawn, using this function:
function distboxclick(labelsbox) {
if (labelsbox.checked) {
for (var i=0; i<distmarkers.length; i++) {
if (distmarkers[i].mLabel != null) distmarkers[i].mLabel.show();
}
} else {
[Code]....
but the thing is that I want the labels to be turned off to begin with and switched on if the box is checked.
[Code]...
View 2 Replies
View Related
Jul 23, 2005
What I want to achieve is to display a login screen in a certain size and
appearance window with no toolbars etc.
To achieve this I think I need to use redirection, but I am not sure how or
what is the best way?
The problem I am facing, that the user may get to the login page from
different pages, or simply from typing in the address of the login page.
In order to make the window appear as I like I need to pen a new one...?
View 7 Replies
View Related
Jul 20, 2005
I am new to JavaScript and I have been sifting through the previous
posts about some specific help I need with a redirect problem. No luck
there! Could someone take a look and give me some suggestions. I could
really use some help.
What I am trying to accomplish is the following:
-grab the user bookmarked URL.
-strip some of the URL from the beginning
-pass what's leftover of the URL and append that to a new URL.
-i would then like to call this function in the body tag and pass it to onLoad
<HEAD>
<script>
var domain=window.location.href;
var domain2 = domain.substr(0,29);
document.write("https://hfdev1.test.com/rw"+domain2")
function test() {
document.location.href="https://hfdev1.test.com/rw"+domain2"
}
</script>
</HEAD>
<body onload="test()">
View 6 Replies
View Related
Jul 20, 2005
I need to re-direct site visitors to a new URL, but I don't want that
URL to appear in the Address field in the browser. I'm sure I've read
somewhere that there is a way to do this, but I can't find it. Does
anyone know this, or have I dreamt it?
View 1 Replies
View Related
Jun 23, 2009
I want to redirect some users based on their location. Is it possible to do so using JavaScript?
View 1 Replies
View Related
Aug 10, 2004
Hi I'm trying to hack together a simple login (ish). The idea is to give the impression of a login when all I'm really doing is using the password to redirect a client to their own sub directory.
But I'm now stuck. Here's what I've put together so far. I'm a complete novice at Javascript - but I'm sure you'll see that.
Code:
<body>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function submitentry(){
var password = ''
password = document.login.password.value.toLowerCase()
if (password != null) {
location.href= password + "/index.htm";
}
// End -->
</SCRIPT>
<form name="login">
<strong>Enter username: </strong>
<input type="text" name="username2" size="15">
<br>
<strong>Enter password: </strong>
<input type="password" name="password" size="15">
<input type="button" value="Submit" onClick="submitentry()">
</form>
</body>
View 2 Replies
View Related
Jun 27, 2006
I was wondering is there any way that I can use javascript on a button click that it redirects an iframe that is on that page?
View 1 Replies
View Related
Jul 23, 2005
I'm working on a page that uses javascript very much. My problem is now
that i cannot redirect to another page in IE with window.location =<URL>;
This command gets executed (proofed with alert messages) but nothing
happens. FF acts like expected but i cant get it work in IE. What can be
the problem here?
here the code i use:
this.NodeSelected = function( node ) {
if ( node.Value != null && node.Value != "" ) {
window.location = node.Value;
}
}
View 3 Replies
View Related
May 6, 2010
Why is it that we use bridge pages that say 'If you're not redirected...'.I can see it if you've moved a page and want the user to see the new url before redirecting, but are there other reasons? Does a meta refresh or window not work in some browsers?
View 2 Replies
View Related
Sep 7, 2010
Following is my problem def: Load a HTML page and set the form fields on that page and submit it using javascript. I tried following code: I wrote a html file with following code in it.
<html>
<head>
<title>Test</title>
[code]....
View 1 Replies
View Related
Aug 8, 2011
Page where I'm redirecting user after 5 seconds to another page. This part of the script seems to work fine and redirects to the URL I want. However, the issue comes when I try and add parameters onto the URL. The redirect will stop working. I believe it's a formatting issue, as I've used the code in a different application. [code]...
View 13 Replies
View Related