Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Existing code needs altering to suit

  1. #1
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default Existing code needs altering to suit

    Afternoon people,
    Here is a page in question http://www.theremotedoctor.co.uk/acc...llto=selection

    Please select *CLONING SERVICE" from the Item selection list.
    Now you will see the selection image has been loaded.
    When you place your mouse "Pc" or click"Phone" on the CLICK FOR Price button a message prompt pops up.
    So far this is all working correctly BUT the altering of the code is from here on.

    On this page the CLICK TO ORDER button is not required,so either hide it or remove it
    Must remember that the CLICK TO ORDER button is used on my other pages.
    Depending on the action taken then have the CLICK FOR PRICE central.

    I was trying to remove / hide the CLICK TO ORDER button BUT then the message prompt did not show for when you selected the CLICK FOR PRICE button.

  2. #2
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,920
    Thanks
    2
    Thanked 267 Times in 262 Posts

    Default

    Hi there theremotedr,

    do you want the the "CLICK TO ORDER button to be hidden only when the
    *CLONING SERVICE* button itself is clicked or entirely from the page itself?

    coothead
    ~ the original bald headed old fart ~

  3. #3
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    Hi,

    I think it would be nice for,
    "CLICK TO ORDER" button to be hidden only when the *CLONING SERVICE* button itself is clicked

    This would be just for customers information AND NOT being able to "CLICK TO ORDER" as you will not be able to order anything.

  4. #4
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,920
    Thanks
    2
    Thanked 267 Times in 262 Posts

    Default

    Hi there theremotedr,

    checkout the attachment.

    coothead
    Attached Files Attached Files
    ~ the original bald headed old fart ~

  5. #5
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    Great.
    Could you tidy this redundant code please.
    The Ford020 is not required as it was going to self populate a form once the CLICK TO ORDER was pressed.
    The Ford020 is used on another page but they wont be affected when cleaning this code.
    Ive tried but i either dont get the pop up or other.

    Code:
    <li><a href="javascript:" id="cloning" onclick="replaceMainImage('m-images/photos/suzuki-cloning-service.png', 'Ford020','<b>** Transponder Chip Cloning **</b><br>For Chips Shown In Listing<br>Please Contact Me For Price<br><b>Royal Mail Next Day</b><br></b><b>Special Delivery By 1pm Used</b><br><scan class=drColor>The Remote Doctor</scan>')">** CLONING SERVICE **</a></li>

  6. #6
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,920
    Thanks
    2
    Thanked 267 Times in 262 Posts

    Default

    Hi there theremotedr,


    if you want to safely remove the 'FORD020' from here...

    Code:
    
           .........service.png', 'Ford020','<b>** Trans..........
    ...then do it like this...

    Code:
    
           .........service.png', '       ','<b>** Trans..........
    Note, though, that you do not have to leave all that white-space.

    coothead
    ~ the original bald headed old fart ~

  7. #7
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    Coothead,
    Ive made an edit to the js file as i changed its text on the button.
    It works fine & the button text is now ** CLONING SERVICE **

    Would i be messing you around if i was to ask for this.
    Once you select ** CLONING SERVICE ** the photo is loaded & the CLICK TO ORDER button does not show which is spot on.
    The changed would be,as opposed to showing the current CLICK FOR PRICE button show the new button CLICK FOR INFO to be shown instead.

    I thought it might make sense to have CLICK FOR INFO as opposed to CLICK FOR PRICE seeing no price is mentioned ?
    If you think this is me being to fussy then i will leave it and go with whats currently in use.
    If you think it makes sense then please make the change.

    Code in use so far due to me text change.
    Code:
    (function(){
       'use strict';
        var a=document.getElementById('secondary-navigation').getElementsByTagName('a');
    for(var c=0;c<a.length;c++) {
        a[c].addEventListener('click',
     
    function() {
    if(this.firstChild.nodeValue==='** CLONING SERVICE **'){
        document.getElementById('btnOrder1').style.display='none';
     }
    else {
        document.getElementById('btnOrder1').style.display='inline';
       }
      },false);
     }
    }());
    CLICK FOR INFO path, http://www.theremotedoctor.co.uk/m-images/info-logo.png

    Many Thanks,
    I await your respected opinion.

  8. #8
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,920
    Thanks
    2
    Thanked 267 Times in 262 Posts

    Default

    Hi there theremotedr,

    I agree that "CLICK FOR INFO" as opposed to "CLICK FOR PRICE"
    makes more sense and it is very easy for you to amend the code.

    coothead
    ~ the original bald headed old fart ~

  9. #9
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    I wasnt sure if the edit would be in the js file or on the actual page itself.

  10. #10
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    Just to clarify,
    I was going to use the CLICK FOR PRICE for the other buttons and CLICK FOR INFO only for the CLONING SERVICE button.

    I think your reply regarding me changing the code was to use the CLICK FOR INFO on all the buttons.

    Correct ?

Similar Threads

  1. Resolved Edit to existing working code required
    By theremotedr in forum JavaScript
    Replies: 26
    Last Post: 01-04-2017, 12:28 PM
  2. Replies: 3
    Last Post: 09-14-2015, 10:08 AM
  3. Replies: 0
    Last Post: 10-01-2009, 11:53 AM
  4. Altering CSS with JS
    By freddygusto in forum JavaScript
    Replies: 1
    Last Post: 04-19-2008, 03:05 AM
  5. Dynamically Altering CSS
    By Bonza in forum CSS
    Replies: 0
    Last Post: 01-18-2007, 03:02 PM

Bookmarks

Posting Permissions

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