Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Is it possible to preset new popup browser to 640 x 480 pixels

  1. #11
    Join Date
    Apr 2013
    Location
    Preston, Lancashire, UK
    Posts
    13
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Beverleyh View Post
    Ask any question you like - DD specific or otherwise. There are many talented people here who can help you with lots of web/hardware/general IT queries. Just post your question, and sample pages/scripts where necessary, in the most appropriate forum. For more considerable help requests you can also post in the paid help forum.
    Thanks Beverleyh
    Beverleyh is online now - You should be in bed at this time...

    I have posted my other problem in the javascript section.

    Thank you,

    John C

  2. #12
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    2,011
    Thanks
    16
    Thanked 315 Times in 313 Posts
    Blog Entries
    13

    Default

    Ha, ha - I have just watched "Get Him To The Greek" and was just checking PMs from iPhone before turning off for the night.

    ...Now that time has arrived.

    Night, night all
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  3. #13
    Join Date
    Apr 2013
    Location
    Preston, Lancashire, UK
    Posts
    13
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    If all of the fadeslideshows on the page either need this or have no links, then we can simplify things.

    First, even without this, you don't need a separate script tag for each show. You need one external tag for jQuery, you already have that, and then one external tag for the main script, you have that. Then one internal script tag for all of the initializations plus one bit of added code at the end (which no longer needs the wrapperid selector) if you want to use the new window thing for the slideshows that have links:

    Code:
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script type="text/javascript" src="../files/fadeslideshow.js">
    
    /***********************************************
    * Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
    ***********************************************/
    
    </script>
    <script type="text/javascript">
    
    var mygallery=new fadeSlideShow({
    	wrapperid: "fadeshow", //ID of blank DIV on page to house Slideshow
    	dimensions: [1000, 120], //width/height of gallery in pixels. Should reflect dimensions of largest image
    	imagearray: [
    		["../photos/headers/header1.jpg", "", "", ""],
    		["../photos/headers/header2.jpg", "", "", ""],
    		["../photos/headers/header3.jpg", "", "", ""],
    		["../photos/headers/header4.jpg", "", "", ""],
    		["../photos/headers/header5.jpg", "", "", ""],
    		["../photos/headers/header6.jpg", "", "", ""],
    		["../photos/headers/header7.jpg", "", "", ""] //<--no trailing comma after very last image element!
    	],
    	displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false, randomize:true},
    	persist: false, //remember last viewed slide and recall within same session?
    	fadeduration: 1000, //transition duration (milliseconds)
    	descreveal: "ondemand",
    	togglerid: ""
    })
    
    var mygallery1=new fadeSlideShow({
    	wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
    	dimensions: [180, 200], //width/height of gallery in pixels. Should reflect dimensions of largest image
    	imagearray: [
    		["../photos/regions/chiltern1.jpg", "", "", ""],
    		["../photos/regions/chiltern2.jpg", "", "", ""],
    		["../photos/regions/chiltern3.jpg", "", "", ""],
    		["../photos/regions/chiltern4.jpg", "", "", ""],
    		["../photos/regions/chiltern5.jpg", "", "", ""],
    		["../photos/regions/chiltern6.jpg", "", "", ""],
    		["../photos/regions/chiltern7.jpg", "", "", ""] //<--no trailing comma after very last image element!
    	],
    	displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false, randomize:true},
    	persist: false, //remember last viewed slide and recall within same session?
    	fadeduration: 1000, //transition duration (milliseconds)
    	descreveal: "ondemand",
    	togglerid: ""
    })
    
    var mygallery2=new fadeSlideShow({
    	wrapperid: "fadeshow2", //ID of blank DIV on page to house Slideshow
    	dimensions: [180, 200], //width/height of gallery in pixels. Should reflect dimensions of largest image
    	imagearray: [
    		["../photos/regions/chiltern_sm5.jpg", "../photos/regions/chiltern5.jpg", "_new", "This is Davids caravan"],
    		["../photos/regions/chiltern_sm6.jpg", "../photos/regions/chiltern6.jpg", "_new", "chiltern6.jpg"],
    		["../photos/regions/chiltern_sm7.jpg", "../photos/regions/chiltern7.jpg", "_new", "chiltern7.jpg"],
    		["../photos/regions/chiltern_sm8.jpg", "../photos/regions/chiltern8.jpg", "_new", "chiltern8.jpg"],
    		["../photos/regions/chiltern_sm9.jpg", "../photos/regions/chiltern9.jpg", "_new", "chiltern9.jpg"],
    		["../photos/regions/chiltern_sm10.jpg", "../photos/regions/chiltern10.jpg", "_new", "chiltern10.jpg"],
    		["../photos/regions/chiltern_sm11.jpg", "../photos/regions/chiltern11.jpg", "_new", "chiltern11.jpg"] //<--no trailing comma after very last image element!
    	],
    	displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false, randomize:true},
    	persist: false, //remember last viewed slide and recall within same session?
    	fadeduration: 1000, //transition duration (milliseconds)
    	descreveal: "ondemand",
    	togglerid: ""
    })
    
    var mygallery3=new fadeSlideShow({
    	wrapperid: "fadeshow3", //ID of blank DIV on page to house Slideshow
    	dimensions: [180, 200], //width/height of gallery in pixels. Should reflect dimensions of largest image
    	imagearray: [
    		["../photos/headers/header1.jpg", "", "", ""],
    		["../photos/headers/header2.jpg", "", "", ""],
    		["../photos/headers/header3.jpg", "", "", ""],
    		["../photos/headers/header4.jpg", "", "", ""],
    		["../photos/headers/header5.jpg", "", "", ""],
    		["../photos/headers/header6.jpg", "", "", ""],
    		["../photos/headers/header7.jpg", "", "", ""] //<--no trailing comma after very last image element!
    	],
    	displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false, randomize:true},
    	persist: false, //remember last viewed slide and recall within same session?
    	fadeduration: 1000, //transition duration (milliseconds)
    	descreveal: "ondemand",
    	togglerid: ""
    })
    
    var mygallery4=new fadeSlideShow({
    	wrapperid: "fadeshow4", //ID of blank DIV on page to house Slideshow
    	dimensions: [180, 200], //width/height of gallery in pixels. Should reflect dimensions of largest image
    	imagearray: [
    		["../photos/regions/chiltern_sm5.jpg", "../photos/regions/chiltern5.jpg", "_new", "This is Davids caravan"],
    		["../photos/regions/chiltern_sm6.jpg", "../photos/regions/chiltern6.jpg", "_new", "chiltern6.jpg"],
    		["../photos/regions/chiltern_sm7.jpg", "../photos/regions/chiltern7.jpg", "_new", "chiltern7.jpg"],
    		["../photos/regions/chiltern_sm8.jpg", "../photos/regions/chiltern8.jpg", "_new", "chiltern8.jpg"],
    		["../photos/regions/chiltern_sm9.jpg", "../photos/regions/chiltern9.jpg", "_new", "chiltern9.jpg"],
    		["../photos/regions/chiltern_sm10.jpg", "../photos/regions/chiltern10.jpg", "_new", "chiltern10.jpg"],
    		["../photos/regions/chiltern_sm11.jpg", "../photos/regions/chiltern11.jpg", "_new", "chiltern11.jpg"] //<--no trailing comma after very last image element!
    	],
    	displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false, randomize:true},
    	persist: false, //remember last viewed slide and recall within same session?
    	fadeduration: 1000, //transition duration (milliseconds)
    	descreveal: "ondemand",
    	togglerid: ""
    })
    
    jQuery(function($){ //author's note: this function is wrong, now corrected in the original and in a later post - jscheuer1
    	$(.gallerylayer a').click(function(e){
    		try{$.fn.mynewwin.close();}catch(e){}
    		$.fn.mynewwin = window.open(this.href, this.target, 'width=640, height=480');
    		e.preventDefault();
    	});
    });
    </script>
    Hi jscheuer1...
    Thanks very much for your simplified and more efficient script.
    However, the highlighted code above KILLS ALL the slideshows.
    The script works fine without the highlighted script, but not with it.

    Regards,

    John C

    PS, How can I include a signature to my posts ?
    Last edited by jscheuer1; 04-14-2013 at 06:55 AM. Reason: add author's note in quoted code

  4. #14
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,076
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    Cut and paste typo on my part, sorry. That highlighted section is missing an opening quote mark. It should be:

    Code:
    jQuery(function($){
    	$('.gallerylayer a').click(function(e){
    		e.preventDefault();
    		try{$.fn.mynewwin.close();}catch(e){}
    		$.fn.mynewwin = window.open(this.href, this.target, 'width=640, height=480');
    	});
    });
    Oh, and I just noticed testing this somewhere else that the e.preventDefault() needs to be moved up as I've just done to prevent the image from also opening in the main page in at least some IE browsers.

    Oh and about the signature, you have to have been a member for at least 30 days and have at least 100 posts to qualify. Once you do, you can configure a signature by editing your profile. See:

    http://www.dynamicdrive.com/forums/s...(July-8th-08-)

    for more info.
    Last edited by jscheuer1; 04-14-2013 at 07:03 AM. Reason: move up preventDefault for some IE, later - add about sig
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #15
    Join Date
    Apr 2013
    Location
    Preston, Lancashire, UK
    Posts
    13
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Hi jscheuer1's ...

    Thank you very much for the modified script.
    It worked just fine.

    Thanks also for the info about Signatures.
    I must say that I am very surprised about this. It is the first time I have seen such a restriction.
    I don't mind though. It would just have saved me from signing every post (I'm an idle SOB)

    Best regards,

    John C

  6. #16
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,076
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    I've been playing around with the popup window code some more, this looks even better:

    Code:
    jQuery(function($){
    	$.fn.mynewwin = {close: null};
    	$('.gallerylayer a').click(function(e){
    		if($.fn.mynewwin.close){$.fn.mynewwin.close();}
    		$.fn.mynewwin = window.open(this.href, this.target, 'width=640, height=480');
    		e.preventDefault();
    	});
    	$(window).unload(function(){
    		if($.fn.mynewwin.close){$.fn.mynewwin.close();}
    	});
    });
    There is no longer a problem in IE with the preventDefault in its proper place, and with this version if the user leaves the page with one of these new windows open, it will close.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #17
    Join Date
    Apr 2013
    Location
    Preston, Lancashire, UK
    Posts
    13
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Hi jscheuer1 ...

    I can't believe that you have gone to so much trouble for my benefit.
    It does work better than the previous script.

    I'm sure that it will benefit the script for future userd.

    I really am VERY GRATEFUL..

    THANK YOU

    John C

Similar Threads

  1. Preset chained selects
    By crazymao in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 05-27-2012, 07:51 AM
  2. Replies: 1
    Last Post: 03-30-2008, 11:28 AM
  3. Pop-it menu preset positioning?
    By Arothman in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 11-08-2006, 01:33 PM
  4. Replies: 6
    Last Post: 07-06-2006, 12:59 PM
  5. parameter from main browser to popup
    By detieubao in forum JavaScript
    Replies: 4
    Last Post: 04-24-2006, 08:05 AM

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
  •