There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen blue screen boot bsod computer connection crash css dell display driver drivers email error excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop lcd linux malware network networking nvidia outlook outlook 2003 outlook express partition password printer problem ram router slow sound trojan usb video virus vista windows windows xp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
javascript help


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
aconite's Avatar
Senior Member with 173 posts.
 
Join Date: Feb 2006
Experience: Intermediate
19-Jan-2008, 11:04 AM #1
javascript help
hi,

newbie to javascript, have had some help with the javascript code but the php bit doesn't seem to be working. I am using php, as the shopping cart I am using uses php. I am using an image for the click here to order button, so would the bold bit be correct

Code:
      Package 4  £30
      <div id="service1">
       <ul>
          <li>Removal of scratches from face, hand or other complex areas</li>
           <li>Teeth whitening</li>
           <li>Merging two or more photos together</li>
           <li>Color correction of large faded areas</li>
           <li>Repair of tears</li>
          <li>Repair of creases</li>
          </ul></div>
      <a href='<?php ProductBuyLink(11); ?>' onclick="checkTerms()"><img src="../images/click-toorder.png" class="clickToOrderBtn" width="80" height="15" border="0" alt="order button" /></a></div>
If you want to have a look at the page, this is the link http://www.photorestorationexpert.co.uk/order/index.php

thanks

Last edited by aconite : 19-Jan-2008 11:06 AM. Reason: adding more content
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,250 posts.
 
Join Date: Oct 2006
19-Jan-2008, 04:02 PM #2
Function:

PHP Code:
function checkTerms(){
    var 
checkBox document.getElementById('termsAndConditions');
    if(!
checkBox.checked){
        
alert("You must accept our terms and conditions");
        
window.location "http://www.photorestorationexpert.co.uk/order/index.php#termsAndConditions";
        return 
false;
    }
    return 
true;

Link:
Code:
<a ... onclick="return checkTerms()">
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 07:20 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.