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


ADVERTISEMENT

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

Difference Between Popup And Regular Page When Processing Data

Jul 1, 2010

I have a form and on submit it goes to the submission page, then writes some data, sends an email and says thank you. I then wanted this to be a pop up window so the user doesn't have to leave the main page, and add an auto close function. The problem is with a popup no variables are passed to it.

The regular code to open a new page was:
Code:
<form name="formRFQ" method="post" onSubmit="return formCheck(this);" action="oring_rfq.php">
This worked perfectly everything submitted fine.

Then I decided to make the window controlled by popup
Code:
<form name="formRFQ" method="post" onSubmit="return formCheck(this);" action="wopen('oring_rfq.php', 'popup', 640, 400); return false;">
Now the page isn't getting any variables.

I wrote an If statement to check if there are any variables in case somebody stumbled on the page without actually submitting any data. So I can tell that no variables are getting sent to the popup..

View 4 Replies View Related

Processing A Doc With Javascript

Apr 24, 2002

I want to process a form with java script to check values of fields, etc and then have it format that dooment nicely for it's submission. in the book that I have that briefly touches on javascript, it says that newline characters(/r, /n) vary depending on the OS. Is this true? Is there any easy way to get around this without asking what OS they are running?

View 2 Replies View Related

Processing HTML Events In Javascript

Jun 24, 2007

In the following code I am trying to print out the value of document.body.onclick from javascript:

<BODY onclick="alert('ok')">
...
<script type="text/javascript">
alert(document.body.onclick);
</script>

...
</BODY>

However, the alert in Javascript code prints out "undefined" when I open this page and not the actual value of onclick.

View 1 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

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

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

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 :: 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

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 :: 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

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 View Related

JQuery :: $.load On Form Pages - Can't Get Query Data In Processing Script

Jun 20, 2010

I have a database site I am currently designing, and would like to use a single page with forms in external html documents to undertake admin tasks (eg. add/remove records etc.)

I have managed to successfully load the form html into the necessary div using the $.load function, however, when I try to process the form, with this code:

$("#add_form").validate({
debug: false,
rules: {
maker: "required",

[Code]....

which asks 'process_form.php' to process the data, it doesn't seem to send the data in the form to the page. to confirm this, and whilst trying to get the system to work, the 'process_form.php' consists of 2 lines,:

echo $_GET['maker'];
echo '123456';

(ie. one line to return a string literal, and one line to return one of the variables which SHOULD be passed by the form)

This results in just the 123456 string being returned.

I have tried several things: loading the script above in the head of the 'parent' html page (ie. which the form is loaded into); - does not properly fire at all;

loading the script 'in-line' in the imported html - this leads to the result given above; running the script in an external script.js file through an onsubmit directive on the form...does not appear to properly fire the script.

View 4 Replies View Related

JavaScript Popup

Sep 19, 2003

I have a Popup on my website which appears the first time someone leaves my home page. The problem is that it's intended for people who decided not to order, but it still appears when visitors go to my order page. Please can you tell me how to stop this happening, so that it only appears when people click away to a page other than my order page? Code:

View 1 Replies View Related

Modal Popup Javascript In Asp.net

Jul 23, 2005

I'm trying to creat a modal dialog box in asp.net using the following

Dim str_JavaPopup As String = "<script language" &
"='javascript'>window.showModalDialog('frm_MoreInfo.aspx?ProductI mage="
& str_ImageName & "&ProductDesc=" & str_Description & "','dialogWidth:
100px;dialogHeight: 100px;center: yes;resize: no;status: no;help:
no');</Script>"

Me.Page.RegisterStartupScript("Startup", str_JavaPopup)

the window opens fine but the window does not resize

is my code ok?

View 1 Replies View Related

Javascript Confirm Popup.

Jul 21, 2005

I have never done any javascript at all but I think it can do what I want with ease.

Basically at the moment I have a link that calls a delete script written in php. The delete script just deletes and item from my mysql database. What I would like is a popup to appear when the link is clicked that asks for the user to confirm they wish to delete.

Could anyone either show and example or point me to a site that may have a tutorial or something.

View 6 Replies View Related

JavaScript Popup Effect

Feb 8, 2007

I'm after creating a JavaScript effect on my site. I've just created a basic popup effect on the Loughbourgh Image which when clicked brings up a popup (which for some reason only works in IE at the moment). However this is static. What i want is whenever i hover over that image the popup appears but in relation to the cursor. So if the cursor moves the pop moves along with it.

I assume there is an effect such as this but i have had no luck finding it so can someone point me in the right direction please? Is there any similer posts regarding this subject or a tutorial i could learn from?

View 11 Replies View Related

Opening Javascript PopUp From Within PHP Code

Jul 23, 2005

I've been trying to do this for days without success. Is there a way to open a popup window from within the php code? Example:

if (some_condition) {
open a popup page and load a file in it
break;
}

View 2 Replies View Related

Javascript Popup View By Details

Jul 23, 2005

I have a very simple javascript popup that opens to a drive folder, e.g.

c: est

which is called as such:

<A HREF="javascript:popUp('C:/test')">Test Folder</A>

This displays the contents of the c: emp folder
but defaults to a view of "large icons." Is there
a way to make it default to a view of "details?"

View 4 Replies View Related

Javascript Info Popup On Highlight

Dec 17, 2006

I've seen this effect on other sites, but I don't know how to do
it. What I'm trying to do is enable the user to highlight a portion of
text on a webpage, then click an "edit" button and a little window will
popup with that highlighted text in an editable mode (or it could be
the entire paragraph tag that the highlighted text sits in). Then I
want them to be able to edit the text however they want, click a "save"
button, and the text updates within the webpage. I know how to do the
last part of this, but I don't know how to make the popup window work
and include the highlighted text.

Just a little background on this project: What I ultimately want to be
able to do is let the website's owner be able to update the contents of
her site whenever she wishes. This is what she wants because she
doesn't know html and doesn't want to learn it. She also doesn't want
to learn dreamweaver or any other wysiwyg editor. I would almost guess
that a similar project exists out there already, maybe not using
javascript, but I haven't been able to find it. Code:

View 2 Replies View Related

Javascript Popup Error - Opera Only

Sep 8, 2001

I have a site which uses a javascript fullscreen popup window which launches from the splash page (as well as a standard browser version for those with non-compliant browsers). All works well on both Netscape and IE, but if you're using Opera and you click on the "All other browsers" version, you get both the browser version and the popup version. This will probably be very irritating to Opera users. Unfortunately, I can't just program the popup for Opera compliance as well because it won't do fullscreen - it nests under the ad/control bars. Could someone look at it in Opera and maybe suggest a solution? Opera users don't make up a lot of my user base but I really prefer to be Opera-compliant.

View 7 Replies View Related

Javascript Popup Menu Problem

Mar 30, 2006

I have this irritation problem that i cnt sort out. I jave a menu on my website that uses javascript popup menus on mouse over.

But now the problem is that wen the menu appears, it is behind the dropdownlist on the site that is under the menu. This only hapens in IE and works fine in firefox. It does the same things with flash banners.

View 2 Replies View Related







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