Thread: Help me please

Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Aug 2010
    Posts
    5
    Plugin Contributions
    0

    Default Help me please

    i need a little help, i'm new to php and zen cart and i want to install a pop up in jquery ui that states if you are under the age of 21 you can not enter my site.. I have the jquery script but i do not understand where to or how to install it. i read a few posts and they did not help me at all. i sell tobacco products and do not want minors not knowing the site is intended for 21 years + viewers. i tried to place it in the javascript folder and in the on load folder but it didn't work. i am also not sure where to place the buttons and text information as well.. thank you in advance. here is my jquery script, also need to know where to place my cookie to check for the answer to my original script.

    <script type="text/javascript">
    $(document).ready(function() {

    $('#test').click(function() {
    $.blockUI({ message: $('#question'), css: { width: '275px' } });
    });

    $('#yes').click(function() {
    // update the block message
    $.blockUI({ message: "<h1>Remote call in progress...</h1>" });

    $.ajax({
    url: 'wait.php',
    cache: false,
    complete: function() {
    // unblock when remote call returns
    $.unblockUI();
    }
    });
    });

    $('#no').click(function() {
    $.unblockUI();
    return false;
    });

    });
    </script>

    ...

    <input id="test" type="submit" value="Show Dialog" />

    ...

    <div id="question" style="display:none; cursor: default">
    <h1>you must be 21 years of age to enter this site. Do you agree to the terms?</h1>
    <input type="button" id="yes" value="Yes" />
    <input type="button" id="no" value="No" />
    </div>
    Last edited by casperphx; 8 Aug 2010 at 07:46 AM.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Help me please

    Read this tutorial and find the section for
    Adding Extra Javascript to a specific page

    https://www.zen-cart.com/tutorials/index.php?article=36
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Aug 2010
    Posts
    5
    Plugin Contributions
    0

    Default Re: Help me please

    i read it, but apparently to stupid to understand it. i added the jscript to the folder onload and everything else it said to do, it still wont work for me. need a step by step help i guess from point a to z. i didnt think i was this dumb. i placed

    file name: jscript_terms.js


    $(document).ready(function() {

    $('#test').click(function() {
    $.blockUI({ message: $('#question'), css: { width: '275px' } });
    });

    $('#yes').click(function() {
    // update the block message
    $.blockUI({ message: "<h1>Remote call in progress...</h1>" });

    $.ajax({
    url: 'wait.php',
    cache: false,
    complete: function() {
    // unblock when remote call returns
    $.unblockUI();
    }
    });
    });

    $('#no').click(function() {
    $.unblockUI();
    return false;
    });

    });

    in the jscript folder and then placed


    file name on_load_terms.js
    terms();

    into the onload folder.

    but can not figure out where to place the <div> buttons and text stating my popup window and also its not popping up blank either..

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Help me please

    i added the jscript to the folder onload
    This is not where it goes

    It should be in a folder named
    jscript in your template folder

    /includes/templates/your_template_name/jscript/
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Aug 2010
    Posts
    5
    Plugin Contributions
    0

    Default Re: Help me please

    i dont understand, this is where my template is located and my jscript folder is

    includes/template/template_default/jscript

    i placed the jscript in there, and then in the onload folder placed the file and text in the file onload=terms();

    but have no idea where to add my

    <div id="question" style="display:none; cursor: default">
    <h1>you must be 21 years of age to enter this site. Do you agree to the terms?</h1>
    <input type="button" id="yes" value="Yes" />
    <input type="button" id="no" value="No" />
    </div>
    with the buttons, am i doing this completely wrong, as i said before im new to this php stuff and this is my first php page..

  6. #6
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Help me please

    I am not familiar with your script but onload terms has no code for diplay that you have referenced

    You need code to display antthing
    Zen-Venom Get Bitten

 

 

Similar Threads

  1. v150 $db-Execute() issue with fields... Please please please help.
    By Ooba_Scott in forum General Questions
    Replies: 11
    Last Post: 3 Oct 2012, 09:36 AM
  2. Replies: 4
    Last Post: 1 Oct 2010, 05:09 AM
  3. Please Please HELP! Cross Sell not working... Any ideas People?
    By jorsara in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 23 Mar 2010, 12:08 AM
  4. Please anybody please help with Scrolling Sidebox Mod. in IE8
    By hcd888 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 2 Oct 2009, 03:42 AM
  5. Please help please!Premature end of script headers: index.php (null)
    By fangzhouws in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 11 Aug 2006, 06:05 PM

Posting Permissions

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