• Resolved domesticlife

    (@domesticlife)


    I have a daily cartoon that I would like to open in a new window when someone clicks on the link. The main reason is because it is too wide for my site design and messes up the sidebar. I’d be greatful for any help.

    Thanks
    John
    https://www.domesticlife.org

Viewing 6 replies - 1 through 6 (of 6 total)
  • hi,
    do you mean, for example, to add a java script to open images on click?

    i added the following code to my headers file.

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function zoom(img, w, h) {window.open(img,'zoom'+w+h,'toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,width='+w+',height='+h);}
    // -->
    </SCRIPT>

    when posting, i add the following as link to the image:

    <a href="javascript:zoom('https://url.to/large_image.jpg', 200, 300);" onmouseover="self.status='Zoom In';return true">

    the parameters are: image location, width (in pix), height (in pix).
    the mouse over thing is for not showing off the javascript link in the status bar of your browser.

    an example can be found at: My Blog

    hope this is, what you where looking for.

    bye, chris

    thank you!!!!!!!!!! i spent hours last night looking for this exact thing.

    You’ll need to change the script language stuff (and uncapitalize it) in order for the page to validate.

    thanks for this hint. i ll do so.

    i changed the capital version to the following:

    <script type="text/javascript">

    now it validates fine.

    bye, chris

    script language stuff?

    The “script language” usage is no longer valid; it now must read as toughIQ posted above.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to add a image that opens in a new window’ is closed to new replies.