Jump to content

IanArcher

Members
  • Content Count

    115
  • Joined

  • Last visited

Community Reputation

1 Neutral

About IanArcher

  • Rank
    Member
  • Birthday 05/14/1990

Previous Fields

  • Languages
    PHP, HTML

Profile Information

  • Location
    The Bahamas
  • Interests
    Visual FX/Motion Graphics, PHP
  1. Ok, using this setup or building off of it (because i've never used AJAX before) how would I implement that? If possible, can you provide some coding snippets?
  2. I'm writing an application using PHP and MySQL that is a TV Guide/TV Listings to pull the results of the following fields: id – int(11) name – varchar(255) chan_position – int(3) src_image – varchar(255) time – varchar(255) title – varchar(255) date – varchar(25) This is the code I've tried so far that basically displays all results as a table: <?php require('db.php'); ?> <div class="container"> <? //Start table echo "<table id='guide'>"; echo "<th>Channel</th>"; echo "<th>Title</th>"; e
  3. You're right, It's pretty tricky, but I managed to achieve what i wanted with this: <script type="text/javascript" language="javascript"> window.onload = function() { $('.form_input_select[name="Country[]"]').attr("value","PSC"); /*$('.form_input_select[name="REGION[]"]').html('');*/ /*$('.form_input_select option[value=""]').attr("selected","selected");*/ $('.form_input_select[name="Country[]"]').live('change', function(e) { var pay = $(this).val(); $.get('/m/events/home/?ajax=state&
  4. I commented out those lines of code: /*$('.form_input_select[name="REGION[]"]').html('');*/ /*$('.form_input_select option[value=""]').attr("selected","selected");*/ $('.form_input_select[name="Country[]"]').live('change', function(e) { var pay = $(this).val(); $.get('/m/events/home/?ajax=state&country='+pay, {}, function(r) { $('.form_input_select[name="REGION[]"]').html(r); }); }); $('.form_input_select[name="REGION[0]"]').html(''); /*$('.form_input_select option[value=""]').attr("selected","selected");*/ $('.form_input_select[name="Country[0]"]').live('cha
  5. In essence, PHP is putting out the list of options to the dropdown, but the person before used this javascript code to work with the Country dropdown. Before the Region dropdown was a standalone field filled with options from the database using PHP. And on a slower connection, you can see the pre-populated value that the user has chosen for their region, until the page is finished loading and the Javascript overwrites it to be blank. I only want the javascript to stop doing that until the Country menu is changed. Does that look possible in the code?
  6. Thanks for the response, there is an existing code for this on the site i'm doing it for, i was just thinking of reinventing it. Here it is, i've highlighted the part i'm referring to: <script type="text/javascript"> var oBxUserStatus = new BxUserStatus(); oBxUserStatus.userStatusInit('<bx_url_root />', __is_profile_page__); /** * Zehair : */ $(document).ready(function() { /*** Region Code Starts Here ***/ $('.form_input_select[name="REGION[]"]').html(''); $('.form_input_select option[value=""]').attr("selected","selected"); $('.form_input_select[name="Country[]"
  7. Hello,I need a some assistance with this javascript/jquery script.I have a page where Every Region/Province/State is a MySQL table called `States`Organization: There is a dropdown menu called Province, that has all these Regions in it. I'm trying to make it so that when a user selects a country from the Country dropdown menu: <select add_other="" multiplyable="true" class="form_input_select" name="Country[]"> The Province drop-down menu below it runs a query to show all States/Provinces that belong to the Country selected and filters/strips out the others that don't. <select ad
  8. Agreed, also Apple iPhone Mail doesn't use text/html Content, it uses text/plain. No matter where you add a photo into the body as well, no image tag will show up. Just the photo's Content headers. The most logical thing to do would be just to extract the plain text from the body. I considered writing a script to create img tags where those photo insertions should be, but that would require appending the parts together somehow, set a default image size say 400x350 (But that presents even more complications), and changing the header to text/html. But that literally seems near impossible to do a
  9. I managed to get around this and successfully deal with this image looping & image naming process by using a recently published class found here:http://www.electrict...ge-attachments/ and followed up that class by using it as an include in the script that creates variables such as $text_part, $html_part, and wrote the following: /**** The below sequence manages IMAGE Tags in E-mail are supplied by direct URL links ****/ if (preg_match_all('/<img\s+([^>]*)src="http(s)?:\/\/(.*)"/i', $emailMessage->bodyHTML, $matches)) { echo '<br />Detected E-mail Client uses URL lin
  10. Wow to be honest, i really have no idea where to start off writing something for that. Again, not asking to be spoonfed, but maybe some example code please?
  11. How could i start to write something like that? Any specific functions>? Because this sounds similar to the example code you gave for the $fname = ''; $cid = '';
  12. I wrote something to deal with filenames in the MIME headers that causeuse individual names like that, which can cause overwriting, no where i need to save the attachment with that filename that has been modified is the issue. This is somehwere earlier in the script where attachments and filenames for them are processed: // DECODE DATA $data = ($partno)? imap_qprint(imap_fetchbody($mbox,$mid,$partno)): // multipart imap_body($mbox,$mid); // not multipart // Any part may be encoded, even plain text messages, so check everything. if ($p->encoding==4) $data = quoted_printable_de
  13. Another realization i had is that, because the script i'm using to replace the src attribute's value of an image tag with that of the filename for the CID element in the MIME headers, once a filename is renamed, the replace will be useless if the file that has been saved has been renamed. So the image tag's src won't be pointing to an actual file anymore
  14. Images are saved using: // process attachments foreach ($attachments as $imageFilename => $data) { // places all attachments in the directory defined by $aSubject file_put_contents("$aSubject/" . $imageFilename, $data); } Will that be an issue or just follow what you suggested?
×
×
  • Create New...