Hello. I'm just trying to do a basic alert() whenever my script runs successfully I can get a success alert to pop whenever my script is run, but it basically always says it's successful even when I mess everything up. I would like to only display an output when the script did not finish executing because it broke.
That is, unless there's a better way - My script is taking a RTF file, merging fields from mysql, taking that attachment and e-mailing it with CDO. Best way I can think to get this done is to make the script break in php if anything goes wrong then display the success alert only if everything finished.
Any help you can provide would be very useful! I have a particular tab that I need to load 'onclick' because of issues with speed so I've implemented an ajax tab:
This works great...except I have no clue how to pass a variable to load.php...just one variable is all i need...i tried to append it to the url as such: ?code=xxxxxxx and it does not work. I have a feeling my answer lies in javascript of which I am somewhat inept...The below is what I'm using for all of the tabs to submit on change, etc.
<script type="text/javascript">
$(document).ready(function(){
$('#tabs').tabs({
select: function(event, ui){
// we want to store the values from the form input box, then send via ajax below
var code = $('#code').attr('value');
var tam_name = encodeURIComponent($('#tam_name').attr('value'));
var title = $('#title').attr('value');
var first= $('#first').attr('value');
var middle= $('#middle').attr('value');
var last= $('#last').attr('value');
var suffix= $('#suffix').attr('value');
var designation= $('#designation').attr('value');
var gender= $('#gender').attr('value');
var birthday_month= $('#birthday_month').attr('value');
var birthday_day= $('#birthday_day').attr('value');
var birthday_year= $('#birthday_year').attr('value');
var social_security_number= $('#social_security_number').attr('value');
var home_phone= $('#home_phone').attr('value');
var office_phone= $('#office_phone').attr('value');
var fax= $('#fax').attr('value');
var email= $('#email').attr('value');
var specialty= $('#specialty').attr('value');
var specialty_percent= $('#specialty_percent').attr('value');
var subspecialty= $('#subspecialty').attr('value');
var subspecialty_percent= $('#subspecialty_percent').attr('value');
var rating_status= $('#rating_status').attr('value');
var rating_state= $('#rating_state').attr('value');
var rating_county= $('#rating_county').attr('value');
var rating_deliveries= $('#rating_deliveries').attr('value');
var home_address1= $('#home_address1').attr('value');
var home_address2= $('#home_address2').attr('value');
var home_city= $('#home_city').attr('value');
var home_state= $('#home_state').attr('value');
var home_zip= $('#home_zip').attr('value');
var mailing_address1= $('#mailing_address1').attr('value');
var mailing_address2= $('#mailing_address2').attr('value');
var mailing_city= $('#mailing_city').attr('value');
var mailing_state= $('#mailing_state').attr('value');
var mailing_zip= $('#mailing_zip').attr('value');
var billing_address1= $('#billing_address1').attr('value');
var billing_address2= $('#billing_address2').attr('value');
var billing_city= $('#billing_city').attr('value');
var billing_state= $('#billing_state').attr('value');