Home › Forums › Scripts › Enthusiast › Removing javascript in show_join
Tagged: enthusiast, javascript
This topic contains 7 replies, has 3 voices, and was last updated by Jem 1 year, 11 months ago.
-
AuthorPosts
-
July 2, 2011 at 3:42 pm #13900
I’m currently in the process of completing a fanlisting, but have been faced with an obstacle — the javascript I’m using for the fanlisting refuses to load the join page completely due to the the javascript that’s present in the show_join page.
Is there any way to modify the following code to remove the javascript, but keep the variables (which are used in the rest of the file) intact?
if( $show_form ) {<br />
$cutup = explode( '@', $info['email'] );<br />
$email_js = '<script type="text/javascript">' . "rn<!--rn" .<br />
"jsemail = ( '$cutup[0]' + '@' + '$cutup[1]' ); rn" .<br />
"document.write( '<a href="mailto:' + jsemail + '">email me</' + " .<br />
"'a>' );rn" . ' -->' . "rn" . '</script>';</a>This modification will be used for one fanlisting only (just give the file a dif name to include), so I’m not too worried about receiving spam.
Oh — and I wasn’t sure whether you needed to see the whole show_join file. The code above is the only script tag in it, though.
Thanks in advance!
July 2, 2011 at 6:47 pm #14683The reason that page isn’t showing up is likely because of this line:
"document.write( '<a href="mailto:' + jsemail + '">email me</' + "You need to escape the double quotes in the anchor HTML:
"document.write( '<a href="mailto:' + jsemail + '">email me</' + "July 3, 2011 at 3:18 am #14684Thanks, amphigory — previously the title of the webpage was not loading, now it is. However, the issue still remains. I think it’s just clashing with the pre-existing javascript on my page. So if there’s any way to remove it, I’d be grateful!
July 3, 2011 at 4:04 am #14685Well… I’m not at all familiar with Enthusiast so I don’t know if those are required variables. But, can you set
$email_js = '';?July 3, 2011 at 4:34 am #14686Omg! I think I just about fainted when I saw it working!
Thank you so much! I removed the script tags from between the ‘s as you said, and it worked like a charm! ? 8D
Just an added note to anyone else who may read this thread having the same issue – once you remove the script tags you’ll need to modify the mailto: parts of the document. ^^
Thanks again, amphigory!
July 4, 2011 at 3:36 pm #14687Please bear in mind that this removes the JavaScript “protection” from email addresses listed on the members page. I think JS protection is all but useless but others may desire it, so you may wish to put a note on your fanlisting’s join page to warn them of the modification, as a courtesy? Just a thought
July 5, 2011 at 12:32 am #14688ah yes – I’ve already modified that fl’s template to completely remove the option of displaying email addresses ^^
July 12, 2011 at 9:03 am #14689Even better
-
AuthorPosts
You must be logged in to reply to this topic.




Recent Comments