Advanced Search

Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: Problem..

  1. #1
    Join Date
    Dec 2007
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Problem..

    Hi guys,
    I have this problem and i'm hoping that someone here can help me, i'm a noob to Java, PHP etc, programing... Ok here we go.
    I have a gallery and when the users browse the gallery they can click on a link if they want to buy a certain photo. If they click on the "Buy this print" link a page called "prints.htm" is loaded, on that page there's a drop-down list to chose wich photo they want to buy, when they have chose the photo a small thumbnail is shown to the left, that's fine, but my problem is, when the user has clicked on a certain photo they want to buy, i want that certain photo show up as a thumbnail directly, instead of chose it from the drop-down list, kind of hard to explain.

    Surf away to;
    www.mikaelraymond.com
    On the index file there's 3 "Latest Additions" pictures, if you click on one them and then click on "Buy This Print" then you're taken to the print.htm file, and there you see what my problem is.

    Best wishes,
    Mikael
    Last edited by gitarr_mannen; 12-19-2007 at 08:11 AM.

  2. #2
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    787
    Thanks
    85
    Thanked 2 Times in 2 Posts

    Default

    Again, please, with a link to what you already have.

  3. #3
    Join Date
    Dec 2007
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ops, sorry for that..
    Ok, i uploaded my site and here's the address;
    www.mikaelraymond.com
    On the index file there's 3 "Latest Additions" pictures, if you click on one them and then click on "Buy This Print" then you're taken to the print.htm file, and there you see what my problem is.

    Best whishes,
    Mikael

  4. #4
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,484
    Thanks
    4
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    You just need to send the "name" attribute to the prints.htm page.

    Everything is set up to accept it, just use $_POST to set the name value and then use $_POST to get the attribute on the prints.htm page.

    The site is nice, and the art is fab, but if I may make one suggestion:

    make your links NOT grey. It took me 4 minutes to click on the "buy this print" link, and that was WITH your instructions above.

    If you want to sell, make it easy for the buyer to buy
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  5. #5
    Join Date
    Dec 2007
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for your reply,
    Can you please give me some examples on how the code would look like?
    Yes, i know about the bright link color, i will change that as soon as i get the harder parts done..

  6. #6
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,484
    Thanks
    4
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    well.. JS is NOT my strong point, but it would be something like this:

    on the buy link:

    Code:
    <form action="part2.html" method="post">
    <a href= "prints.html" name=image_thumb value="image1">Click here to buy print</a>
    </form>
    and in the JS script on prints.html:

    Code:
        <script type="text/javascript">
    function showimage(t)
    {
    if (!document.images)return;
    document.images[t.getAttribute("name").replace("select","pics")].src=t.options[t.selectedIndex].value
    else{ document.images = <?php echo $_POST["image_thumb"]; ?>
    }
        </script>
    basically you tell the script if nothing is selected from the drop down, then use the posted attribute for "image_thumb" which you have given a value on clicking the link previous.
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  7. #7
    Join Date
    Dec 2007
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for taking your time trying to help me here, but sorry to say, i can't get this to work...
    I get this validate error in Dreamweaver;
    The tag: "a" doesn't have an attribute: "value" in currently active versions.
    Hmm, if i understood the code right, i change the "image1" in the buy code to the name of the corresponding name in the drop down in the "prints.htm" file?

  8. #8
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,484
    Thanks
    4
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    yes and the "image_thumb" to whatever your image category is as well.

    I didn't realize you were using Dreamweaver.. that is probably your first mistake
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  9. #9
    Join Date
    Dec 2007
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I give it another try..
    Oh, and my second mistake was that i didn't learned Java programing.. :-)

    And I thought that Dreamweaver was great app?!
    Wich software do you recomend?

  10. #10
    Join Date
    Dec 2007
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    bugger...can't get it to work how hard i try..... :-(

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
  •