Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4588986
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:00:00+00:00 2026-05-21T22:00:00+00:00

I’m trying to place a link on a page that will pop up a

  • 0

I’m trying to place a link on a page that will pop up a form for users to share the page via email…

  <a href="javascript:function()"><img src="images/email.jpg"></a>

  <div id="tellfriend">
    <form id='tellafriend_form' method="post" onsubmit="return executeOnSubmit();"
    action="sharemail.php" name="tellafriend_form">
      <label for="name">Your Name:</label>
        <input class="std_input" type="text" id="name" name="name" size="40" maxlength="35" value="">
      <label for="to">Recipient's Email:</label>
        <input class="std_input" type="text" id="to" name="email" size="40" maxlength="35">
      <label for="message">Message:</label> 
      <textarea id="message" name="message" rows="18" cols="40">
message here</textarea>
        <input type="submit" onclick="javascript: pageTracker._trackPageview('/share/wf360');" name="submit" class="form_but" value="Submit">
    </form>
  </div><!-- #tellfriend -->

here’s the javascript I’m using (in addition to jQuery):

<script> 
jQuery.fn.fadeToggle = function(speed, easing, callback) {
return this.animate({opacity: 'toggle'}, speed, easing, callback);  
};

$(document).ready(function() {
    $('#tellfriend').hide();
    $('a.email, #tellfriend a.close').click(function() {
    $("#tellfriend").fadeToggle('slow');
  });
}); 
</script>
<script type="text/javascript">
function executeOnSubmit()
{
alert('Email has been successfully sent. Thanks for sharing!');
}
</script>

I’m not sure why it’s not working: the form isn’t popping up.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T22:00:01+00:00Added an answer on May 21, 2026 at 10:00 pm

    It appears you are trying to replace the already existing fadeToggle() function.

    Also, the existing fadeToggle() function does not accept 'toggle' as a value for opacity. Quoted from the jQuery API page:

    .fadeToggle() works on the same principle as .fadeOut() and .fadeIn(). Like .fadeOut(), .fadeToggle() will fade elements out if they are visible; like fadeIn(), it will fade elements in if they are hidden. Even if an element begins with opacity 0, if it takes up space in the document (i.e. it has a height or width), it isn’t considered hidden. The same is true for an element with visibility: hidden. You can use .fadeTo() or .animate() to fade an element from one opacity to another without affecting its display property. If you do that, however, an element that initially has display: none won’t become visible just because you’re animating the opacity. Hope that helps.

    So try removing the function you added at the beginning and it looks like the rest of your code should be okay.


    Update:

    After looking at your site, it appears you have two copies of jQuery, v1.4.2 (which doesn’t have fadeToggle() and v1.5.2 which does have it. But you are loading v1.5.2 after a lot of other scripts have loaded… I get an error on firebug of “$ is not a function” because of this. So, try completely replacing v1.4.2 (the very first script tag) with v1.5.2…. and get firebug 😉

    And actually, the script does work – but other scripts are probably broken due to the above reasons. The form pops up WAY at the top next to the first image. You’ll need to change the position from absolute to relative and adjust the left to around 130px in the CSS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.