Allow User To Save Image From Whiteboard Drawing Via Form Processing?

Jul 22, 2009

I am trying to design a system that allows users to draw on a whiteboard with different colors, save their drawing into hidden input boxes in the form on the page, then they can click Save Logo to save it to process it through PHP. I have the whiteboard that allows them to draw, but I am lost as to how to get the thing to populate the hidden input boxes.

So, I have the following code:

<HEAD>
</HEAD>
<BODY>

[code]....

What I am trying to do is use the function mousedown(e) to include an event to update a hidden input box with the value of the TD's background color that the hidden input field is attached to, so that it can be tracked when the user hits Save Logo at the bottom of the page. When they hit Save Logo, I want the form to post to itself, go through each of the input hidden fields and capture the color for each table cell, then generate an image based on the generated array, save it to a file on the server with the user's $_SESSION['userid'] as the filename + .jpg.

The problem is, though, that I do not know how to tell JavaScript to do this in the function mousedown(e) code. Also, look in the function table_create and see if I am naming the hidden input boxes correctly; not sure if it will generate the wanted result.

Just a note: I can handle all the PHP handling of the form, I just need help with the Javascript.

Edit: I attached the entire script/page to this post because so many functions rely on each other to operate, and I'm not exactly sure which function will need to be modified to get the desired result. Also, you can copy the code to a .php file to see what it looks like (as that may assist in demonstrating exactly what I'm trying to do, visually).

Edit 2: I suppose what I need to find is how to get the JavaScript to assign a value to the hidden input field that has the same id as the TD field that it needs to be linked to.

View 3 Replies


ADVERTISEMENT

JQuery :: Confirming User Action And Then Processing Form?

Oct 13, 2011

I have a form that has two input buttons. One of the input submit buttons is being used to delete data from a database. Whenever a user clicks that delete button I am trying to make it so that a confirmation message appears that confirms that the user wants to carry on with the action. Then if they click Ok, the form should continue processing otherwise it will fail.

<form action="<?php echo $_SERVER['php_self']; ?>" method="post" id="data" name="data">
<fieldset>
<table>
<tr>
<th>Check</th><th>Id</th><th>Added</th><th>Method</th><th>Host</th><th>Port</th><th>Time</th><th id="shell">Shell Location</th>

[Code]...

Currently, the confirmation message works great but I can't get the form to submit once I click.

View 4 Replies View Related

JQuery :: Drawing A Line And/or A Box Over A BeforeAfter Image

Nov 19, 2011

We currently have a website that uses the .beforeAfter plugin to switch between two images. In addition we would like to add the possibility to draw a line and/or box using a boxer like option. All our attempts have been unsuccessful so far.
Could anyone tell us if and how it is possible to combine the .beforeAfter option with a drawing line/box one?

For curious users, here is the website we are currently working on:

[URL]

View 3 Replies View Related

Processing Pending Events From Within A Longl Lasting Loop (because User Wants To Cancel A Search)

Jul 20, 2005

I have to make an application that works on pc and apple mac.
Therefore I am investigating if it's possible to use html/javascript.
The database has 10000 records and is sequentially searched. This may
take 20 seconds or so. I want the user to be able to quit the search
and also I want the outputscreen to be updated immediately when a hit
is found and not wait until the complete search is finished.

The problem is that the click-event of the 'Cancel-button' is
processed after the search is finished. Is there something like
application.processmessages (similar to Delphi) so all pending events
are processed?

View 3 Replies View Related

JQuery :: Image Processing For IE Navigators?

Sep 3, 2009

About images, when an image is resized into Firefox ; the image seems to be clean ( ex : 150x150 to 130x130 ). Into IE , the same image is very bad , IE do nothing to treat this image. Maybe Jquery can do that ? In php I know how to do this but it's for too many images with differents sizes ...

View 2 Replies View Related

Prompt The User To Save Changes?

Jul 20, 2011

I need to write code to prompt the user to save the changes before the user session expires. And this should happen only when the user makes any changes, if he doesnt make any changes, I should not be prompting him. For this I need to check if any fields are modified in the page. I need a generalised code that goes in the header or footer page of the application, so that I dont have to make any changes to the existing 100 pages.

View 2 Replies View Related

How To Display Form Processing On Same Screen As Form?

Jul 19, 2007

By luck I had somehow found a way to collect data with a form, perform
calculations with JavaScript and display the form and calculated
results on the same screen.

Now I can't figure out how to do that again. The only methods of
reporting the calculation results seem to display a completely new
screen/window.

I just want to collect some numeric input data with slider widgets or
text boxes for an alternate method and display additional calculated
results 'real time' as the slider is adjusted. If this can't be done,
after a text box entry is made. Ideally the results would display
without a 'submit' button click.

View 4 Replies View Related

How To Save User Entered Data

Feb 19, 2011

It will be best to use server side scripting like php for it , because user can disable his javascript in that condition your code won't work

View 1 Replies View Related

JQuery :: JS/canvas/PHP Remotely *shared* Whiteboard?

Apr 30, 2009

A remotely shared white board, using regular JavaScript,jQuery, the canvas element and PHP.I (or someone else) can get this thing working.The new 8:25 a.m. (US CST) version in http:[url].... should work -- though I still have not seen it work, perhaps.

View 2 Replies View Related

Javascript And Form Processing

Oct 12, 2005

I wish to carry out standard form validation (i.e. is it a date?, is
there a value in the field, is it a number) using the onBlur event
rather than the onSubmit event. This (of course) leads to problems when
cancelling an edit as leaving a field to press the cancel button will
trigger the onBlur event and therefore the field validation. Is there
any way to know the destination field / button that caused the onBlur
event? In Ingres ABF/W4GL (mid eighties language of similar
functionality to javascript) there was an available attribute called
the targetfield so the code could run...

onBlur myfield =
{
if (targetfield != CancelButton) {
carry out validation
}
}

Is there something similar in javascript or will I have to program
round the houses i.e. onBlur records which validation to run and
onFocus runs the validation (unless it's a cancel button)?

View 5 Replies View Related

JavaScript Form Processing

Jul 20, 2005

Is it possible to use JavaScript to apply different actions to a form
depending on a value within the form (eg sending form data to
different cgi scripts depending which radio button is checked)?

View 1 Replies View Related

JQuery :: Letting User Save Text?

Oct 11, 2011

I've wrote what (at least in my mind) and awsome report generator for a group who uses my server. The user gets all the data from the server via the server's normal reporting tools, and then sorts/shows/hides/formats columns using javascript/jquery (saves server cycles). There is only one slight problem (think "grand canyon" slight), once a user has a form he or she wants, then the user needs to save the tab separated value form of the report to disk.

I can output the TSV into a DIV (and probably an IFRAME I'm guessing), and do for display purposes. However, the users need to copy/paste at this point, which is rather user-unfriendly. Is there a way to either prompt a file download/save (without making a call to the server and wasting time), or opening up a new tab with just the desired text, so the user can save it?

EDIT: I'd rather not replace the whole page that generates the report, as the user probably doesn't want to lose his or her work in formatting setings, and my want to generate multiple reports from one dataset/query, without having to rewrite the query.

View 4 Replies View Related

Save User Selection On Confirm Message Box?

Jun 30, 2009

I have a confirm message box which asks the user whether they wish to take a survey. At the moment the confirm box appears each time the page is loaded. Would there be a way that when the user selects OK to take the survey this is remembered, so when the users next visit the page the box doesn't appear?

View 1 Replies View Related

Script Processing Form When It's Not Supposed To

Sep 18, 2004

I have a snippet of javascript to check and make sure all the fields in a form are filled in. If they aren't then it shows an alert box telling you to put something in that form. If all the fields are filled in then it submits the form. That piece of code is this:

Code:

function checkFields() {
var errors = "no";
if(document.street_team.email.value == "") {
alert("Please enter an e-mail address..");
errors = "yes";}
if(document.street_team.name_first.value == ""){
alert("Please enter your first name.");
errors = "yes";}
if(document.street_team.name_last.value == ""){
alert("Please enter your last name.");
errors = "yes";}
if(document.street_team.loc_state.value == ""){
alert("Please enter your state.");
errors = "yes";}
if(document.street_team.loc_city.value == ""){
alert("Please enter your city.");
errors = "yes";}
if(errors != "yes"){
document.street_team.submit();}
}
Then i used a button to start the script. That code is this:

Code:

<button onClick="checkFields()">Join</button>
The problem is that if you don't have something filled in and the alert box pops up, once you click "ok" it still processes the form. Any ideas on how to keep it from doing that?

View 4 Replies View Related

Javascript Popup W/php Form Processing.

Apr 5, 2001

i have a form like this on a page called emailform.htm:

<form method="post" onSubmit=NewWindow()>
<H3>From: <input type="text" name="from"></H3>
<H3>Message: <input type="text" name="body"></H3>
<input type="submit" value="Send the Message">
</form>

when submitted, it calls this function:

function NewWindow(){
window.open('sendmail.php', 'newWin', 'scrollbars=no,
toolbar=no, width=200, height=200');
}

two problems:

1. the form values are not getting passed over to sendmail.php.
2. after the popup window pops up and loads sendmail.php, the original page, emailform.htm, changes to an error page.

so, what do i need to do to get the form values to be passed, and how do i keep the original page either from changing at all, or, if thats not possible, get it to simply reload itself.

View 3 Replies View Related

Accessing And Processing Form Data?

Oct 8, 2010

I feel like I've been server-side programming so long that I completely forget how client-side works. I have a super simple form:

Code:

<form action="page2.html" method="post/get">
First name: <input type="text" name="firstname" /><br />
Last name: <input type="text" name="lastname" />
<input type="submit" value="Submit" />
</form>

Is there a way to use Javascript on "page2.html" to access the contents of firstname and lastname and display them?

View 1 Replies View Related

Save All Variables In A Cookie When The User Leaves The Page

Feb 26, 2007

On one of my sites, I have a reather involved page (searchable map).
When the person leaves the page then all the AJAX generated
information is lost. Is there a way that I can retain all this data
in a cookie or so or how would you recommend I saved all the users
information (perhaps using a database on the serverside).

View 4 Replies View Related

JQuery :: Lock An .aspx Form While Processing?

Jun 16, 2010

Can the UI dialog be used for this?

View 1 Replies View Related

JQuery :: Make An Alert Before Processing A Form?

Apr 28, 2009

i might be tired right now but I cannot seem to figure out a good way to show an alert before processing a form, the form is not processed using AJAX, just passed on to a PHP script I might however want to implement AJAX when processing the form, hmmm, maybe that will sort me out then I guess /pär

View 4 Replies View Related

Creating A Processing Page For Submit Form

Dec 21, 2007

I'm looking to create a processing page for a submit that has a little rotating processing image with a little verbage like "please wait while we process your information" Just so the page looks like it's actually doing something. Code:

View 1 Replies View Related

Jquery :: Save As HTML - Copy Source And Present To User

Feb 23, 2011

I'm working on a webpage which is completely self-sufficient. This means if you copied the source you would be able to load it locally without any glitches from your computer. I want to embed a "Save As" feature into this document using only javascript or jquery. For various reasons I do not have access to a server-side language to perform this action. I've done some research but can't seem to find a definitive way to do this.

My goal:
User clicks "Save As HTML" button which triggers jquery to copy the source of the page and present it to the user as a mypage.html download. My fall back approach will be to open a new tab with just the desired html and instruct the user to manually "File -> Save As". However, this is very undesirable and I would like to find a solution to fulfill the goal above.

View 1 Replies View Related

JQuery :: Save The Background Image Of The T-shirt With The Image They Dropped In The Correct Spot?

Jul 15, 2011

I am building a simple t-shirt creator app for my shop and I am using the interface.js library: [URL].. docs/drag to drag/drop and re-size the graphic on the shirt background image.

Once the user has chosen a spot to put the graphic, how do I save the background image of the t-shirt with the image they dropped in the correct spot? Like, to merge the two graphics in place?

View 2 Replies View Related

AJAX :: Form Submission --> Processing --> Echo On-screen ?

Aug 12, 2009

I have a web application in which I want users to be able to submit a form. Something like this:

Code PHP:
<form method="post" action="index.php">
<input type="text" name="text" value="" />[code]....

Then when it is submitted, the data will be processed and the script which is processing the data will echo some data on-screen based on the data from the form.I need this to happen in an AJAX manner, ie: the page won't need to reload.how to go about doing this? I'll be using jQuery on the same page in case

View 1 Replies View Related

JQuery :: Make An Image Selection, Display Same Image On Page In Unique Id And Save To Hidden Input All In One Click?

May 11, 2010

Using a UI dialog I'd like to load in 10 or so images. Each would be unique and after you click on one the following needs to happen:

1. Image appears on the parent page in a specified ID.

2. A "hidden" field is updated so that when the user submits the db is updated with their selection.

3. Dialog closes automatically.

That's it. Basically it would work similar to "datepicker".I'm using the latest 1.4 and ui and been making great progress as learning basics. I need to do the above and it seems like such a no brainier and or it should already exist but after 2 days of searching and trial and error...

View 6 Replies View Related

Image Editing: Position Markers On Image And Save?

Apr 15, 2010

I'm looking to build a user form where the user can drag and drop markers onto an image and then retrieve/send the resulting new image with markers back to the server
for processing.

what UI functions / Framework will be in the right direction to achieve this?

Anyone familiar with some existing similar functionality?

View 2 Replies View Related

JQuery :: ASPNET Web Form On Subvmit Grey Out And Processing Message?

Oct 21, 2009

I am looking for sample/ implementation ASP.net with Jquery.My requirement is I have web form with some controls, once the user click on submit, entire form should Grey out with message as processing .... once the database successful, successful message should bedisplayed and if user clicks on close on message the message should be closed and form needs to be cleared or some thing like this.

View 1 Replies View Related







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