Results 1 to 8 of 8

Thread: Help with Javascript:showimage

  1. #1
    Join Date
    Oct 2003
    Philadelphia, PA

    Help with Javascript:showimage

    I am trying to figure this out. I am trying to open a window with a set background and header for use with different pictures. It is very hard to explain but you can see a sample of this javascript at www.ehowa.com. The webmaster there makes it so when you click on a link to an image file a new window or page opens with his header and footer and that particular image in the middle. I think its amazing I cannot find ANY information on this and hope someone would help.

  2. #2
    Join Date
    Dec 2002
    Calgary, Canada
    There are tonnes of scripts out there,here is one of those,the iamge is opened with the window sized to exactly same as th eimages,you can change that and add header and footer..

    Click Here


    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  3. #3
    Join Date
    May 2003
    I have done something similar. From page one I open a new window with onclick ( I specify a window size and no tools or status) the on click gives an image name. The page specified in the window open parses the url for the img name . This page could have a header, footer or whatever.

    Calling code:
    Click on an image (could be text instead). These images are in a table for selecting what is to be viewed. The focus puts the new window on top and the return false keeps the calling page's postion from changing when moving to and from the calling window.

    <a href="#" onClick="window.open('display.html?yourimagename.jpg','display_2','resizable,scrollbars,width=540,he ight=470').focus();return false;"><img src="yourimagename.gif" height="110" alt="yourimagedescription"></a>

    Display page code:

    Display Pics

    <script language="JavaScript">

    var idx = document.URL.indexOf('?'); /*parameters on this URL? */
    var new_image = document.URL.substring(idx+1,document.URL.length);


    <body bgcolor="#8080ff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">
    <div align="center">

    <script language="JavaScript">
    document.writeln("<img src='"+new_image + "'>");


    Of course you will use the colors and text to suit your needs.
    Last edited by agminer; 10-28-2003 at 09:39 PM.

  4. #4
    Join Date
    Oct 2003
    Philadelphia, PA
    Im sorry but I cant get either one to work for me. Did you happen to check the example I gave?? agminer seems to have what I am looking for but I cant get it to work.

  5. #5
    Join Date
    May 2003
    Here is a page where I use the code


    The display page code is a separate html page and the other code is placed in the main page. Hope this helps.

  6. #6
    Join Date
    Oct 2003
    Philadelphia, PA
    Well i would like to say thanks before anything.. I appreciate your time and help. But I altered the code from your page (I hope you dont mind) to see if I can get it to work for my needs. Here is the code Im using.

    <!doctype html public "-//w3c//dtd html 3.2//en">
    Cards Made page 1
    <meta name="GENERATOR" content="Arachnophilia 4.0">
    <meta name="FORMATTER" content="Arachnophilia 4.0">
    <body bgcolor="#8080ff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">

    <!script language="JavaScript">

    <a href="#" onClick="window.open('display.html?alivia.jpg','display_2','resizable,scrollbars,width=540,height=47 0').focus();return false;">OK</a>


    I have both html files and the image file in the same directory and everything works. Except the image will not show. It shows me a new window (PERFECT) but it only shows me the place holder for the image... The image does not load. Maybe you can check this code and let me know whats wrong. Thanks in advance.

  7. #7
    Join Date
    May 2003
    One of those quirks is that it won't work unless it is used from a web site. Upload it to a site them try it.
    Frustating to have to upload all the time to test it., but that is what I have to do (net and ie) both.

  8. #8
    Join Date
    Oct 2003
    Philadelphia, PA
    Hey AGMINER... I am posting this for no other reason than to thank you kindly for all your help. I now have it working exactly the way I want it to. Without your help I would be pulling my hair out. I REALLY appreciate you taking the time to help me. Thanks again.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.17463 seconds
  • Memory Usage 2,908KB
  • Queries Executed 13 (?)
More Information
Template Usage (32):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (8)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (70):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates