A client of mine is trying to integrate one of his Web systems with my system. In an essence, he wants to embed my system's web UI into his "master" web page, and display it in a sub-frame whenever a user requests my system display.My system (JBoss AS) has Basic Authentication enabled. So if a user attempts to access my system he/she is prompted to provide username/password. If correct credentials are provided, then user is allowed access to my system / web pages.Now, the client is trying to automate the login. He wants to provide the login information automatically, through JavaScript in his master page (this is needed so that users of his system don't provide any credentials - all user/pwd information is passed under the curtains).What is wrong in the approach above and do you know if there is a better way to properly implement this seamless logging (knowing that Basic Authentication is the only option)?
I'm using XHR to make some REST requests. Right now I need to handle HTTP 401 responses.When a resource is requested such as a Javascript file or CSS file the browser will popup a prompt for username and password, which is normal behaviour.When I make an XHR request for POST,GET or PUT I get an XHR response which includes a status of 401 and no popup from the browser, this is also normal.The problem is when I make a DELETE request, I get the expected XHR response AND also the browser still pops up the username and password prompt.
Here is a little program I wrote that allows you to enter in overtime shifts (Or any kind thing people might sign up for) and then allows people to sign-up for them in real time. Once they are signed up the data can be easily documented in any schedule management system. This is all clientside, so it's far from secure, but with proper folder permissions set, will run quite niceley on a shared network drive. Attached here are the HTML files. In the second post are the databases. Extract to the desktop. The default path for the databases and tracking folders is the desktop, this can be altered in the js file and they can be moved wherever you like. It has the ability to work for multiple groups and differet shift types. Could be a bit more dynamic in the set-up process, maybe if I ever convert it to a server side language I'll walk that path.
I am trying to write a javascript that once a link is pressed, a popup opens and a series of websites, with 2 changing parameters (from arrays), are loaded in series (after a time delay, or if possible once the page has loaded). I have managed to get a working script together, but I can't seem to make it load within the same window, instead of loading several pages after each other. So what I am asking really is, how do I ensure it loads within the same popup window? and If possible, how can I improve the code so that it only "pauses" until the page is loaded instead of just waiting 10 seconds?
Code: <script type="text/javascript"> function makeCrankWindow(url){ crankWind = window.open(url,"Cwindow"); if (window.focus) {newwindow.focus()} return false; }function Crankwindow(){ var wid = []; //Titan Id Array wid[0] = "53"; wid[1] = "57"; wid[2] = "194"; wid[3] = "196"; wid[4] = "242"; wid[5] = "286"; var sid = []; // Facebook Id Array sid[0] ="5089"; // NAME HERE var timeout = 0; for (var i=0; i<2; i++){ for (var j=0; j<6; j++){ setTimeout('makeCrankWindow("[URL] source=190&sourceu=' + sid[i] + '&wid=' + wid[j] + '","Cwindow")', timeout); timeout += 10000; }}} </script>
js and GM but I am trying to make a script that will click a button on a page where there are multiple instances of the button.The source I am looking at is below and I have narrowed down what I am looking at to the bold section.
I have been trying to find some kind of authentication method or script (PHP/perl/javascript or other) to achieve the following, with no luck.
Say there are 100 files at a site. A person can choose which file to download from a list, and to do so has to enter a code or password. When a valid code or password is used they are redirected to a page with a direct link to download the file.
Once that code or password has been used to download that one file (and the same code/password can be used to access any one of the 100 files), it is then expired/deleted/made invalid and can't be used again to download any other file.
I am building a form where registered users will put their employment histories. Each employment history will need to be associated with an employer ID, which is in my database. Instead of having tons of page reloads as users enter each employer in their histories, I figured I'd use Ajax to do it much more quickly.
Then I realized that I wasn't sure if Ajax sent the user's cookie to the server and if it didn't, then I wouldn't be able to tell what the person's authentication status is, what they have access to (only their own records), etc.
So I would like to know if Ajax sends cookies to the server. And if not, is it possible to send the cookie to the server with the Ajax request so I can ensure that people are adding and deleting from their own profiles only?
When i try to request something from the HTTP server, the http server throws a authentication dialog box, where i need to enter the username and password.
My problem is I don't see the dialog box coming in, the moment i request the page....sometimes it comes ....sometimes it doesnt......and when i click on the refresh button repeatedly .... it comes after may be 5-6 tries.... one the server side i see the following with every request.
A bit of a lame request - I just don't have a lot of time to look it up. I need a script to login to a website (outside my domain) and then make a very simple web request. How do I go about doing that?
I am sending a url request to the network using jquery.get(). The problem I am facing is that the server is having an http authentication, so when i pass the request url directly on the browser, it will show the authentication window and i can pass the username and password, but what to do when i am passing the same request using get() method.
This is what i am using currently
Anybody knows a work around for this problem, which can be used for every browser. the current error code is 401..
I have to come up with a user authenication page the logs the user in and also gives them access to do the right things. I have attached the code and the access file and have got started on a few things.I first need to create a login page with the fields username and password have that check the access database and then proceed it to a page to do the following depending on the user access. For The Login button to even be enabled the username and password must have a value in it. I have no idea how to do that
Add A User [No duplicate Users] Modify A User Delete A User
Ive got a really simple problem but I can't figure it out. I've got a form named bob with one text box name bobtext with a default value of "http://". When I add onload="document.bob.bobtext.focus()" it focuses on the text box, but at the beginning. Is it possible to focus on the text box, but at the end of "http://"? This seems like something easy so I'm probably making some stupid mistake.
Suppose I have a page, call in parent.html . Inside, there is an iframe, call it child.html . I want it so that in response to a keyboard event in either parent or child, child.html will respond in a particular way.
Do I need to use a different set of code for each html page, or can I reuse the same code?
If the code is different, what are the fundamental differences in code?
How do I make one frame respond to events in a different frame as a general rule?
#display { text-align:right; } </style> <script type="text/javascript"> var find=document.getElementById; var temp=0; var total=0; var which=0; var m=0;
function Mplus() { m=parseFloat(find('display').value) + m; find('memory1').value="M+*"; }
function Mclear() { m=0; find('memory1').value="M+"; }
Does anyone know of a basic Javascript Rich Text Editor that dosen't have too many features. I don't want smily faces or the ability to insert images, only the basic text formatting. All the ones i found on google are packed full of extras i don't need.
im need to create s simple CMS/WYSIWYG, but im not a pro on js. I found one on a website, but i dont want to resort to stealing codes.
basically, theres a textarea, where you put in text, and a button for bold, italics and underline, etc. if i highlight something on the textarea and hit the bold button, the text automatically gets surrounded by the <b></b> tags, or or whatevers convinient. when i look at the inline js code from the button, it calls a function, but id rather simplify the code, it should be something like onclick=insertstyle("b","textarea_name");
I have the source code to an old BASIC program that a friend of mine would like to run online. I am a beginner at JS, but I think that it would be a good choice for the project. My background is in C/C++ and web development.
Any suggestions that might get me off to a good start here? I can provide more information if needed, but I am not sure what would be helpful. The program is 550 lines in what appears to be BASIC and is a calendar conversion program. You give it a date and it will convert it into one of many other date reckoning systems (Gregorian, Hebrew, Egyptian, etc, etc).
I have a <FORM> with several text based input controls in it, and for some reason, although I have assigned ID values to these control, when I attempt to run any JavaScript error checking on them I get JS Error messages for some reason.
To simplify where I have gone wrong, I have written a simple JS alert message as follows...
I've been looking at all the various image replacement techniques..and they all seem unnecessarily complicated. I came up with:
function replaceLogo() { document.getElementById('header').innerHTML = '<img src="/images/logo-tci.gif" />' } It's just replacing the layer contents at a very basic level.
This works just fine, I'm just wondering how well supported it would be across different browsers. Anyone know of a table of browsers that support innerHTML or see potential cross-browser issues with this technique?
We have some date fields in our HTML forms in various places. In the accounts package we use, there is some pretty nifty date handling.
It has a standardised date format of dd/mm/yyyy and if you enter e.g.
3-12 it will switch it to 3/12/2005
Same applies for e.g. 3:12 etc
Anyone know of some javascript which will do this for our HTML form fields? Our target format is actually dd-mon-yyyy and it would make it really nice for users if the system could accept a variety of input formats and then switch it to a date to our specification. Any suggestions?
I have few textfields and dropdowns in my jsp, form is submitted on clicking an image link.
In case there is an error for instance some text field is left empty, then message is displayed below respective fields ( using spans, inner html). The message is displayed onblur event of the field. So if there was an error then message is displayed, now if the user corrects the error and clicks the link then first the message disaapears ,which is desired ,but he has to click again to submit the form. please suggest a way to handle this. So that user doesn't have to click the link twice to submit the form.I tried having onmousedown and onfocus events on image , but then sometimes the form was submitted twice which gave backend errors.