Posting Form Fields With XMLHTTP

I am trying to post a large XML string to another url. I have been doing this previously in cold fusion but am trying to get all of my code up to date and it wont work in ASP. It should be very simple:

xml = Server.URLEncode(refi1_doc)

pingUrl = "https://xxx.xxxxxxx.com/b2b/incoming.asp"

set xmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
xmlHttp.Open "POST", pingUrl, False
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlHttp.Send xml

This should just be URLEncoding the xml document and posting it. I am getting a "Bad XML" response - line 0, position 0 -- but I KNOW the xml string is well formed -- have already tested that. The guy on that end who was trying to help me stated that the string MUST be in a form field named "xml" (all lowercase) and it has to be a post -- that's it! Isn't that what I am doing? I even tried adding to the end of the URL:

pingUrl = "https://xxx.xxxxxxx.com/b2b/incoming.asp?xml="

Nothing is working. How do I specify that the data being sent is in a form field called "xml"? Anyone know what is going on here?

View Replies


ADVERTISEMENT

Posting Data Using XMLHTTP

I am trying to post data using xmlhttp object.

The data Iam trying to send has "&" in it, like - xx.asp?part=tm7&t6

Somehow the data doe not reach to the page correectly.

I also tried -

xx.asp?part=tm7&t6

But still it does not reach.

In my final page when I retrieve request.form("part") -

Iam getting only tm7.

View Replies View Related

Posting One Form

My employer uses an onjline application for new hires. Currently they fill out a form which goes to ../cgi-bin/formail.pl
Of course this then email the application to them.
Once they recieve it it looks fine but when the go to print they say it prints 4 or 5 pages of garbly gook.
I havent seen this yet but i was thinking that if i could post the form to two seperat files, the fromail.pl and an asp page to insert it into an access table to later view with another asp page they could view the apps online and just print form explorer if i designed the page right
i have never done anythig with pearl before. Can I post it to an asp page then to the formail.pl. instead of posting it to two pages.

View Replies View Related

Posting From One Form On A Page To Another Form

have one form on an html page post to another form on the same page? I would like to have the information (all of the second form) hidden until the post is sent to it. Is that possible too?

View Replies View Related

Posting Form Variables

I have created a form, which has hidden fields, which are to be passed to a payment gateway using the POST method.

My problem is that the variables in the hidden fields do not get passed on to the payment page when the form gets posted. The payment page comes up empty.

Does anyone know why this is happening? Code:

View Replies View Related

Automatic Form Posting

Posting variables from an HTML FORM, via
the Request.Form function on the receiving
ASP page is great.
But how can you POST a Form variable to
an ASP page -- without a human pushing a
Submit button?
An ASP page that can decide when to POST
and send the Form vaiables, but out without a
human in the loop.p.s. the reason I do not want to use a
Request.Querysting is because I do not
want the user to see the values at the
tail-end of the URL (?x=private).

View Replies View Related

How Do I Find Out Who Is Posting To My Form?

I have a web page, where users fill out their name and address, and I send
them a free catalog.

The problem is that someone is filling my form out about 100 times a day
throughout the day with peoples information, who don't want the catalog!

I have tracked the ip address (all different) and the http referrer, which
doesn't really tell me much. and looked in the iis logs, which lists the
ipaddresses.

How can I find out who is posting to my form???

View Replies View Related

Posting Form Results

I am trying to post the results of one form to another target .asp page - I do not know how to write the code. I have ran through tutorials etc., and my ISS 5 documentation - basically this is what I am coming up with. Please confirm if this is correct code used on the target page - the page that rcieves the form results.

<form action="CSSI-CMS2.asp" method="GET" enctype="multipart/form-data" name="e-design">
<%
Response.Write(objItem & " = " & Request.Form(objItem) & "<br>")
Next
%>
</form>

View Replies View Related

Special Characters And Posting Form

When I post a string containing special characters (& #145, & #146, & #147, etc. for single and double quotes -- spaces added so they display correctly) through a form and write the contents on the next page via Request.Form, my special characters have been replaced with the characters they represent. Does anyone have any idea why this is happening, and more importantly, how to avoid it?

View Replies View Related

Auto Submit Form Keeps Posting

When a visitor enters the basket section of my ecommerce application he has to press on a button “click to view basket”. The submit button posts the users IP address back to the form. Below is the code:

<form BOTID="0" METHOD="POST" action="ProducsTotalBasket.asp">

<input TYPE="HIDDEN" NAME="Remote_computer_name" VALUE="<%=Request.Servervariables("REMOTE_ADDR")%>" size="20">

</form>

I have tried to automate the submit function by placing the following code into the body of the web page:

<BODY onLoad="window.document.postform.submit()">

This works, in that the records in the basket are displayed automatically without clicking on the submit button however the screen starts going berserk and the form keeps posting to itself i.e. the “ProducsTotalBasket.asp” page mentioned above. It simply won’t stop & keeps looping and posting over and over again.

View Replies View Related

Problem Posting Data From Asp Form

I am running IIS5, Win2k Server, and .Net Framework 1.1.

For some reason asp forms will not post data. So I have
a form with a text box. The form's method is set to post
and I have a submit button.

The weird thing is that the page works fine without using
SSL and/or the FQDN for the server. Code:

View Replies View Related

Posting Unicode Form Values

I've encountered is in a UTF-8 test script. Here, the input - a single two-byte Cyrillic character (as reported by Javascript in the originating form) is posted to the receiving script, where IIS or IE has expanded that to a 4-byte field. -- while the display of that character is correct. What encoding is the latter?

View Replies View Related

Posting Form Data To A Popup Window

Does anyone know how to post form data to a popup window either by using ASP or JavaScript? I have a form full of inputs and I want to open a popup window where the processing can take place.

View Replies View Related

Retain Values On The Form When Posting Back To Itself

I have simple form where user enter the search criteria and the form is
posted back to itself and runs a query based on the values that are entered.

Everything is expect the values that the user enters disappears everytime
the form is refreshed when posting it to itself.

Is there anyway I can retain the values that were entered on the form?

View Replies View Related

Automatically Posting Form Values When A Page Loads

is there a way in ASP to automatically submit a form and its values when a page loads ?

if not is there any way round this scenario. i want to have a drop down list of options depending on which is selected will depend on where the form is submitted to.

View Replies View Related

POSTing A Binary File Using Multipart/form-data

I'm trying to setup an ASP page to POST an image across to another page- essentially simulating what a browser does when you use <input type=file> in a HTML form.

I'm able to correctly setup the headers etc and do the POST, but I'm unable to include the binary data of the image.

The only way i've been able to do it is if I base64 encode the image. I'm using MSXML2.ServerXMLHTTP to do the POST, and I can't seem to do the .send with a form body that includes the binary data of the image. Code:

View Replies View Related

Posting A Form In The Background And Accessing The Response As A Variable

I am using a new payment gateway for one of my sites. One of the options they recommend for submitting the credit card info involves submitting a form in "the background" with a post. They then return a comma-delimited string, which I can easily parse and act upon.

How do I submit a form in the background? I'm sure it's simple, I just never had to do it so I never learned how...

View Replies View Related

ASP Repeating Form Fields In An Email Form

Would anyone be able to give some guideance in ASP code as to how I would repeat a section of input fields in a form based upon the number of guests that are attending an event?

Basically, what needs to happen is if 3 guests are attending, I need the Name, address, city, state fields to repeat so they can be filled in with information.

Then all of the information from the whole form is submitted which returns an email to the administrator of the event.

View Replies View Related

Form Fields

I have an asp page which has a number of form fields on it (about 50). 2/3rds of these fields are used to store username (windows username) and date (todays date). I want these fields to be locked so the user cannot enter any info into them. The infor will be grabbed from the current user and the current date.

However, I only want these fields to be populated only when the left most field is changed. Once the fields have been populated the username and date fields will change with however is logged in and the new date.

View Replies View Related

Form Fields

I have a form that will be filled out by users, what I would like to do is when the user selects a state from a dropdown list i want to have the City field show select options based on their state. I know this can be done but I dont remember how.

View Replies View Related

Form Fields To 1 Variable

I need to loop through all submitted form fields and place them all into 1 variable but i have no idea how. Here's what I have so far:

for each item in request.form

myVariable = "formfieldname:" & item & "formfieldvalue:" & request(item)

next
response.write(myVariable)
The problem with that is that response.write(myVariable) only prints the last field in the form.

I know that if I move the response.write(myVariable) INSIDE of the loop it will print correctly but I am not trying to print the form fields BUT I AM TRYING to store them in ONE variable.

For example:

myVariable = formfield1name:formfield1value:formfield2name:formfield2value:formfield3name:f ormfield3value:ETC ETC

View Replies View Related

Not Getting Form Fields Thru ASP (CDOSYS)

Code to email form data via ASP. Forced to use CDOSYS by 2003 server at host. It sends an email fine, but the form data is missing. Where my going wrong? Could it be the html file's form actuating the .asp file? Could it be an enctype issue? Or bad ASP syntax... Code:

View Replies View Related

Bunch Of Form Fields

Can someone tell me how I can take a bunch of form fields using Request.Form, and put them in a array. And then, how do I send that in and INSERT sql.

View Replies View Related

Insert Form Fields

I have about 30 names of workers (and their IDs in hidden fields, that depend on their departments) in one form, beside them there is one dropdown list for each worker, with same items. I want to select item from dropdown list for each worker, that will write item ID in another hidden field... and then I want to submit worker's ID, ID from dropdown list etc....into another .asp page and sql db.
If I use next way :
<%
FOR EACH name IN Request.Form
Response.Write("<BR>")
Response.Write(Request.Form(name))
NEXT
%>
I get only values of IDs from dropdown lists. But I need workers' IDs, too.

View Replies View Related

How To Send All Fields Of A Form Without Specifying Each One

how can I send the whole form using the script below, without listing every NAME of the form. Basically I wondered if you can just put a certain code in that will send all the fields of the form without putting each NAME of the fields down indiv individualy??

My forms Name is 'conf', so I was wondering if there was a code like SENDWHOLEFORM="conf", (I know it obviously won't be that, but just to put the point across!)

<%
DIM strNAME, Mailer
strFirstName = Upload.Form("NAME")

Set JMail = Server.CreateObject("JMail.SMTPMail")

JMail.ServerAddress = "10.2.3.2"
JMail.AddRecipient "me@me.com"
JMail.Sender = "me@me.com"
JMail.Subject = "Submitted Item to sell"
JMail.Body = "Name: " & strNAME

JMail.Execute
Set JMail= Nothing
%>

View Replies View Related

How To Loop Through More Form Fields?

I have about 30 worker names (and their IDs in hidden fields) in one form, beside each worker I have a dropdown list with same items. When I select an item from dropdown list its ID is written in another hidden field. I want to submit values from hidden fields into another .asp page and sql db. If I use :

<%
FOR EACH name IN Request.Form
Response.Write("<BR>")
Response.Write(Request.Form(name))
NEXT
%>

I get only values from dropdown lists IDs. how to loop through all fields and get IDs of workers, too.

View Replies View Related

Dislpaying SQL Fields In A Form

I have the following asp code:

response.write "<td align=left colspan=2 class=text>" & _
"<input type=text name=ProjectDescription STYLE='width:465px' value=' " & ProjectDescription &" '>" & _
"</input></td>"

The problem I have is when ProjectDescription contains a ' the data gets truncated. How can I resolve this.

i.e. ProjectDescription=doesn't

View Replies View Related

Display Form Fields

I have created an email form in which all fields must be completed. If all the fields are not completed "submit" causes a refresh using response.redirect, Problem is allthe fields that were previously filled in are empty.How do I keep the values of the fields on refresh?

View Replies View Related

Scanning Form Fields

I have a form submitted with a form field called contents. This could have loads of text in. What i need to do is scan this field for words that match the text in a database record called PAC_WORD. This could match 3 or 4 of the words put. Basically for each word picked up I want to write " This item found is not allowed

View Replies View Related

Server Form Fields

I have a asp page that has a form that I have to submit to a third party website.if their is a way to create form values using asp to submit the secure data without having it in a hidden field where it can be seen when viewing page source?

Currently I have my asp code writing out hidden form fields using the response.write when the page loads then after everything is loaded JavaScript submits the form.

View Replies View Related

Update Fields In Form

I am creating a form that uses a postcode lookup that opens in another window to confirm an address how would I pass back the address and populate the form?

View Replies View Related

Checking Fields In A Form

How do I check the field for example zip code to make sure that it has 5 digits?

View Replies View Related

Form Fields Visibility

I have a web form which is quite long. My first field is required. If my user submits the form the page just sits there and the do not see my validation message at the top of my page. how I can reposition teh page so they see teh message i.e.scroll back up the page?

View Replies View Related







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