Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Mar 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Call another file in downloading

    I need help on this code:

    Code:
    <div id="dl-container">
    <ul id="dl-icons">
    <li id="word-icon"><strong>Download:<br></strong><a class="fancybox" style="color: #ffffff;" href="#contact_form_pop"><img src="http://www.templatebowl.com/wp-content/uploads/2013/03/word-icon-a.png" height="38" width="38"></a>
    <div class="fancybox-hidden" style="display: none;">
    <div id="contact_form_pop">[email-download download_id="27" contact_form_id="697"]</div></div>
    
    
    </li>
    <li id="psd-icon"><a class="fancybox" style="color: #ffffff;" href="#contact_form_pop"><img src="http://www.templatebowl.com/wp-content/uploads/2013/03/psd-icon-a.png" height="38" width="38"></a>
    <div class="fancybox-hidden" style="display: none;">
    <div id="contact_form_pop">[email-download download_id="40" contact_form_id="697"]</div></div>
    
    </li>
    </ul>
    </div>
    Our download button works by entering a name and email address then, it will send the file to the email address inputted by the user. The problem is, we have two buttons on the page, one is for Word format and the other is for PSD. But everytime I download a PSD file, it calls the Word file. I don't know what's wrong. I double checked the download id of the file and there seems to be nothing wrong with the IDs. Please help me. I need to finish it today. Here's the page: http://www.templatebowl.com/5-x-7-postcard-template/ . Try and see what's wrong.

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,100
    Thanks
    23
    Thanked 594 Times in 593 Posts
    Both of your anchors go to the same place href="#contact_form_pop" This maybe your problem you do not differentiate between them.

  • #3
    New to the CF scene
    Join Date
    Mar 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    But it's suppose to go to the same anchor.

  • #4
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,100
    Thanks
    23
    Thanked 594 Times in 593 Posts
    Just wondering how contact_form_pop knows what button was pushed? And that where I would look next.

  • #5
    Senior Coder jerry62704's Avatar
    Join Date
    Oct 2007
    Location
    Springfield, IL
    Posts
    1,100
    Thanks
    13
    Thanked 87 Times in 87 Posts
    Quote Originally Posted by wella58 View Post
    But it's suppose to go to the same anchor.
    If it goes to the one and only anchor then how will it know which one invoked it?

    You can't have two IDs with the same name. You are confusing the system with the results you are seeing.
    .
    .
    ...and gladly would he learn and gladly teach

    Visit www.LiberalsWin.com for humor and the unique Bush/Obama Approval Polls

  • #6
    New Coder
    Join Date
    Mar 2013
    Location
    Indiana
    Posts
    26
    Thanks
    0
    Thanked 7 Times in 7 Posts
    You don't have to change the IDs for the popup, you nearly need to handle what is being received by the popup better with Javascript. You can change the innerHTML to do that. You may want to do a bit of research on that if it's something you're considering.

  • #7
    New to the CF scene
    Join Date
    Mar 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks so much for all your feedback. I finally got it. I assigned different values on the id.


  •  

    Posting Permissions

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