we are working on one of our site which is having lots of javascript code.but while testing one of our tester has disabled javascript in browser.so in this scenario javascript code is not working properly. So can any one let me know is thr any work around to run javascript code while browser javascript is disabled.
i am having a application in which java script is must. but i am facing problem when at any client browser has java script disabled. i want a code using which i can check the browsers java script enabled/ disabled property so that the user cannot login until he enables javascript.
I am trying to make ONE thing work. The form currently have TWO Textboxes and ONE CustomValidator(connected to the first textbox). I simply want once I enter less than 4 characters in the first Textbox and tab out to the second Textbox and if Javascript is DISABLED then the server side code should stop me. I can achieve what I am trying to do if I use a button but I need to do it in the fashion I am trying decribing because if I have for example 20 textboxes on the form I want the user to see after each data entry that his validation was successful or not. Here is a sample of my code.
I am in the process of developing a feature rich website with vast use of jQuery. My biggest concern is that I will not be able to reach a percentage of my users because they will not have Java Script enabled or will be using a platform that is not compatible with jquery. I know that I can use a simple java redirect from within the html page itself but this does not seem like a decent resolution to the problem as I would rather the script be run on the server side not from within the html page itself.
Is it possible to configure IIS, Apache, or Linux to run a script that redirects specific browsers, platforms, and settings to another html page before the html request is made? It does not seem sensible for the default index.html page to download initially before a second request is made back to the server for the index1.html page.
I need to redirect certain platforms (IE 6 for example), and browsers with java disabled to a separate website that does not have jQuery functionality.
when the link button is disabled the javascript error message comesup just by clicking it.When it is disabled it shouldnt come up not sure why it is coming up.
asp:LinkButton ID="DeleteCategoryLink" CssClass="link" CausesValidation="false" runat="server" Text="Delete" OnClientClick="javascript:return confirm('Are you sure you want to do this?');" />
I'm using some of the typical ASP.NET's Validation Controls in my website. Now I'm trying to disable the JavaScript in my browser to test my application and of course the Validation Controls no longer works. I think it's best to try to make them work using one of the solutions down here instead of reinvesting the wheel and build a validation layer for the page or my objects -Am I thinking right?-
What do you think of these options and why:
Include in clicked button's event a code to check if the page is valid and if not explicitly call the Page.Validate(); method Check if whether the JavaScript is enabled and if not I should call Page.Validate();
n a page with textbox control, lets say this textbox is disabled on server side page load.What would happen if a javascript tries to set visibility of the textbox to false ?dit:Can the textbox be hidden by javascript even though it's disabled ?
I wanna to change the color of any disabled control to black like in enabled one because of special case, i tried many solutions like make the textbox read only but (i donot want this solution because of some reason of this case) , i use Css file , every thing is changed except the color of the text how to change the color to be more clear .
What should i do if the javascript was disabled on the client browser ?
Should I call the server side ? and how could i do such a thing if it is possible ?
I have a web page, and I am using JQuery ajax, and I'm calling the server side using the webMethod attribute, so what should i do if the client browser disable Javascript ....
I have asp.net form having 4 check boxes. not check box list. these 4 check boxes having the ValidationGroup property with same name say "chkValied". I have added Custom Validator there. now want to check at least on check box should be check out of these.
I have two radio buttons that are disabled with javascript when the page loads. RadioButton1 is checked by default. When I click the button to do a postback, the RadioButton1 is no longer checked.
I'm using the code the above and running into an error i can't quite figure out. Maybe its something simple or maybe it's something that can't be done. Not sure.
I created a user control (button) that references a javascript file like this:
string url = ResolveClientUrl("./Scripts/main.js"); function SubmitButton_Click(e) { try { var src = typeof (event) != 'undefined' ? event.srcElement : e.target;
[Code]....
The error that i am running into is this:
The buttons in the update panel work everytime without any problems. When i click a button in the update panel and then click a button outside the update panel it chockes on this line of the above javascript.
src.aspnet_onclick();
The value of aspnet_click() is 'SubmitButton_Click(e)'. This is incorrect which causes it to choke.
The value should be 'onclick(event)'
For some reason when click the button inside the update panel and then the button outside the update panel causes this javascript error but I am not sure why the aspnet_onclick() is incorrect.
I posted the question below, and then discovered that the code I posted does work, if the button is not in the GridView header. In fact, I can't seem to make the button in the header do anything.As long as I can trigger the sort, I can make this work somehow, but ideally, I'd like the mechanism to be in the headers.Any ideas on why that button isn't working? Original message:I've got a GridView bound to a SQLDataSource, and have sorting enabled. This works great, but some of my users will have JavaScript disabled, and the page has to have the same functionality for them.
I've looked into sorting a GridView without JavaScript, but all the solutions I've found assume that I'm NOT binding to SQLDataSource - because of course, If I were, I'd just enable sorting. So I wind up back where I started.Is there a way for me to enable sorting for both regular and non-JavaScript users? I know one option is to install buttons instead of the header links, which would be fine, but I have no idea what my code should look like. I took a wild guess and tried:
[Code]....
...where "ColumnA" is the sort expression. I know I'd have to check the current sort direction for the Gridview and reset it - I just wanted to see if this would work at all, and it didn't seem to do anything. I also have both CausesValidation and UseSubmitBehavior set to False, since I just want to sort.
This code works fine if i use this inside ssercontrol > panel and i have a checkboxes in table when no checkbox is checked its works fine .... but if i disabled and checked any of the textbox then this doesn't work .... in usercontrol why ? i didnt understand ..
<script type="text/javascript" language="javascript"> function checkboxChecked(){ var allInputs = document.getElementsByTagName("input"); for(var i=0; i<allInputs.length; i++) { var chk = allInputs[i]; if(chk.type == "checkbox" && !chk.disabled && chk.checked) {
return true; } } alert("OOps! You haven't selected all available checkboxes"); return false; } </script>
The reason i need to do this is because of Facebook Connect - which is another story, so i'll save you the drama for that. =) Anyway, i have this function that runs on window.onload:
function userAuth() { SomeFunctionWhichGetsFacebookCookes(); if (!loggedInUsingFormsAuth && loggedInViaFacebook) { window.location.reload(); // refresh page, so i can perform auto-login } }
So, i need help in getting the flag "loggedInUsingFormsAuth". I dont care what is in the cookie, just need to know if the current user is authenticated. Why am i doing this? Well, on window load, if the user is logged into Facebook but not on my website (according to the Forms Authentication cookie), i want to reload the page - which allows my ASP.NET website to read the Facebook cookies in the HttpContext and log the user in. I need to do this in JavaScript, because i dont have the Facebook cookies until i call "SomeFunctionWhichGetsFacebookCookies" - which can only be done in JavaScript.
So, how can i work out if the current user is authenticated via JavaScript? Do i have to manually traverse through the cookies, find the one i want, and inspect it? Is this a safe thing to do? Or should i alternatively write out the flag to the client from the server using RegisterClientScript?
Is it possible of using javascript to check data in SQL server?User inputs a order ID into a text box, I need to code to see if ID is in SQLserver before submit.