Web Analytics Made Easy -
StatCounter Popup using like naming convention - CodingForum

Announcement

Collapse
No announcement yet.

Popup using like naming convention

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • justame
    replied
    poot...
    "quote...ضkii - formerly pootergeist...endquote"

    heyyy did/do you just a know® prince??? lol...

    Leave a comment:


  • ضkii
    replied
    weird - it wrote in a smilie code :P

    document.write('<a href="javascript: popme(''+basefolder+imges[j]+'_thumb.jpg"><img src="'+basefolder+imges[j]+'.jpg" border="0"></a>');
    }

    without the space in javascript: popme

    Leave a comment:


  • ضkii
    replied
    You could alternatively reverse the way you look at the needs
    and use doc writes to do most

    PHP Code:
    basefolder "mysite/images/lizards/";
    imges = new Array("yellow","red","blue","ghecko");

    function 
    popme(imgname) {
    win window.open(basefolder+imgname+'.jpg','win','width=440,height=340,resizable');
    win.focus();
    }

    for (
    j=0;j<imges.length;j++) {
    if (
    j=2) {document.write('<br>');}
    document.write('<a href="javascript:popme(\''+basefolder+imges[j]+'_thumb.jpg"><img src="'+basefolder+imges[j]+'.jpg" border="0"></a>');

    Leave a comment:


  • justame
    replied
    Originally posted by Dave Clark
    OK?
    dave...
    just a yep® hehehe...

    Leave a comment:


  • justame
    replied
    Originally posted by Dave Clark
    with this IMG tag content:

    <img src="/pictures/envior_pics/lizards/saurobes_thumb.jpg"
    width="175" height="97" onClick="return popupImage(this);">
    /me just a whispers® to dave...
    ummm does netscrap just a support® the onClick in the 'img' tag??? /me doesnt seem to remember thinkin' it does??? /me thinks it hasss to be in the <a href="#" onClick="return popupImage(this);">your thumb here</a>

    Leave a comment:


  • togo
    replied
    Re: Re: Re: Re: Popup using like naming convention

    Originally posted by Dave Clark


    OK. Let's see what your code, for your thumbnail, looks like.

    Here is a code for a lizard picture. File of course changes for snakes, birds, plants etc.

    <img src="/pictures/envior_pics/lizards/saurobes_thumb.jpg" width="175" height="97">

    Leave a comment:


  • togo
    replied
    Re: Re: Popup using like naming convention

    Originally posted by Dave Clark


    var img = document.images["imageName"];
    var url = img.src;
    alert(url);
    url = url.split("_thumb").join("");
    alert(url);

    OK?

    Thanks for the reply Dave. I hate to admit I am a graphics person not a programer. Could you spell you code out more for me? What goes where etc. Basically, huh,...how do I use it?

    Togo

    Leave a comment:


  • scroots
    replied
    http://www.javascriptkit.com has one a popup image viewer, take a look pretty neat.

    scroots

    Leave a comment:


  • whammy
    replied
    woohoo... that sounds like a cool website... have the URL?

    Leave a comment:


  • togo
    started a topic Popup using like naming convention

    Popup using like naming convention

    I am building a website that contains several different image galleries--reptiles, birds, and mammals. Being graphic heavy I am displaying thumbnails of each picture. I would like the viewer to be able to click on the thumbnail to view the larger image in a popup window. I would rather not have to type the name of every photo. Can a Javascript be written that will open a window using the name of the thumbnail image by removing the thumbnail identifier? All my thumbnail have "_thumb" as their thumbnail status identifier.

    Example:
    thumbnail imaged named: frog_thumb.jpg
    larger image named: frog.jpg

    Can a script be written that will drop "_thumb" from an image name to open up the large image frog.jpg in a popup window?

    Thanks

    Togo
Working...
X