Disallow Access To A Page If Javascript Is Disabled
Mar 31, 2005I want to redirect my user to an alternate page if javascript is disallowed on their browser. Is there a way to do this ?
View 3 RepliesI want to redirect my user to an alternate page if javascript is disallowed on their browser. Is there a way to do this ?
View 3 RepliesIf I use javascript on my page, how likely is it that the viewer will not have javascript? Anyone have data?
View 30 Replies View RelatedI have a form that uses javascript for validation and cost calculating to place an order.
If someone has their javascript disabled, they will be able to submit the form, but without the cost figures showing up.
I want to prevent the user from submitting the form, but alert them that they need to enable JS to fill in/submit the form?
Is this possible? What do I need?
I am wondering if anybody can provide statistics what is percentage of visitors with disabled JavaScript.
Even more interesting would be statistics of users with disabled JavaScript making a purchase. I am more likely to purchase from my home than from work and I think the disabled JS is mostly result of IT dept. policies.
Is e-commerce site missing much if requires JavaScript?
I want to add this functionality to my table....when page loads I want the <div> tag be disabled...so that all the elements within the <div> be disabled.
But when the user clicks the enableDiv button, the <div> becomes enabled.
How do I do it ? Can we do it using javascript?
I have a table row with <div> surrounded.
I want when page loads , <div> be disabled and when button clicked <div> enabled.
How do I do it ? Can we do it using javascript ?
Can JQuery be used here? how?
Just wondering if anyone knew how to make it so that if someone types an apostrophe in a form's textbox, a popup box appears. The popup box would preferably appear the second that the apostrophe is entered int he form box and then once the popup box is closed, the apostrophe is deleted.
View 2 Replies View RelatedI have a javascript variable containing the return value from a call to showModalDialog(...)
var rval = showModalDialog(...)
I can display the contents of rval using alert or in an iframe, so I know it isn't null, but I want to save it to a mysql database using php.
i want to disallow users to change a text input values . I don't want to use disabled tag of text input because of some problem . I just want to disallow users to enter or change a text input value .
View 4 Replies View RelatedI am looking for a way to troubleshoot css rendering problems. Is there a way to find the calculated styles for any object? I would love to be able to mouse over an element and see all the styles that are causing the element to be where it is, and look the way it does. The elements must "know" this information. Cross browser would be great, but we mainly deal with intranet apps based on IE. Code:
View 1 Replies View Relatedi have this select element
<select name="prods[]" multiple>
</select>
or
<input type="text" name="text[]">
now how do I access it in javascript to get the selected items and whatnot.
How can a script read a text file located on the same server as the javascript source from the script itself?
View 1 Replies View RelatedI'm have a Joomla component who use Jquery for several thing in his template. This component have a form where some field are displayed and I would like conditionnaly restrict the use of 2 fields. I have in fact a field "City" and a field "Zip code" and my goal is to disable one field if the other is filled. In practice that mean if a user start to type the name of a city, the zip field must be disabled for avoid to fill also this field. Same thing if the user start to type in the zip field...the field City must be disabled too..
I need to setup this because the search engine of my component can not retreive correctly data if both field are filled. This happen tipically if the the zip code don't match with the name of the city... I that case the component will display "no result found" and this is annoying. Any example of working code making possible to get this function? Unfortunately I'm not a coder and except html and a bit of css, I do not have enough knowledge..
i have a html/php form which let users upload pictures onto my server. the problem with it is, it says the picture has been uploaded but if the file name contains any of character apart from text (A-z) and numbers, the picture never shows up in the admin panel.
is there a way using ajax or jquery to disallow certain file names in the upload field of the html which uses these characters !@#$%^'&*()"?
how do i go on about this?
I came up with this but it's not working and I'm not exactly sure why.
<script type="text/javascript">
function date_check(){
var trans_date = document.form1.selectmonth.value + "-" + document.form1.selectday.value + "-" + document.form1.selectyear.value;
var d = new Date();
var today = (d.getMonth()+1) + "-" + d.getDate() + "-" + d.getFullYear();
if(new Date(trans_date) < new Date(today)){
window.alert("The shipping date cannot be in the past, please enter a valid shipping date.");
return false; .....
I want to access the features of a plugin without actually embedding
it into a page. Is this possible? Eg
The code to embed the object into a page is:
<OBJECT classid='CLSID:7FA62735-AHC3-14d2-9F81-00114B3245C5
codebase='http://www.test.com/plug.cab#version=3,1' "id='myPlugin'
height=Ɔ' width=Ɔ'>
<EMBED type='application/x-myPlugin' name='myPlugin' hidden='true'
src='in.txt'></EMBED>
</OBJECT>
I could simply add this using document.write, but for various reasons
I dont want to do this.
I would rather do something like:
var plugin = (navigator.mimeTypes &&
navigator.mimeTypes["application/x-Web-Plugin"]) ?
navigator.mimeTypes["application/x-Web-Plugin"].enabledPlugin : 0;
myObj = new object("CLSID:7FA62735-AHC3-14d2-9F81-00114B3245C5");
myObj.pluginMethod
I am running my website using Weblogic, so the path is something like
http://<myip>:<port>/<servername>/
On JSP pages I can use <%=request.getContextPath()%to get the root
path of the site, ie that specified above. How can I get the same using
Javascript?
For example, something like <a href='/home'>..</awill not work as
that would point to http://<myip>:<port>/home and needs to point to
http://<myip>:<port>/<servername>/home
I have a page (page 1), my page 1 has an IFRAME which loads another page (page 2).
My page 2 has a JavaScript object declared on the page: var MyObject = new Object();
I want to access this object from the parent page (page 1).
I tried:
var TempObj = document.getElementById("MyIFrame");
TempObj.document.MyObject.value = "blah blah";
But it said MyObject didn't exist.
Can someone tell me how to access it in this manner?
I was trying to find a browser independent way to raise a modal dialog. I know that MS IE has showModalDialog and Firefox has an attribute modal for window.open but I was wondering if anyone knew of a solution out there that would disallow anyone to browse from a pop-up window without closing it. Disabling the text highlighting and right click are not required, just disabling the user from browsing with the dialog open.
View 4 Replies View RelatedI need to access the CGI Variables or HTTP Headers in a request. Can I do that in JavaScript? Specifically I need to access the CGI variable remote_user.
View 3 Replies View RelatedI've been trying to do this since yesterday with no luck. I've tried stackoverflow, DIC and this is my last chance. I'm using drop down boxes to have a user select a ship date. I don't want them to be able to choose a date in the past however. Below is some code a guy at DIC sent me which doesn't have many changes from my original one but he said it was working and I havent been able to get it working.
<html>
<head>
<script type="text/javascript">
function date_check()
[Code]....
in the body tag, I have this code (just to test):
<script LANGUAGE="javascript">
<!--
function hiThere() {
alert("hi");
return true;
}
//-->
</script>
in the head section, I have this code:
<script LANGUAGE="javascript">
<!--
document.body.onload=hiThere();
//-->
</script>
By the way, I know someone will comment, by "does not work, I mean on
the load of the page, the alert is not displayed, nor are any errors.
Thanks for any help you can offer.
i want to do (multiple) file upload(s) and display a progress bar.
with firefox and safari it is no problem at all. only IE makes some
problems.
my script is based on ajax-uploader, which can be found at
www.srmiles.com/freestuff/ajax_file_uploader/ . you can do multiple
file uploads. each upload will have it's own "form"-tag, so that each
file is uploaded for its own. could be a good solution if there are
"big" uploads.
so here is what i do:
i have a html-page in which several forms with file-input fields are
generated. when i now hit the "one" submit button at the bottom of the
page a javascript function upload() starts it will iterate through all
forms (id='frmUpload_xx'), will get the filename, start a ajax request
for the progress-bar function and do a form.submit().
if the first form/file is uploaded, a settimeout('upload()', 1000); is
called and the next form will be processed. all form's have an
target="uploaddiv", where uploaddiv is a invisible iframe. so the
output of the upload script is put in this div. output should only be
a "OK" at the end. no usefull output no info no nothing.
firefox and safari are working as expected, only IE stops after the
first file is uploaded. i get an javascript error saying "zugriff
verweigert/access denied" on object line x... this is the place where
i call "form.submit()".
this is the upload-function:
function upload() {
if (uploads.length>0) {
form = document.getElementById('frmUpload_'+uploads[0]);
if (form["filename"].value == ""){
alert("Please Choose a file to upload.");
} else {
filename = form["filename"].value;
if (filename.lastIndexOf("")>0) {
filename = filename.substring(filename.lastIndexOf("")
+1,filename.length);
} else if (filename.lastIndexOf("/")>0) {
filename = filename.substring(filename.lastIndexOf("/")
+1,filename.length);
}
makeRequest("upload_progress.php?sid="+sid
+"&filename="+filename,progress);
form.submit();
}
}
}
the strange thing is, that filename is filled correct, that means the
object "form" is found and exisits. the first iteration is working,
only the second ends with an error.
think it have something to do with redirecting the output of the
upload-script in an iframe. after that IE can't access form - at least
IE is not allowed to submit the form as i can access a form field
(filename).
i worked on that the last two days and haven't found a solution...
how i can get the number access in the page?
View 2 Replies View RelatedI'm a WYSIWIG developer who can poke around in the code, modify existing scripts, etc. I need to prevent any user from loading a page twice, so they can only access a prize code one time. Setting a cookie is the first thing that comes to mind, which can be worked around by the motivated useras to other ways to block the user from accessing the page more than once? Something other than Javascript a better choice? Keep in mind my ideal solution is an existing bit of code that I can modify to my needs.
View 3 Replies View Relatedjust needed to know this because I'm setting the path of the cookie and the path on my browser isn't matching what I set it as.
var the_cookie="file_address~"+x+";path=gallerylogin.php";
...it still doesn't set it so "gallerylogin.php" can access it.