Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2006
    Location
    North Carolina
    Posts
    280
    Plugin Contributions
    0

    Default Need help locating files to modify attribute setup

    Hi everyone - I'm trying to add some code and I cannot locate exactly where and how to insert attribute code:

    1 - How do I insert onclick="return checkdl()" into my tpl_modules_attributes.php file like this example below?:

    <input type="radio" name="id[20]" value="91" checked="checked" id="attrib-20-91"onclick="return checkdl()" /><label class="attribsRadioButton one" for="attrib-20-91">Select format</label><br />

    2 - What file and how do I insert this line of code into the header area of the product info page so I can call this javascript file?

    <script type="text/javascript" src="includes/modules/pages/product_info/jscript_callbacks.js"></script>


    thanks everyone
    Jeff Michaels,
    pres of Musical Creations Ltd.

  2. #2
    Join Date
    Aug 2006
    Location
    North Carolina
    Posts
    280
    Plugin Contributions
    0

    Default Re: Need help locating files to modify attribute setup

    I figured out how to do step 2 myself. Didn't realize that all I had to do was place the .js file into the proper folder and it would appear and work correctly on the product_info page
    Jeff Michaels,
    pres of Musical Creations Ltd.

  3. #3
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Need help locating files to modify attribute setup

    With the attributes the file you are going to need is modules/attributes.php.

    It might be easier (but possibly not) to add an event listener in an external javascript file. Something like:

    Code:
    document.getElementById('id[20]').onclick  = function(){return checkdl()};
    Even easier with jQuery if you have that on the go.

  4. #4
    Join Date
    Aug 2006
    Location
    North Carolina
    Posts
    280
    Plugin Contributions
    0

    Default Re: Need help locating files to modify attribute setup

    Mike, please see a private message I sent you

    thanks
    Jeff Michaels,
    pres of Musical Creations Ltd.

  5. #5
    Join Date
    Aug 2006
    Location
    North Carolina
    Posts
    280
    Plugin Contributions
    0

    red flag Re: Need help locating files to modify attribute setup

    I got the attribute disable to finally work tonight, BUT even though I want 1 through 4 out of 6 radio buttons to disable attributes displaying lower on the product info page, only ONE of those buttons is working correctly. If I have 4 pieces of javascript code assigning one to each button, only the lowest one in the code list will actually work.

    Really confused here.....

    Here is the sample website to view what I'm trying to accomplish and view the source if needed.
    http://download.pocketsongs.com/inde...s_id=100001101

    Here is the jscript_callbacks.js file with the FOUR dlbutton = functions at the top. In this example code, only attrib-1-4 actually disables the attributes (or the button labeled 4 - wmv video download [PC/Zune] ( +$1.00 ).

    I also tried four different .js files, each with one attrib-1-1 or attrib-1-2, etc and it didn't work either. Only the 4th one works on the page too.

    I cannot figure out a way to combine those code snippets either.

    Any help on this so all 4 (out of 6) radio buttons are disabling the attributes would be appreciated.



    function checkdl() {
    dlbutton = document.getElementById("attrib-1-1");
    dlbutton = document.getElementById("attrib-1-2");
    dlbutton = document.getElementById("attrib-1-3");
    dlbutton = document.getElementById("attrib-1-4");
    if (dlbutton == null) {
    return true;
    }

    checked = dlbutton.checked;
    if (checked) {
    document.getElementById("attrib-25").disabled = true;
    document.getElementById("attrib-26").disabled = true;
    document.getElementById("attrib-29-30").disabled = true;
    document.getElementById("attrib-29-30").value= "";
    } else {
    document.getElementById("attrib-25").disabled = false;
    document.getElementById("attrib-26").disabled = false;
    document.getElementById("attrib-29-30").disabled = false;
    }
    return true;
    }
    Jeff Michaels,
    pres of Musical Creations Ltd.

 

 

Similar Threads

  1. Need Help Locating Text To Change
    By JusMeJim in forum Templates, Stylesheets, Page Layout
    Replies: 13
    Last Post: 3 Mar 2013, 10:28 AM
  2. locating files to change
    By irishshopper in forum Basic Configuration
    Replies: 2
    Last Post: 1 Nov 2010, 05:07 PM
  3. Need help locating a file
    By lapowerlifter242 in forum General Questions
    Replies: 2
    Last Post: 6 Nov 2007, 04:05 AM
  4. Need help locating image or font.
    By madk in forum General Questions
    Replies: 2
    Last Post: 11 Jul 2006, 07:11 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