I want to show a process dialogue to the client till my process completes on the server. As long as my process dialogue appears, client should not be able to edit the page (or page become inactive); How to do this?
My login to the site is being processed using ajax, which does a redirect to the members page upon succesfull loggin in.The login feature however can in fact take a while because we need to initialise quite some data when a user logs in (his details, but also his privileges are loaded, his personal menu based on these privileges are being loaded, we are loading shopping cart info, we are initialising personalisation settings, and a whole lot more.It sounds like a big thing, but it isn't, and once logged in, the application is going great. the only thing is that the login proceure can take 3 - 4 seconds, and I would like to be able to show the client the progress of the serverside script:
"Searching your account..." "Validating your privileges" "Initialising your personal menu" blablabla...
To do this, I might just call an ajax call that starts the login procedure, and then issue another ajax call every 1 second or so to update the status based on some session variables I set in the login procedure and that I can serve to the client when th next ajax calls come in, but I would love for this to work a little nicer as in just needing to initialise ONE ajax call which can send back statusupdates from the server...
My aim: To click on a link (or what looks like a link to the user), and rather than the file linked to opening in the browser or what ever, the save dialogue comes up so they can download it instead.
I would like this to work with images - "click on the thumbnail to download a larger picture" - kind of thing. JPGs specifically.
Can anyone help? I'm sure it's possible in java script, I just can't find it anywhere. I've found a few ASP scraps but nothing concrete.
I would like to present the user with a confirmation dialogue box when they click the delete button on my webpage The button is not part of a form but instead is a buttton graphic with the following code:
Code: <td><a href='viewMyListings.php?cmd=delete&listingType=1&accommodationId=$accommodationId' title='Edit listing'><img src='../images/adminDeleteListingBtn.gif' alt='Delete listing'></a></td> Can anyone show me how this can be done? I am assuming javascript is the best solution for this?
I have a webform that creates a word document as it's ouput (yes I know it only works on IE). function createWordDoc(){ Doctxt = "some text here" var w=new ActiveXObject("Word.Application"); w.Visible=true; w.Documents.Add(); w.Selection.Font.Name="Times New Roman"; w.Selection.ParagraphFormat.Alignment = 1; w.Selection.TypeText(Doctxt); w.Documents.Save(); }
My issue is with saving the file. At the moment, in the above code, it opens the save dialogue box, and populates the filename field with the first line of text in the document. What I want to be able to do is populate the filename field with a variable filename created by the function. I've tried the snippet below, which works with the dynamic filename, but it autosaves the file to "My Documents" folder without prompting. I need to be able to allow the location to be changed. var FileName = "Myfile.doc" w.ActiveDocument.SaveAs(FileName);
I have two prompt dialogue boxes that ask the user the enter their name and their employee number.I am experiencing two errors. The first is, if a user enters their name incorrectly, using numbers for example, there is an error message that asks the user to re-enter their name using a string. If the user ignores the error message and enters a number a second time, the program accepts the entry, which it shouldn't.
The second error has to do with the employee number prompt. The prompt asks the user to enter an employee number that is equal to 6 digits, the program however accepts any number, less than or greater than 6 digits, which it shouldn't.I don't want the user to get away with entering anything incorrectly.
<script type="text/javascript"> // prompt the employer the enter the employee name and number var employName = prompt ("Please enter the employees' name" , " ");[code].....
Way back in the day I did some old school HTML....but after many years not touching a web page I've kind of been thrown straight into the fire with some "wish list" items I'm trying to figure out. I've done plenty of searches and somewhat have an understanding of some of the basics of what I need to do...but I'm not the least bit comfortable with Javascript (I'm just assuming that this the language most applicable to what I'm looking for - and after the experience of my one day crash course with PHP I knew I needed to turn to some experts.
Okay I have a rather large web (about 150 pages) of historical transcriptions created with XHTML (with PHP headers and footers embedded). Generally speaking, I don't much like web pages that have right-click disabled and various other protections in place.....but I'm also the sort to obsessively cite my source material and give proper credits....as a researcher who's hard work has been plagiarized and passed off as the fruits of someone else's labor, I wholly understand why many are inclined to put such walls up.
I have a form, and that has many fields, upon submit, it utilizes AJAX (PHP script) to store the data in the database and if the readyState is 4, (as a result of the PHP process) it shows the results on the same screen.
Now, I want to put a CONFIRMATION box, in the process, like I want the script to take input, and once the user hit submit, the php process begins, and if there is a duplicate entry it will show the message to the user like:
"Record exist" [Overwrite] [Make New] [Cancel]
the next, AJAX will continue based on the user input.
how to do this ? Should I have to make 2 Ajax Calls ? one to check for Duplicate and then one to get the input and process further ?
FYI, I am using jQuery 1.2.3, and the latest version of the jQuery Form plugin from URL...I am able to run the ColdFusion page on the server side to get the data, and Firebug is showing that I'm getting a response...but I'm unable to populate the JSON data into selected form fields on the page.I have two HTML forms; one for the user to input his/her ID number if available, and a longer form to collect more demographic info.Why is it not working? My forehead is getting bloody from banging it against this wall.
I have a four part process to add something to my website. I'd like to have a bar at the top of my page (if you need an example, something simliar to FedEx to show where you package is along the way) that will get updated upon each page move so the user knows how far along they are in the process and how much farther they have to go?
In IE6, putting the mouse on each of the two items highlights the word in a blue (different image) and shows a tool tip. In Firefox(1.5.0.6), nothing shows when mouse goes over it. Please view the source of that simple page (with some JavaScript) to see if you know how I can get this to look in Firefox like it does in IE?
I have a form with a textarea that can hold a lot of values. When submitted, a php-script takes over and processes the textarea line by line. When a lot of values is submitted, it can be time-consuming for the php-script, causing the webserver to timeout.
I would like jquery/ajax to send one or a few lines of the textarea to the php-script at a time, hence feeding the php-script with a lot of smaller requests instead of one massive one. Kind of like an upload form with a progress bar, but for textarea values instead of file submition.
I have looked around and failed to find any examples or tutorials on this, and since I'm not very experienced in javascript I would really need it.
So again, the javascript would check the textarea-field when user submits the form, and send one or five values from the field at a time to a remote php-script. In the meantime the user can be presented with a "loading..."-image or a progress bar.
Have a form with a couple of lines of dates (date1, date2, date3, etc.) Each date-field gets filled by 3 drop-downs (day1/mnth1/yr1, day2/mnth2/yr2, etc.) My question is, can I now do this?
//javascript function DatumZetten(id) { var day = this.document.form.day[id].value; var month = this.document.form.mnth[id].value; var year = this.document.form.yr[id].value; this.document.form.Datum[id].value = '' + year + '-' + month + '-' + day + '' }
I am a newbee to JavaScript was was just fiddling around with events for a browser... Is it possible to detect the browser process termination done through the Task Manager in windows. Process:
1. Goto Task Manager 2. Right click on the browser process e.g. iexplorer.exe 3. Select "end process" to terminate the process
JavaScript can detect the window close by using body onunload event. On the similar bases, is it possible to detect the process termination event using JavaScript?? I tried a simple example using body onunload, but it failed to run the onunload event during the browser process termination. And i am of the opinion that this is not possible as all using JavaScript since terminating a process is a system / OS level task and is not related to browser events.
Based on a simple AJAX way, I can run a php process and return the result by this line Code: xmlhttp.open("GET","getuser.php?q="+str,true); There is another method using jQuery (e.g. in [URL]). But here, it shows a predefined message in these lines
Code: //hide the form $('.form').fadeOut('slow'); //show the success message $('.done').fadeIn('slow'
How I can return the output of the php script within AJAX instead of this message?
I am currently using change and keyup to trigger a div loading process according to the select box. This works fine, when only mouse is used on the box. However, when the selection is made using arrow keys, this is what happens: Target div gets loaded fine, but when I click anywhere on the freshly loaded div content, it blinks. My guess is that change event is triggered after keyup, when it is not needed anymore. Is there an event or combination of events that detect selection change with both keys and mouse? Here's my simplified code:
Can I do the following without my program crashing? [code]...
I have created an application that does something similar to the code I just posted. However, my program crashes intermittently. Sometimes it will crash after calling jQuery.get() a few times (with several http requests still pending). Other times it will get through all of them just fine.
I want to know if Ajax can handle that many asynchronous requests without crashing? Can someone look at this to see if there is something I am missing?
Create a webpage with a search bar, which leads to a page with two drop boxes. This search bar searches in the database (SQL) and shows a limit range of 10 results matching the input in the above dropbox, it can than be dragged down to the other box, as to select it. This I've been able to do, with a javascript I found on the internet and slightly modified in order to make the dropboxes. Now however I cannot workout the final step, I need to get the data (meaning the entry ID's of the selected database items) in a string or so in orde to process them to a new SQL query.