473,396 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Post form to remote host, don't change page...

I'm trying to do an automatic signup for a newsletter hosted on a
separate site.

The original page is to sign up to receive a catalog by mail, with an
option to signup for an e-newsletter. All of the information is
validated when the user clicks submit.

At this point a second page is opened (thanking them for their request)
and the information previously entered is hidden in a form to be
submitted to the e-newsletter service provider. The signup, when
successful, returns a value of 1.

The form submits properly, but everything that I have tried thusfar
switches from the Thank You page to a page that says 1.

This *can't* be as hard as I am making it!

<FORM name="mail"
action="https://www.newsletterguys.com/view:RemoteSignup" method="post"
onsubmit="return false">
<input type="hidden" name="signup_post" value="9999">
<input type="hidden" name="account_id" value="1234">
<input type="hidden" name="username" value="em***@address.com">
<input type="hidden" name="password" value="apassword">
<input type="hidden" name="group[99999]">
<input type="hidden" name="member_email" value="jo*****@aserver.com">
<input type="hidden" name="first" value="Jack">
<input type="hidden" name="last" value="Frost">
</FORM>
<script>
mail.submit()
</script>

Any help truly appreciated...

Julie

Jul 23 '05 #1
2 2840
In article <11*********************@g14g2000cwa.googlegroups. com>,
bi**********@pandemoniumgraphics.com enlightened us with...
<script>
mail.submit()


Calling submit like this (in script) does NOT fire the onSubmit handler.

That might be your problem, since your onsubmit returns false.

--
--
~kaeli~
Murphy's Law #3020: Quality assurance doesn't.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2
OK, it turns out that I was going about this all COMPLETELY wrong (no
surprise there). In case anyone turns up this topic in a newsgroup
search, I figured I'd post what I did about it. (Sorry for the off
topic, as this should be in ASP, but I hate finding my precise problem
in a newsgroup search without a solution.)

Since this is an ASP page anyway, I used the XMLHTML object. (Besides,
using a form to submit a password is obviously *not* a great idea...)

I lost the site URL where I found the Word Doc that had this code, but
the author in that doc is listed as Jason Sexton. Thanks, Jason,
whomever you are.

<%
Set objHTTP = CreateObject("Microsoft.XMLHTTP")
objHTTP.open "POST",
"https://www.newsletterguys.com/view:RemoteSignup", False
objHTTP.setRequestHeader "Content-Type",
"application/x-www-form-urlencoded"
objHTTP.send "signup_post=9999&account_id=1234&username=... etc."
Set objHTTP = Nothing
%>

<html><body>
Submitted/Thank You/Whatever.
</body></html>

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: steve | last post by:
Hi, I finally figured out the best way to synch local and remote script folders, containing many php script files. What I used to do before was try to ftp all the changed files, etc. which was...
2
by: Don Glover the younger | last post by:
Lets see if I can decribe, this... I have a form on an html page, that will call a remote site with a post method. Prior to running off to the remote site (over which I have no control) I want to...
6
by: Pete Mahoney | last post by:
I am trying to 'POST' values from a form in a ASP file that has anonymous access permissions. I can retrieve the form values when I redirect to this page from another page which has also has...
1
by: Red Golpe | last post by:
I've managed to read from a local database using only javascript and the DAO ActiveX object, but I can't make it work with a remote database. When I change the connection string from "C:\..." to...
4
by: CK | last post by:
Hi all, I know this question is stupid. But i need some advice for this. I am trying to develop a website, which will allow the user send to order form to the admin email. I am planning to use the...
8
by: John Dalberg | last post by:
Hello For a single signon solution, I am putting a login form for a remote server on my own site. When the form gets posted, the asp.net creates a httpwebrequest object, does the post, gets the...
8
by: Laith Zraikat | last post by:
I am trying to invoke a post request from code behind of an asp.net page using "WebClient" object, and I want the user to be redirected to the action url as well. So far Ive been able to send...
2
by: MOUSTAFA ARAFA | last post by:
I want to pass (POST) username & password from my page to another asp page, I can't do anything on that page, this page for other system, and I can't touch or even change anything on it. Can...
56
by: UKuser | last post by:
Hi, I'm not sure if this can be done as I've searched the web and this forum. I am using an online merchant provider and I must post certain variables to their webforms through a form on my...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.