Page 1 of 1

subscriber modify question

PostPosted: Sat Oct 20, 2007 9:41 am
by stevan
First a very easy to install script NEVER done a cgi before and worked first time

The question is after they subscribe to the list the screen comes up and says something like you have been subscribed . What I am asking can that be changed to a small popup so the page they signed up on stays there or a auto return on that subscribe screen so after a few seconds it will go back to the page where the sign up in on

THXS Steve

PostPosted: Sat Oct 20, 2007 8:24 pm
by Admin-BS
Probably the simplest thing for you to do would be to change the subscription form HTML code to make the submission pop up a new window. You can do this by simply changing the form tag and adding "target" to it:

<form action=... target="_new">...

When a user clicks the submit button, a new window will pop up.

PostPosted: Sat Oct 20, 2007 9:11 pm
by stevan
I think i am not doing it right here is what I did the new is not right >>

<form action= method=post>target="_new">...

PostPosted: Sat Oct 20, 2007 9:16 pm
by Admin-BS
It should just cause a new window to be created.

Make sure you have the whole form tag in there correctly:

<form action="http://path/to/subscriber.cgi" method="post" target="_new">

PostPosted: Sat Oct 20, 2007 9:26 pm
by stevan
ok got it to work Is there a way to make it justable like a popup window

PostPosted: Mon Oct 22, 2007 4:24 pm
by Admin-BS
Sorry for the slow response.

You can make it into a true pop-up by using javascript. The most straightforward way to accomplish this would be to add an "onSubmit" tag to your form. For example:

Code: Select all
<form action="http://path/to/subscriber.cgi" method="post" onSubmit="'','subwindow','height=300,width=700,scrollbars=yes');'subwindow'; return true;">

Note that this replaces the target tag from the previous response. Also, you can change the height and width on that to whatever you want.

Hope this helps!

PostPosted: Mon Oct 22, 2007 4:44 pm
by stevan
The new screen comes up blank

<form action="http://path/to/subscriber.cgi" method="post" onSubmit="'','subwindow','height=300,width=700,scrollbars=yes');'subwindow'; return true;

PostPosted: Mon Oct 22, 2007 5:11 pm
by Admin-BS
You might want to try separating it into a separate javascript function. Here's a pretty straightforward tutorial on how you can accomplish that: