Page 4 of 8 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 72

Thread: Print not working as desired in Lightbox

  1. #31
    Join Date
    Feb 2013
    Posts
    49
    Thanks
    25
    Thanked 1 Time in 1 Post

    Default

    Thank you. Yeah, I saw those extended codes inside the script.
    Sorry, I may need some more time from you, please, as your reply arises some more questions in my mind:

    1. If I wish to use this in any other pages, should I just need to change 'contact-us' with my page name, in the script?

    2. If I use say, multi-lightboxes in different situation, in many different pages, for a single web site - is the same script will work for all? Cause, the template is always the same for Joomla website, and script.responsive.js file also using the same for all pages. As example, I have use a template created by myself, named 'raihans' and that's I have to use for all the pages. I mean I cannot use multi-templates for a Joomla build site, as far I know.

    3. If no. 1 and/or 2 is yes, then what I will change instead of 'contact-us', as there will be actually many different pages. For example, in my site - I have already use the lightbox for contact-us page. Now, if I also wish to use in 'Our Services' page, what changes I may need?

    As you are busy, don't worry please and take your time. I may not need those answers immediately, as long as you don't forget and keep an eye into this forum.

    Thanking you.
    Last edited by raihan; 03-07-2013 at 09:58 AM.

  2. #32
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,935
    Thanks
    43
    Thanked 3,192 Times in 3,155 Posts
    Blog Entries
    12

    Default

    Could we have that in plain English please?
    - John
    ________________________

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

  3. #33
    Join Date
    Feb 2013
    Posts
    49
    Thanks
    25
    Thanked 1 Time in 1 Post

    Default

    Sorry, I haven't catch you properly. But, I have edited my post. Have a look, please. Thanks.

  4. #34
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,935
    Thanks
    43
    Thanked 3,192 Times in 3,155 Posts
    Blog Entries
    12

    Default

    Thanks, that's much better.

    BTW - the forum is considering and will probably adopt a new policy on that. We prefer when possible that members use English. It cuts down on misunderstandings.

    So it would be a good idea to avoid that sort of short hand in your other posts as well.



    In answering these questions, make sure you're looking at the annotated version of the code that I added to the end of my post#30 in this thread:

    http://www.dynamicdrive.com/forums/s...566#post291566


    For #1, yes. But then it will only work for that page, not contact-us.

    For #2 and $3, yes. If you are only using a.model for this and only the pages with a.modal on them need this, then get rid of:

    Code:
    if(location.href.indexOf('contact-us') > -1){ //if the page has contact-us in it's address
    and get rid of:

    Code:
    } //END if the page has contact-us in its address
    Those are the first and last lines. If there are other uses of SqueezeBox (the Lightbox) that use a.modal, use an additional class name to mark the ones that need this and add that here (the added class could be "iframeprint"):

    Code:
    $('a.modal
    Code:
    .iframeprint
    ').click(function(){ //when an a tag with a class of modal and a class of iframeprint is clicked
    Then on the page(s) with one or more of these, change:

    HTML Code:
    <a class="modal" href="/component/chronoforms/?chronoform=contact&amp;tmpl=component" rel="{handler: 'iframe', size: {x: 500, y: 600}}"><font color="#CC00FF">  click here</font></font></a>
    to:

    Code:
    <a class="modal iframeprint" href="/component/chronoforms/?chronoform=contact&amp;tmpl=component" rel="{handler: 'iframe', size: {x: 500, y: 600}}"><font color="#CC00FF">  click here</font></font></a>
    - John
    ________________________

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

  5. The Following User Says Thank You to jscheuer1 For This Useful Post:

    raihan (03-11-2013)

  6. #35
    Join Date
    Feb 2013
    Posts
    49
    Thanks
    25
    Thanked 1 Time in 1 Post

    Default

    Thank u. Sorry, a bit late to reply.
    I have tried as u suggest me and it's working. Thanks a lot.
    Now, if I wish to turn off the lightbox automatically, say after clicking submit button - what I may need to do, please?
    Actually, what I am looking is, after submission, the lightbox will automatically close and get back to the page from where I started to lightbox. Please, help!
    Thanking you again.

    Raihan

  7. #36
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,935
    Thanks
    43
    Thanked 3,192 Times in 3,155 Posts
    Blog Entries
    12

    Default

    Well, I just tried out the form using bogus data and after I submitted, I got this message:

    Thank you Joe Shmo, for your message. A copy of your message also been sent to your email. If you don't have the email in your Inbox, please also check your spam folder.

    We will responde to your enquiry as soon as possible.
    BTW, 'responde' and 'enquiry' should be 'respond' and 'inquiry'. And 'message also' should be 'message has also'. And there should either be a <br> tag in there somewhere so you don't have to scroll the iframe to see all of the text, or (better yet) the text should be in a div on the thank you page and that div's width should be set to slightly less than the width of the iframe.

    Anyways, what you want is relatively simple. The javascript command:

    Code:
    SqueezeBox.close();
    will close the lightbox. However, since I take it you want to do that from within the iframe, it would be:

    Code:
    parent.SqueezeBox.close();
    Now I'm wondering if you want the box to close when the person submits, before they see the thank you message, or after. I would think after. So you can either have a button on the thank you page:

    Code:
    <input type="button" onclick="parent.SqueezeBox.close();" value="Close">
    or you could put this script on the page:

    Code:
    <script type="text/javascript">
    setTimeout(function(){parent.SqueezeBox.close();}, 3000);
    </script>
    Put it as the last thing before the </body> tag on the thank you page and it will give then 3 seconds to read the thing before it closes.

    You could do both, and maybe increase the timeout from 3000 to 10000, giving them 10 seconds. If they use the button sooner, that's fine, if not it will close on its own after 10 seconds.

    If you don't want them to see the thank you page, you could add the event to the submit of the form on the submit page. But we would have to make sure that there's enough time for the form to actually submit before the box closes. It would probably be easiest to just use the thank you page, with the timeout, but set it to like 500 (half a second). That way the form will have all the time it needs to submit and the thank you page will not be seen, or not be seen for very long.
    Last edited by jscheuer1; 03-12-2013 at 03:56 AM. Reason: spelling (mine)
    - John
    ________________________

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

  8. The Following User Says Thank You to jscheuer1 For This Useful Post:

    raihan (03-12-2013)

  9. #37
    Join Date
    Feb 2013
    Posts
    49
    Thanks
    25
    Thanked 1 Time in 1 Post

    Default

    Thanks and sorry, yeah, I know, the message I am using just as an example. Not really maintained properly yet.

    As you saw, on that time I was working on this. My email responses was not working properly, still not. Email goes to inquirer, but not going a copy to related department. Instead all going to admin email. Anyway, I will try to fix that. Thanks a lot for your reply.

  10. #38
    Join Date
    Feb 2013
    Posts
    49
    Thanks
    25
    Thanked 1 Time in 1 Post

    Default

    Hi, thanks for your reply.
    I am having another problem,not related to lightbox though. If you can help me, please, I will gratefull to you.
    In my contact-us page, I have used a picture to write my contact email, as you may see, 'info@raihans.co.uk'. But if I write that in my article, I get the message instead, like:
    This email address is being protected from spambots. You need JavaScript enabled to view it.
    What I may can do to avoid this message, please? I haven't change my article for your convenience, so you can realize.
    Thanking you.

    Raihan

  11. #39
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,935
    Thanks
    43
    Thanked 3,192 Times in 3,155 Posts
    Blog Entries
    12

    Default

    That's probably a Joomla thing. I have no idea how that works. It's a pretty good idea though, but doesn't seem to be working properly.

    If you just want to show the text (probably the best idea, not everyone has an email client), try using the HTML entities:

    Code:
    &#x69;&#x6e;&#x66;&#x6f;&#x40;&#x72;&#x61;&#x69;&#x68;&#x61;&#x6e;&#x73;&#x2e;&#x63;&#x6f;&#x2e;&#x75;&#x6b;
    For a link you could try:

    Code:
    <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;%69%6e%66%6f%40%72%61%69%68%61%6e%73%2e%63%6f%2e%75%6b"><img alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIsAAAAUCAYAAAC9Kc5pAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAABgRJREFUaIHtWU1ME2sU/YrUlJq0dFoSjUlRazVAomJEjUhIaC1BsYKK/MSFUgMbExeIMXGhbk2UhREJUTYqEqPdGaOLUrTGn7qBCpRWIUg6NbSOUmiHzeS8hXHC1P5Mqw/fM3OSm3Ruv3vm3vOdzkxbGSEERIIEEcj50w1I+P9AMosE0ZDMIkE0fqtZ9Ho9cblcJBwOk0uXLv1Oagn/ASQ0C8dxWZHduHGD3L9/nxQVFRGPx5NR7fr168n169eJ1+slsViMfP36lTidTtLY2JhVL4kQP1e2c/6NEKsF4oPjuJ9yYoJhGCiVyozr6urqEIlE0NXVhZKSEsjlcqhUKhw4cAButxu3bt3Kqp90c2U7598YIrVY9hMKwmAwIBKJ4ODBgyCEoL6+HlNTUwiFQrh27Ro8Hg+cTida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Xj69Ck+f/6MU6dOieqHYRhoNBoB96+aJVPOdHmDwQCGYZJu7ODgIJqamgS50tJSUBQlWtN0uhDy/daVaI49e/aAZVmUlZUtr1lqamoQCARgMpmQl5cHs9kMmqZRXV0tWHfkyBHQNI3z589j8+bN/O8sW7ZswdmzZ+F2uyGXy9P28/r1a7S3t0OhUGDnzp1wu91gWRYqlSrruTLljOfYsGEDXC4XysvLkZubi/3798Pj8QjWLeUwmUygaRo1NTVQKBSoqKhAMBjkn2PEaBrP+eDBA9y8eRMajQZqtRptbW3w+XxJTd/V1QWfzyf48vCvm4UQgoaGBoyOjmJxcRHv379HfX19Qq6NGzeiu7sbfr8fsVgM0WgU4+Pj6Onp+enhMFk/RqMRQ0NDiEajGBsbg9VqxeDgICorK7OeK1PORBznzp3D5OQkYrEY3rx5g61btybdWEIIrFYrhoeHwbIsJiYmcPLkyYw0jeekKAp3797F7OwsGIbBvXv3sHbt2qRmycvLg9/vR19fn4BX9sMxEiSkg/SvswTRkMwiQTQks0gQjX8AeaJcZfUSy9oAAAAASUVORK5CYII="></a>
    If that works, it will show the image and clicking on it will open the user's email client if they have one.

    Or perhaps try the DD email encrypter:

    http://www.dynamicdrive.com/emailriddler/index.htm
    Last edited by jscheuer1; 03-12-2013 at 09:48 PM. Reason: obfuscate 'mailto:', fix typo (missed r in raihans)
    - John
    ________________________

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

  12. The Following User Says Thank You to jscheuer1 For This Useful Post:

    raihan (03-12-2013)

  13. #40
    Join Date
    Feb 2013
    Posts
    49
    Thanks
    25
    Thanked 1 Time in 1 Post

    Default

    Hi jscheuer, Thanks a lot. You are great. I am learning lots from you.
    I am not sure, is it the right qus to ask you, but can you also help me about databases, please? I am having some issue with database connectivity, table/column display or retrieving data etc. It could be a new topic as well.

    Thanking you again.

Similar Threads

  1. how to move javascript to desired location on page?
    By rytis in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 07-20-2011, 05:25 PM
  2. print.css fot lightbox
    By lostnight in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 06-16-2009, 06:42 AM
  3. Lightbox Print Help
    By eld in forum Dynamic Drive scripts help
    Replies: 10
    Last Post: 04-23-2008, 07:22 PM
  4. Replies: 1
    Last Post: 12-09-2007, 11:59 PM

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
  •