Results 1 to 4 of 4

Thread: Duplicate current code i use

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

    Default Duplicate current code i use

    Good morning,
    Here is an example page in question https://www.theremotedoctor.co.uk/ka...llto=selection

    You will see that there are two buttons,CLICK TO ORDER & CLICK FOR PRICE

    If you press CLICK FOR PRICE before you make a selection from the ITEM SELECTION on the right then you will see a red message appear.

    This is how it should work because you need to select an item from the ITEM SELECTION on the right THEN press CLICK FOR PRICE.

    Now looking at CLICK TO ORDER i would like the same red message to be shown if NO item was selected from the ITEM SELECTION.
    Currently if you just press CLICK TO ORDER then when you complete the order form the part number is not populated because you did not select the ITEM.

    Sorry i am not to clever at explaining things but basically if either button is pressed without selecting from the ITEM SELECTION then show red message.

    Below is the code in use at present.

    Code:
    <!-- main content area -->   
    <div class="wrapper" id="main"> 
        
    <!-- content area -->    
    <section id="content" >
    
    <h1><img src="m-images/dr-logo-speech-bubble.png" alt="Honda car key remote programming" id="mainImage"  /></h1>
    
    <h1 ><a id="btnOrder1" href="https://form.jotformeu.com/form/62115565434352" target="_self">
    
    <img src="m-images/order-logo.png" alt="order from the remote doctor website"  class="buttonshadow"></a>
    
    <a href="javascript:;">
    
    <span id="warning">*WARNING*<br><br>PLEASE MAKE AN ITEM SELECTION FIRST</span>
    
    <img src="m-images/price-logo.png" alt="remote doctor information button"  class="tooltip border buttonshadow" ></a></h1>
    
    </section>
    <!-- #end content area -->

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

    Default

    Hi there theremotedr,


    good evening to to you.

    Try these modifications...

    HTML

    Change, where appropriate, these items...

    Code:
    
    <a id="btnOrder1" href="https://form.jotformeu.com/form/62115565434352" target="_self"><img src="m-images/order-logo.png" alt="order from the remote doctor website"  class="buttonshadow"></a>
    ...to this...

    Code:
    
    <a id="btnOrder1" href="https://form.jotformeu.com/form/62115565434352" target="_self">
     <span id="warning1">*WARNING*<br><br>PLEASE MAKE AN ITEM SELECTION FIRST</span>
     <img src="m-images/order-logo.png" alt="order from the remote doctor website"  class="buttonshadow">
    </a>

    CSS and JavaScript

    Change your "latestChanges.css" file and your "warning.js" file
    with those in the following attachments.

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

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

    Default

    Many thanks worked a treat.

  4. #4
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,289
    Thanks
    1
    Thanked 237 Times in 232 Posts

    Default


    No problem, you're very welcome.

    coothead
    ~ the original bald headed old fart ~

Similar Threads

  1. centre horizontal list with current code
    By jonnyfreak in forum CSS
    Replies: 4
    Last Post: 07-05-2014, 10:04 AM
  2. Duplicate a Div
    By Clayf700 in forum JavaScript
    Replies: 1
    Last Post: 12-11-2010, 06:57 AM
  3. Replies: 2
    Last Post: 08-30-2009, 04:50 PM
  4. drag and drop code duplicate the image leaving the original
    By hellpme in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 07-27-2009, 07:48 PM
  5. Replies: 4
    Last Post: 09-10-2008, 04:19 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
  •