Jump to content

jwwceo

Members
  • Posts

    212
  • Joined

  • Last visited

Posts posted by jwwceo

  1. I have a slideshow on my website which needs to load about 25 images which are 640 by 480....so it takes a few seconds. While loading these images are splashed in the middle of the slide show area and it looks pretty bad.

     

    I'd like to hide this DIV until the page is done loading and replace it with a little loading icon animated gif.

     

    I know I will need to probably cover one DIV with another one, or hide the slideshow div and replace it with the animated gif, until the page is done loading. But I an not too familair with Javascript...so any pointers in the right direction would help out a ton.

     

    Best,

     

    James

  2. I have this query(below), which I am using to update a field in my database. I am doing this in phpMyAdmin. But I have to run it 17 times, once for each color, times and would like to merge all queries into one so in the future I can run it just once.

     

    Here's an individual query:

     

    UPDATE xcart_variants, xcart_class_options, xcart_variant_items
    
    SET xcart_variants.color_id ='ffffff'
    WHERE xcart_variants.variantid = xcart_variant_items.variantid
    AND xcart_variant_items.optionid = xcart_class_options.optionid
    AND xcart_class_options.option_name = 'Black'
    

     

    and here's what I have for a multiple query:

     

    UPDATE xcart_variants, xcart_class_options, xcart_variant_items
    
    SET xcart_variants.color_id ='432c00'
    WHERE xcart_variants.variantid = xcart_variant_items.variantid
    AND xcart_variant_items.optionid = xcart_class_options.optionid
    AND xcart_class_options.option_name = 'Brown'
    
    SET xcart_variants.color_id ='020950'
    WHERE xcart_variants.variantid = xcart_variant_items.variantid
    AND xcart_variant_items.optionid = xcart_class_options.optionid
    AND xcart_class_options.option_name = 'Navy'
    
    SET xcart_variants.color_id ='000000'
    WHERE xcart_variants.variantid = xcart_variant_items.variantid
    AND xcart_variant_items.optionid = xcart_class_options.optionid
    AND xcart_class_options.option_name = 'Black'
    
    SET xcart_variants.color_id ='ffffff'
    WHERE xcart_variants.variantid = xcart_variant_items.variantid
    AND xcart_variant_items.optionid = xcart_class_options.optionid
    AND xcart_class_options.option_name = 'White'

     

    Any ideas why I am getting errors??

     

    James

  3. I got it working using this. I was failing to list all the tables in the UPDATE line, even if they aren't being updated

     

    UPDATE xcart_images_W, xcart_variants, xcart_variant_items, xcart_class_options
    
    SET xcart_images_W.image_path = 'test1.png' 
    WHERE xcart_variants.variantid = xcart_variant_items.variantid 
    AND xcart_variant_items.optionid = xcart_class_options.optionid 
    AND xcart_variants.variantid = xcart_images_W.id 
    AND xcart_variants.productid = '16150' 
    AND (xcart_class_options.option_name = 'Black' 
    OR xcart_class_options.option_name = 'Gold'
    OR xcart_class_options.option_name = 'Navy')

  4. I made the changes you said and I get this error. I really appreciate the help with this..

     

    #1066 - Not unique table/alias: 'variantid'

     

    Here's what I used...

     

     UPDATE xcart_images_W 
    INNER JOIN xcart_variants.variantid ON xcart_variant_items.variantid 
    INNER JOIN xcart_variant_items.optionid ON xcart_class_options.optionid 
    INNER JOIN xcart_variants.variantid ON xcart_images_W.id 
    SET image_path = 'test.png' 
    WHERE xcart_variants.productid = '16150' 
    AND xcart_class_options.option_name = 'Black'  

  5. I have another tricky query which I can't seem to get working:

     

    There are 4 tables, with various links to one another. I want to update the value image_path in one table, based on the values from 2 other tables. The two values for this particluar query are

     

    productid: 16150

    option_name: Black

     

    Here is the code I have so far:

     

    Thanks!!!

     

    
    UPDATE xcart_images_W SET image_path = 'test.png'
    
    INNER JOIN xcart_variants.variantid ON xcart_variant_items.variantid
    INNER JOIN xcart_variant_items.optionid ON xcart_class_options.optionid
    INNER JOIN xcart_variants.variantid ON xcart_images_W.id
    
    WHERE
    
    xcart_variants.productid = '16150' AND
    xcart_class_options.option_name = 'Black'
    
    
    
    
    
    

  6. In addition to my last post...this is what I have been trying and getting errors on:

     

    UPDATE xcart_variants SET color_id ='ffffff'
    
    INNER JOIN xcart_variant_items.variantid ON xcart_variants.variantid
    INNER JOIN xcart_class_options.optionid ON xcart_variant_items.optionid
    
    WHERE
    
    xcart_class_options.option_name = 'Black'

  7. To simplify the problem, we want to change a hex color value in a table based on the text value (ie. Black) that is in another table. These tables do not relate to one another, except through a third table.

     

    The table/field we are trying to update is: xcart_variants.color_id

    based on criteria in this table: class_options.optionname

     

    The value we wish to change it to will change from time to time, so for purposes of this thread, I suppose we can just use a variable "FFFFFF".

     

    Best,

     

    James

     

     

     

     

  8. I am trying to write a JOIN query but it doesn't seem to be working. I get error, #1109, saying that one of my tables doesn't exist.

     

    Plus, once I get this working, I am a but confused how I can pass a criteria into this query since I am assuming that would also be done in the WHERE clause.

     

    Best,

     

    James

     

    SELECT xcart_variants.color_id FROM xcart_variants 
    WHERE
    
    xcart_class_options.optionname
    xcart_variants.variantid = xcart_variant_items.variantid
    AND
    xcart_variant_items.optionid = xcart_class_options.optionid

  9. I want the minimum rows to be five...but to fill in as many as can fit after that...so if a person has their browser open all the way...they might get 8 or 9 or 10 across. And as the minimize their browser window...it will reduce back to a minimum of 5.

     

    James

  10. Right now I have an image gallery that uses a counter to count the columns in the gallery and when it gets to 5, begin a new row. Pretty typical stuff...

     

    but I would like to allow my gallery to expand 100% across the screen with a minimum width of 5 images. So as the browser window expands, so does my gallery.

     

    Right now my data is in tables, which I think makes this hard maybe. I was thinking maybe the best way was to have a table that is 100% across and then the individual images and their related text are in DIV's?????

     

    But how do I make the minimum 5 columns across??

     

    Thanks in advance!

     

    James

  11. Hello,

     

    I am having trouble with using Javascript to change the background color of a TD. This is supposed to happen when a user changes a pulldown...

     

    here is the relevant javascript code:

     

    window.document.jwv.bgColor = "#f3f3f3";

     

    and the HTML

     

    <td name="jwv" valign="bottom" width="200" height="162">
    <img id="product_thumbnail">
    </td>

     

    I get an error saying that jwv has no properties.

     

    The TD is rendered before the Javascript runs.

     

    Any ideas??

     

    James

  12. Hello,

     

    I am making a page where I want to have a little top corner ad in the top left corner of the page. But I don't want it to affect the other stuff in the page. How do I use a floating div or some kind of CSS manipulation to make sure it doesn't affect the rest of my page.

     

    James

  13. Hello,

     

    I am working on a site that wants to have a really cool browse feature. The browse page will be very simple, with a large image right in the center of the page. To the left and right of the large image will be arrows. When you click on the arrows, the next product to the right or left will SLIDE in without the page refreshing.

     

    Siilarly, at the bottom of the page will be a gallery of images, maybe 5 across in one row. There will be left and right arrows next to this as well. When you click on the arrows, the entire 5 images will roll the the left or right as the new images come in. When you click on the gallery images it is swapped for the main image, again without a page refesh.

     

    Any idea of cool scripts to do this. If there are none out there I would be willing to pay to have somebody write something in Ajax or JavaScript that would do the trick.

     

    James

    805.426.9563

  14. So I am developing a series of e-commerce sites...they are all basically the same site, but each one is tailored to a different segment of a larger market. For example purposes only, say I was setting up a pet store...and I wanted to have one site specialized for dogs, one for cats, and one for birds, all different domains. But I am trying to have just one back-end system...so my employees can fill the orders from the same back-end order management.

     

    Is it possible to write some code in a single header file that would look for the URL requested and then pull up the right logo, maybe a different style sheet, image directory path, and the right products.

     

    But basically it would all be the same program and I could add new sites as I saw fit and make changes in one place that would affect all the sites.

     

    Thanks

     

    James

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.