• Hello.

    I am using a piece of HTML in my blog, that will display a thumb nail of an image, then when it is clicked, a pop up window will open, and a bigger version of the picture will open in a new window.

    I can’t get this piece of coding to work right in word press, it will display a blank box, and when I click it, it loads a new window with that post entry in it.

    Any ideas how to get aorund this little problem/

    Thanks.
    Dustin Cook.

Viewing 15 replies - 1 through 15 (of 22 total)
  • It’d help if you posted the code because you can use normal HTML is posts already.

    Moderator James Huff

    (@macmanx)

    Hm, I’m not sure why that wouldn’t work, unless you’re using non-standard code. Try this:

    <a href="/images/bigimage.jpg" target="_blank"><img src="/images/smallimage.jpg" alt="thumbnail" /></a>

    Thread Starter dustincook

    (@dustincook)

    Thaks. The images now work, but IO do have another problem.

    I want the new window to open with the image inside it, and have the window resized so that it fits around the image.

    Any ideas on how to do that?

    Thanks.
    Dustin.

    macmanx: target="_blank" is depreciated, don’t use it. ??

    …and deprecated ??

    “deprecated”?

    [edit] Oh. Had to look that one up in the dictionary. lol [/edit]

    Moderator James Huff

    (@macmanx)

    macmanx: target="_blank" is depreciated, don’t use it

    Oops. It has been so long since I forced new windows on my readers that I have completely forgotten about that. There is a javascript tag to do the same thing, and it isn’t deprecated, but I don’t remember what it is either. Like I said, I no longer force new windows on my readers.

    [Edit] I think this is the proper tag. Please correct me if I am wrong: onClick="javascript:popUp('/images/bigimage.jpg')"

    external.js goes in the header and use rel=”external” in the links.

    I guess I shouldn’t be surprised but “deprecate” is in Wikipedia.

    Moderator James Huff

    (@macmanx)

    Beel, I like that external.js file. Very smart and “future-safe” idea, but I haven’t seen it in action on your site. From reading it, it looks like it opens all rel="external" links in a new window. Am I right?

    Thread Starter dustincook

    (@dustincook)

    OK, that new piece of code supplied is more like the code that would not work for me when I tried originally???

    Should it work:

    <img src=”imagetitle” border=”0″ width=”SET” height=”SET” alt=”Image Description”>

    Moderator James Huff

    (@macmanx)

    Please post your code inside backticks. The backtick key is typically located to the left of the 1 key, above the tab key, and below the escape key.

    Thread Starter dustincook

    (@dustincook)

    <a href="#" onClick="popup = window.open('images/1x01x1.jpg', 'PopupPage', 'height=225, width=320, scrollbars=no, resizable=yes'); return false" target="_blank"><img src="images/1x01x1.jpg" border="0" width="140" height="105" alt="Chakotay"></a>

    Moderator James Huff

    (@macmanx)

    Try:

    <a href="#" onClick="javascript:popUp('images/1x01x1.jpg', 'PopupPage', 'height=225', 'width=320', 'scrollbars=no', 'resizable=yes')"><img src="images/1x01x1.jpg" border="0" width="140" height="105" alt="Chakotay"></a>

    Thread Starter dustincook

    (@dustincook)

    Do I need to add anything to the template? If so, what should I add, where do I add it to and what page do I add it onto.

    Thanks very much for the help.

    Moderator James Huff

    (@macmanx)

    Nope, just add that line to the post that you want to include the image thumbnail + full image popup in. Is it working?

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘Normal HTML in Posts’ is closed to new replies.