I would like to allow a user to browse his local directories, choose an
image (probably .jpeg) file, and upload it to the server (a servlet). The
same functionality that online datiing agencies use to let people save their
photograph with their profiles. (My application is an online Want Ads.)
I feel that this must be possible within a minimal client (without a JVM)
using nothing more than JavaScript, but I'll be damned if I can find how.
Would one of you more experienced JavaScript people please point me in the
right direction.
I am creating a basic page for a client to allow them to update photo captions on their own. The test page is here: [url]
There are only 4 photos right now for testing, but eventually there will be 100's. The issue I'm having is that only the first image caption is being updated. If I edit the caption for photo #4 and click update, it appears to update, but it actually doesn't. Further testing shows if I change the caption for #1 and click submit on ANY other caption, it updates #1. This makes me think that the jQuery code is only referencing the first form.
I know I could use ID's on the forms and in the jQuery to differentiate the forms, however the form HTML code is generated with PHP and there will be 100's of them. Is there any way for jQuery to determine which form was submitted? I need to be able to tell which form was submitted so I can use that form's caption text to update the photo caption via SQL (photo info stored in an SQL database).
Here's the code from the page. The forms are generated via PHP:
Anyone have a link or search term for a way to allow the user to upload a list of file names to a web form? I do not need the actual files, just the file names -- name only or full path, doesn't matter. I can live with either just pointing to a directory and grabbing every file name in it, or requiring the user to select all the desired files from within a directory list. (My guess is that the JavaScript sandbox for a web form won't allow this, but I figured I'd check with you experts before looking into other possibilities, e.g. Java applet, etc.) I'm already using the JQuery library for some other stuff, in case there's something I should be looking for there or one of its plug-ins.
Piece of simple javascript that I can't get to behave. It's a basic image/slideshow..... in the <head> section..... <script type="text/javascript"> var image1=new image() image1.src="../Images/WebSite/HomePage/HpLavender.jpg"; var image2=new image() image2.src="../Images/WebSite/HomePage/HpCreams.jpg"; var image3=new image() image3.src="../Images/WebSite/HomePage/HpBathMelts.jpg"; var image4=new image() image4.src="../Images/WebSite/HomePage/HpCandles.jpg"; var image5=new image() image5.src="../Images/WebSite/HomePage/HpMostlyMen.jpg"; </script>
And then in the body: <img src="../Images/WebSite/HomePage/HpLavender.jpg" name="slide" border="0" alt=""> <script type = "text/javascript"> var step=1; function slideit() { if (!document.images) {return} document.images.slide.src=eval("image"+step+".src");
if (step<5) {step++} else {step=1} setTimeout("slideit()",2500); }slideit(); </script>
The coding seems to be tripping up on the line: document.images.slide.src=eval("image"+step+".src"); (I inserted document.write statements before and after this line and only received the 'before' statement).
The image before the javascript kicks in <img src="../Images/WebSite/HomePage/HpLavender.jpg" name="slide" border="0" alt=""> displays fine - and the images listed in the header are correctly named.
I'm using the editor CKEditor [URL] for my forum that I developed. When I create a new topic in my forum is so good, now when I see the issue that the images you upload do not see and I look at Funt code looks like this:
I have this script below that will allow a user to upload multiple images. I need to have it add another text box each time it adds a new upload box. The new text box will be for the user to add a tag or description of the image.How do I add a new text box and retrieve the text they enter with each image?
<!-----function AddMoreImages() { if (!document.getElementById && !document.createElement) return false;[code]......
I have an application, which has to change to different images based on some conditions. I am trying to call a javascript function(this function changes the images on the front end) from the ASP script. I want to preload all the images to the client side browser and point to a different image source through the javascript.
I'm trying to create a calendar application that users can upload pictures and then put them on a calendar. I'd like to display all of the images and then drag them from one pane to the calendar. I'd like it to be something similar to the following link:
I have a site which requires the user to upload multiple images at once. Using jQuery I have set it up so that the user can select individuals individually (using the file browser) and then upload them all at the same time bty clicking 'Upload'. However, this is not really good enough...
What I need to happen is that when the user browses their machine to select their images, they are able to select multiple images through CTRL+click. At the minute they can only select one image at a time. How can this be achieved?
As I already have the upload process working perfectly, I would prefer that I was able to keep this intact and simply add some javascript which allowed multiple images to be selected by the file browser at the same time. I would also prefer, if possible, not to use flash.
I am working on a form inside my administration console to upload images with PHP. In my form I have the following:
[Code]...
The onchange submits the form to a seperate PHP file (sent in the action of the form) dedicated to handling the uploading of the images, while the submit button(not shown in code) will submit the rest of the form through ajax. In order to use 1 file field, Ive read that to get an ajax looking effect I need to use an iframe, so I added the IFrame into the HTML and got the effect working right (without actually uploading the files.)
Now I want to limit the ammount of images to 8. Which is where the hidden field came in. So i've got to figure out a way to count the successful uploads, or add them as we go. At which time that number turns to 8, the script will disable the file field from anymore uploads. Problem is I have no clue where I need to go within my php file to make this happen. Here is my php file with javascript added in:
Code: <?php // lets go ahead and get this image uploaded ?> <script language="JavaScript" type="text/javascript"> var parDoc = window.parent.document; var upldcnt = parDoc.getElementByID('upload_cnt').value; [Code]....
I have a site which requires the user to upload multiple images at once. Using jQuery I have set it up so that the user can select individuals individually (using the file browser) and then upload them all at the same time bty clicking 'Upload'. However, this is not really good enough...
What I need to happen is that when the user browses their machine to select their images, they are able to select multiple images through CTRL+click. At the minute they can only select one image at a time.
As I already have the upload process working perfectly, I would prefer that I was able to keep this intact and simply add some javascript which allowed multiple images to be selected by the file browser at the same time. I would also prefer, if possible, not to use flash.
Does anyone know where I can find a client-side function I can reference from within an HTML/JavaScript web page? I'm currently using a core PHP function to do this, but I'd rather do it on the client-side and not have to upload the large raw image to the server.
I am looking for a upload form to upload pictures and then when the pictures are uploaded, then they get emailed to me. Kind of like a contact form but attached is the pictures.
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+"; }
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.
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).