SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Aug 2000
    Posts
    258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to: 2 Actions w/1 form?

    Anyone know how to accomplish two actions with one form?

    I'd like a box allowing users to, say, sign up for an e-magazine from getresponse.com AND sign up for a newletter from Topica.com all with one submit button.

    (I'm using their html scripts linking to their CGI. I don't have access to CGI.)

    Any way to allow users to check a box self selecting which of the two they are signing up for?

    Possible?

    Thanks ahead of time for any help you guys can give!
    Total Life Success - Don't give in. Succeed. (tm)

    Total Life Success Forums - the Web's Leading
    Success Community™

  2. #2
    SitePoint Enthusiast
    Join Date
    Apr 2001
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use frames!

    Say you have a page with three frames, two side-by-side above a third. You could put JavaScript in the bottom frame with your "submit" button that would submit both forms independently in the two upper frames, but at the same time. The output might look a little funny, having two totally different sites in frames side by side, but it would work.

    /johnny
    <<< johnny chidiac
    johnnydaboy@mac.com

  3. #3
    SitePoint Addict
    Join Date
    May 2000
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you post the forms and scripts they provided? There probably is a solution, but it would help if we could see the code.

  4. #4
    Xbox why have you forsaken me? moospot's Avatar
    Join Date
    Feb 2001
    Location
    Clearwater, FL
    Posts
    3,615
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What you are you using to process your subscriptions? ASP, PHP? I was thinking you could use a QueryString and check for a value that would signify the other persons box was checked. Then you could process your form on your page and if that QueryString variable is present, then send them on to their CGI link.

    Just a rough idea. Good Luck!

  5. #5
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,123
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I already responded to this exact same question... Did you just copy and paste someone else's or did you not like the answer you got?

    Anyways, enough ranting... moo is bang on the money. ASP page to check which boxes are checked:

    If a is checked > redirect to a.asp
    If b is checked > redirect to b.cgi
    If a + b are checked > redirect to a.asp?cgi=yes, process, redirect to b.cgi

    Essentially... Though this is clumsy and all data may not be passed to the cgi page (how do you pass data from asp to cgi? querystring?)... So, you may want to use JavaScript to check which is being used.

    If this is ONLY an either or situation use a radio button instead of checkbox and that will only allow one of them to be checked. Thus the form could then redirect to a.asp or b.cgi very easily.
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •