How Can I Upload Images From A Basic Client?

Jul 23, 2005

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.

View 5 Replies


ADVERTISEMENT

JQuery :: Creating Basic Page For A Client To Allow Them To Update Photo Captions On Their Own

Jul 8, 2011

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:

View 2 Replies View Related

Upload List Of Files From Client Directory

Sep 9, 2010

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.

View 8 Replies View Related

Basic Slideshow - Images Listed In Header Correctly Named

Aug 3, 2011

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.

View 2 Replies View Related

Editor CKEditor - Don't See Images Upload

Mar 30, 2011

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:

<img alt="" src="http://tecnolatino.com/wp-content/uploads/2010/08/comprar-una-c%C3%A1mara-digital.jpg" style="width: 547px; height: 320px;" />

View 3 Replies View Related

Allow A User To Upload Multiple Images?

Mar 18, 2011

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]......

View 3 Replies View Related

Pre-loading Images On The Client Browser

Sep 30, 2005

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.

View 5 Replies View Related

JQuery :: Show A Progress Bar When Upload Images With Ajaxsubmit?

Feb 2, 2011

Is it possible to show a progress bar when upload images with ajaxsubmit .

ex:

$('#alteraimgs').submit(function(){
$('#alteraimgs').ajaxSubmit({
target: "#Foto" + <%=request("img")%>,
url: "aspx/uploadresizealtera.aspx"

[code]....

View 1 Replies View Related

Drag And Drop Images - Upload Pictures And Then Put Them On A Calendar

Jan 22, 2011

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:

[Code]....

View 19 Replies View Related

Image Uploader - User To Upload Multiple Images At Once

Mar 20, 2010

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.

View 1 Replies View Related

Jquery :: Html5 - Upload Images Or Videos Through Drag And Drop

May 4, 2011

I want to know how to Upload images or videos through drag and drop (jquery or html5 tools)

View 1 Replies View Related

Make Script From Which Visitor Can Post / Upload Their Images With Description?

Oct 9, 2011

I want to know can i make a script from which visitor can post/upload their images with description ?

View 5 Replies View Related

Child(iframe) / Parent Form - Administration Console To Upload Images With PHP

Jul 14, 2010

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]....

View 1 Replies View Related

Image Uploader - User To Upload Multiple Images At Once - Select Individuals Individually - Using The File Browser

Mar 20, 2010

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.

View 1 Replies View Related

Client-side Function To Resize ".jpg" Images

Jul 23, 2005

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.

View 9 Replies View Related

Correct Method For Passing Named Values From A Client Back To The Next Client Screen ?

Nov 22, 2010

What is the correct method for passing named values from a client back to the next client screen without sticking the info as an url query string?

View 3 Replies View Related

JQuery :: Avoiding Repetitive Code - Upload Form To Apear - And Any Other Upload Forms To Disapear

Apr 29, 2010

I have following code, that i am sure can be done in 1 single function, which will ease extending it in future.

Basically when a link is clicked, i wante the upload form to apear....and any other upload forms to disapear.

How can i put those 3 functions in 1?

View 1 Replies View Related

JQuery :: Upload Form To Upload Pictures And Then When The Pictures Are Uploaded?

Sep 1, 2010

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.

View 1 Replies View Related

Basic Focus()

Apr 5, 2006

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.

View 1 Replies View Related

Basic I-Frames

Jul 20, 2005

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?

View 2 Replies View Related

Basic Calculator

Dec 6, 2003

I know there is a million of them but here's a little calculator script I made just for kicks. Feedback is always appreciated, good or bad.

I think I did a pretty good job of mirroring the windows calculator functionality.

Basic keys are mapped (optionally) to the keyboard.


<html>
<head>
<title>Web Calculator</title>
<style type="text/css">
table
{
text-align:center;
background-color:#e5e5c5;
}

.button
{
width:55px;
font-weight:bold;
background-color:lightblue;
color:#333399;
}

.functbut
{
width:55px;
font-weight:bold;
background-color:lightblue;
color:red;
}

.back
{
width:115px;
font-weight:bold;
background-color:lightblue;
color:red;
}

.header
{
color:#333399;
}

#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+";
}

function Mrecall()
{
find('display').value=m;
}

function Mreplace()
{
m=find('display').value;
}

function showMe(num)
{
if(temp==0)
{
find('display').value=num;
temp=1;
}
else
{
find('display').value+=num;
}
}

function calcEm(num)
{
str=parseFloat(find('display').value);
if(which==0)
{
total=find('display').value;
temp=0;
which=num;
}
else if(which==1)
{
find('display').value=parseFloat(total)+ str;
total=find('display').value;
which=num;
temp=0;
}
else if(which==2)
{
find('display').value=parseFloat(total) * str;
total=find('display').value;
which=num;
temp=0;
}
else if(which==3)
{
find('display').value=parseFloat(total) / str;
total=find('display').value;
which=num;
temp=0;
}
else if(which==4)
{
find('display').value=parseFloat(total) - str;
total=find('display').value;
which=num;
temp=0;
}

}

function clearAll()
{
find('display').value=0;
which=0;
temp=0;
total=0;
}

function clearDisplay()
{
find('display').value="0"
temp=0;
}

function fractIt()
{
find('display').value=(1) / str;
}

function getPerc()
{
var d=find('display').value=str / 100;
calcEm(0);
}

function backSpace()
{
find('display').value=find('display').value.substring("0",find('display').value.length-1);
}

function getRoot()
{
find('display').value=Math.sqrt(find('display').value);
}

function invertIt()
{
var w=find('display').value.indexOf("-");
if(w==-1)
{
find('display').value="-" + find('display').value
}
else
{
find('display').value=find('display').value.substring("1",find('display').value.length);
}
}



function keyHandler()
{
keys=new Array();
keys[97]=("1");
keys[98]=("2");
keys[99]=("3");
keys[100]=("4");
keys[101]=("5");
keys[102]=("6");
keys[103]=("7");
keys[104]=("8");
keys[105]=("9");
keys[96]=("0");
keys[13]=("equal");
keys[107]=("plus");
keys[110]=("dot");
keys[109]=("minus");
keys[106]=("times");
keys[111]=("divide");
keys[110]=("dot");
keys[8]=("back");
keys[27]=("clear");

kc=window.event.keyCode;

if(keys[kc]!=undefined)
{
cColor('#333399');
setTimeout('cColor("lightblue")',100);
find(keys[kc]).click();
}
return false;
}
function cColor(bcolor)
{
find(keys[kc]).style.background=bcolor;
}

function keyOnOff()
{
var b=find('keychoice').checked
if(b==true)
{
document.onkeydown=keyHandler;
}
else
{
document.onkeydown="";
}
}
function checkHandler()
{
var e=find('keychoice').checked
if(e==false)
{
e=true;
}
else
{
e=false;
}
keyOnOff();
}

</script>
</head>
<body>
<table cellspacing="0" border="1">
<thead>
<th colspan="6" class="header">Web Calculator</th>
</thead>
<tr>
<td colspan="6"><input type="text" size="43" id="display" value="0."></td>
</tr>
<tr>
<td colspan="2"><input type="button" value="Backspace" id="back" class="back" onclick="backSpace()"></td>
<td colspan="2"><input type="button" id="ce" value="CE" class="back" onclick="clearDisplay()"></td>
<td colspan="2"><input type="button" id="clear" value="C" class="back" onclick="clearAll()"></td>
</tr>
<tr>
<td><input type="button" class="functbut" value="MC" onclick="Mclear();"></td>
<td><input type="button" class="button" id="7" value="7" onclick="showMe(&#397;')"></td>
<td><input type="button" class="button" id="8" value="8" onclick="showMe(&#398;')"></td>
<td><input type="button" class="button" id="9" value="9" onclick="showMe(&#399;')"></td>
<td><input type="button" class="functbut" id="divide" value="/" onclick="calcEm(3)"></td>
<td><input type="button" class="button" id="sqrt" value="sqrt" onclick="getRoot();"></td>
</tr>
<tr>
<td><input type="button" class="functbut" value="MR" onclick="Mrecall();"></td>
<td><input type="button" class="button" id="4" value="4" onclick="showMe(&#394;')"></td>
<td><input type="button" class="button" id="5" value="5" onclick="showMe(&#395;')"></td>
<td><input type="button" class="button" id="6" value="6" onclick="showMe(&#396;')"></td>
<td><input type="button" class="functbut" id="times" value="*" onclick="calcEm(2)"></td>
<td><input type="button" class="button" id="perc" value="%" onclick="getPerc()"></td>
</tr>
<tr>
<td><input type="button" class="functbut" value="MS" onclick="Mreplace();"></td>
<td><input type="button" class="button" id="1" value="1" onclick="showMe(&#391;')"></td>
<td><input type="button" class="button" id="2" value="2" onclick="showMe(&#392;')"></td>
<td><input type="button" class="button" id="3" value="3" onclick="showMe(&#393;')"></td>
<td><input type="button" class="functbut" id="minus" value="-" onclick="calcEm(4)"></td>
<td><input type="button" class="button" id="x" value="1/x" onclick="fractIt()"></td>
</tr>
<tr>
<td><input type="button" class="functbut" value="M+" id="memory1" onclick="Mplus();"></td>
<td><input type="button" class="button" id="0" value="0" onclick="showMe(&#390;')"></td>
<td><input type="button" class="button" id="flop" value="+/-" onclick="invertIt()"></td>
<td><input type="button" class="button" id="dot" value="." onclick="showMe(this.value)"></td>
<td><input type="button" class="functbut" id="plus" value="+" onclick="calcEm(1)"></td>
<td><input type="button" class="functbut" id="equal" value="=" onclick="calcEm(0)"></td>
</tr>
<tr>
<td colspan="6" class="header">Num Pad On:<input type="checkbox"
id="keychoice" onclick="checkHandler();keyOnOff();"></td>
</tr>
</table>

</body>
</html>

Happy Calculating...

View 3 Replies View Related

XHR Using Basic Authentication

Feb 17, 2010

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.

View 1 Replies View Related

A BASIC Javascript RTE

Jul 6, 2006

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.

View 1 Replies View Related

Creating A Basic CMS

Aug 3, 2007

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");

View 20 Replies View Related

Getting An Old BASIC Program To Run Online

Aug 7, 2006

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).

View 10 Replies View Related

Basic Editable Combo Box

Jan 29, 2004

Here is a very basic simulated editable combo box for quick and dirty uses.

After any text input on a form you simply add a...

<script>fancycombo("[inputid]combo","[inputid]","[option1]","[option2]","[option3]")</script>

You must give the input an id as well as a name. They don't have to be the same thing, but its recommended.

NS broke when I was cleaning up the code. Searching for the error.

View 12 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved