Recent Topics

1 Oct 09, 2009 20:30    

My b2evolution Version: Not Entered

Hi,

I am using PHPList for my newsletter and am trying to add a subscribe box to blog but not having much succes.

I am not sure if I can use the script as it does not seem to do anything..

Thanks

JOhn

The code for box is:

<!-- newsletter subscribe below here -->

<script language="Javascript" type="text/javascript">
var fieldstocheck = new Array();
fieldnames = new Array();
function checkform() {
for (i=0;i<fieldstocheck.length;i++) {
if (eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].value") == "") {
alert("Please enter your "+fieldnames[i]);
eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].focus()");
return false;
}
}
return true;
}
function addFieldToCheck(value,name) {
fieldstocheck = value;
fieldnames[fieldnames.length] = name;
}
</script>

<form method="post" action="http://www.selectyourprice.com/list/?p=subscribe" name="subscribeform" target="_blank">
Email:<input type="text" name="email" value = "" /><br />
<script language="Javascript" type="text/javascript">addFieldToCheck("email","Email Address");</script>
Confirm your email address:<input type="text" name="emailconfirm" value = "" /><br />
<script language="Javascript" type="text/javascript">addFieldToCheck("emailconfirm","Confirm your email address");</script>
Name: <input type="text" name="attribute2" value = "" />
<script language="Javascript" type="text/javascript">addFieldToCheck("attribute1","Name");</script>
<input type="hidden" name="list[2]" value="signup" />
<input type="submit" name="subscribe" value="Subscribe" onClick="return checkform();" />
</form>

<!-- newsletter subscribe ends here -->

2 Oct 09, 2009 22:11

And your evo version is ...?
And your adding it by ...?
And your error/failure is ...?
And the url where this problem can be seen is ...?

Sorry, my crystal balls a smidge upset with me since I kicked it when it failed to predict the lottery numbers last week ... but, I'll take a guess at admin > users > [click group] > allow script && any other stuff that rocks your boat > click save

Ohhh, and language="Javascript" was deprecated a fair tad ago ... I normally avoid any and all snippets that have that included ;)

¥

3 Oct 09, 2009 23:16

¥åßßå wrote:

And your evo version is ...?

Sorry I just upgraded to the lasted stable version that I downloaded today.
I was using version 1 something so I was way behind times lol

¥åßßå wrote:

And your adding it by ...?

Was adding it as a post. Not sure if this is the correct way.

¥åßßå wrote:

And your error/failure is ...?

No error showed just that the script was not working. Its supposed to just to make sure you enter and email address and name before you submit.

¥åßßå wrote:

And the url where this problem can be seen is ...?

I don't have it on site as since it was not working I took code out.

¥åßßå wrote:

Sorry, my crystal balls a smidge upset with me since I kicked it when it failed to predict the lottery numbers last week ... but, I'll take a guess at admin > users > [click group] > allow script && any other stuff that rocks your boat > click save

Yeah mine gave me the wrong numbers too :(

¥åßßå wrote:

Ohhh, and language="Javascript" was deprecated a fair tad ago ... I normally avoid any and all snippets that have that included ;)

Don't really do much programming outside of VB so was not aware of it.

Thanks for the help...

4 Oct 11, 2009 16:22

You can add the script in a few ways, I'd probably slap it in the sidebar by using the freehtml widget ( admin > blog settings > [blog] > widgets > add new widget )

If you wanted to put it into a post then you would need to change your group settings like I posted above.

If it still fails after that then post a copy of your pages html ( where it fails ... ohhh, and use [code]<!-- your code -->[/code] tags, I go dizzy when pages get to long ;) )

¥


Form is loading...