Page 7 of 8 FirstFirst ... 5678 LastLast
Results 61 to 70 of 72

Thread: Print not working as desired in Lightbox

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

    Default

    Hi, Thanks a lot for your reply.
    You have added a new line :

    c.disabled = c.options.length < 2;

    What is this line doing here, please? Can't understand. Thanking you again.

    Also, I am having a positioning and button problem in user Log IN. When a user Loged IN, I am still having 'User LogIn' button, along with Log Out Button. Instead I want just to show Log Out button with user name, when a user Loged In. And, When a user gives wrong password - I wish to show some message, but it's not doing anything now. If you have time, would you please have a check. Thanks again.

    Raihan
    Last edited by raihan; 05-06-2013 at 12:08 PM.

  2. #62
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,025
    Thanks
    44
    Thanked 3,209 Times in 3,171 Posts
    Blog Entries
    12

    Default

    In:

    Code:
    c.disabled = c.options.length < 2;
    c represents the Combo2 select. After the request is successful, and the new options are imported, if there are less than 2, Combo2 is disabled.

    There will always be one option (Select a state). So, as long as the database had at least one state to return, it will be enabled. If the user selects 'Select a country' from Combo1 though, Combo2 will have only 'Select a state', so will be disabled. You can also disable it by default on the page by adding the disabled attribute to it:

    Code:
    <select name="Combo2" id="Combo2" disabled>
    <option value="" selected>Select a state</option>
    </select>
    That way, until the user selects a country with a state or states in the database, they will not be able to use the Select a state Combo2 select.

    I was also thinking that it might be nice to have a small animated .gif loading image that appears on or near the Combo2 select while the request is being made and disappears on success. And/or to disable Combo2 while the request is loading.

    As for having the login button not show when logged in and a password warning shown on a bad password, those are both PHP issues. You need to detect a successful login and not show the login button in that case. And you need to detect an incorrect password and show some sort of warning in that case. Most sites say: "User name and Password do not match", partly because if one is wrong, it's hard to know which is wrong, and mostly because it would be giving a would be hacker too much information to tell them which is wrong, even if you could figure it out.

    Other than giving you an example of basic PHP code used for those things, no one can help with either without seeing the PHP code of the login that you are using. But my PHP isn't all that good. And we are getting further and further off of the original topic of printing. You should open a new thread on those topics in the PHP forum. But you should also first Google:

    PHP login

    to see if there are any templates available to help you.
    - John
    ________________________

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

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

    raihan (05-12-2013)

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

    Default

    Hi,
    Sorry to reply a bit late. You are right, my topics are having mix and match. But if I do use new topics, I haven't got much reply as you do. You are really very helpful. I am grateful to you.

    I am trying to open .pdf and .mp4 in the same lightbox, which will show both side-by-side. Please, again have a check my site: raihans.co.uk and login with dbuser and passwd, then hover to 'Home' and click on 'Test page'.

    I have left two link, one is 'Show PDF', I have used the code as:

    <a class="modal" href=\"docs/KaloNaksha.pdf" rel="{handler: 'iframe', size: {x: 760, y: 440}}">link to a lightbox popup </a>

    but after saving the code, it wutomatically converting to:

    <a class="modal" href="\" rel="{handler: 'iframe', size: {x: 760, y: 440}}">link to a lightbox popup </a>

    Don't know, why? Also it's not showing the PDF file, but an error. Also i know how to show .MP4 file in html as:

    <video width="320" height="240" controls>
    <source src="movie.mp4" type="video/mp4">

    But, not sure how to write in <a> ..... </a>. Cause I wish to see, Video and PDF side-by-side.

    The next link is, 'To see Video and Document Click here', where I have used external plug-in for Joomla. The video player is working, but not showing the PDF, only the full-path.

    Could you please help me, on your free time. I will be very grateful to you.

    Thanks a lot again for all correspondences.


    Raihan

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

    Default

    sorry, it's working now. It's all about google code though. I have used google document viewer in my code as:

    <iframe height="420" src="http://docs.google.com/viewer?url=http%3A%2F%2Fraihans.co.uk%2Fdocs%2FKaloNaksha.pdf&amp;embedded=true" style="border: none;" width="520"></iframe>

    But, the problem with document viewer is: it's allowing the anyone to download or print the pdf file in full screen view. I am looking like, users shouldn't copy, download or print the PDF or video files. How I can do that, please or any other way to protect my PDF and video files. Thanking you.

    Raihan
    Last edited by raihan; 05-12-2013 at 08:22 PM.

  6. #65
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,025
    Thanks
    44
    Thanked 3,209 Times in 3,171 Posts
    Blog Entries
    12

    Default

    If a user can see a video or PDF on their screen, they can copy or download it. After all, it's in their cache.

    There are certainly ways to make it harder. You can obfuscate things. You can stream the video, but ultimately they can still get it. If you really don't want people getting that stuff, don't put it up on the web.

    However, just by being on the web, if the stuff is your own, it's automatically copyrighted. If someone then takes it and uses it in a way that materially harms you, via a loss in sales or damage to your reputation, you can sue them. Even without that, if they're showing it on the web, you can usually just ask them nicely while also mentioning that you could sue them and they will take it down. If they don't, you can inform their ISP, and their ISP will often be more than happy to take it down and/or revoke their web space.
    - John
    ________________________

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

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

    raihan (05-12-2013)

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

    Default

    Hi, Thanks a lot for your reply.

    I know what you saying. But, from my last course in my school, there was a video player named something like network player, which needs Java to install. In that network player my lectures been played. I tried to download, but failed. To run the lectures, I must need to install Java. It may downloaded somwhere, but I couldn't save it anywhere. So as for the books. I couldn't save the books. To see the books, also I needed Java to install. I couldn't save the books as well. So as long as my course, I could watch them or read them. Then, no access. In that way, I came to know theres must be some way, so I could protect my contents. But, can't find the way, how. Any idea comes to you, please let me know.

    Thanking you again.


    Raihan

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

    Default

    Hi, come back to you again. Hope you doing well.
    I have made a form in my site: raihans.co.uk, Login with 'dbuser', 'passwd' please. Then hover 'Home' and click on 'Test page'.

    I have got this in one of your post. This form I have got is very simple. But the validation is not working. The code I have used in my article as:
    *************
    Code:
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <p>
    	<link href="formwizard.css" rel="stylesheet" type="text/css" />
    	<script src="formwizard.js" type="text/javascript"></script></p>
    <script type="text/javascript">
            var myform1=new formtowizard({
    	formid:'form1',
            persistsection:false,
    	validate:['firstname', 'country', 'postcode'],
    	revealfx:['fade', 500],
         })</script>
    <form name="form1">
    	<fieldset class="sectionwrap">
    		<legend>Basic Information</legend> First Name:<br />
    		<input id="firstname" size="35" style="width:350px" type="text" /><br />
    		Last Name:<br />
    		<input id="lastname" size="80" style="width:350px" type="text" /><br />
    		Age:<br />
    		<input id="age" size="3" type="text" /><br />
    		Sex: <input name="sex" type="radio" value="male" /> Male <input name="sex" type="radio" value="female" /> Female</fieldset>
    	<fieldset class="sectionwrap">
    		<legend>Shipping Address</legend> Country:<br />
    		<input id="country" size="35" type="text" /><br />
    		State/Province:<br />
    		<input id="state" size="35" type="text" /><br />
    		Full Address:<br />
    		<input id="full_address" size="80" style="width:350px" type="text" /><br />
    		Postcode:<br />
    		<input id="postcode" size="8" type="text" /></fieldset>
    	<fieldset class="sectionwrap">
    		<legend>Comments</legend> Any additional instructions:<br />
    		<textarea id="feedback" style="width:350px;height:150px"></textarea><br />
    		<input type="submit" /></fieldset>
    </form>
    ****************
    I believe the validation function in formwizard.js file is not working properly. The 'validate' function written as:
    ****************
    Code:
    validate:function(section){
    		var elements=this.sections.$sections.eq(section).data('elements') //reference elements within this section that should be validated
    		var validated=true, invalidtext=["Please fill out the following fields:\n"]
    		function invalidate(el){
    			validated=false
    			invalidtext.push("- "+ (el.id || el.name))
    		}
    		for (var i=0; i<elements.length; i++){
    			if (/(text)/.test(elements[i].type) && elements[i].value==""){ //text and textarea elements
    				invalidate(elements[i])
    			}
    			else if (/(select)/.test(elements[i].type) && (elements[i].selectedIndex==-1 || elements[i].options[elements[i].selectedIndex].text=="")){ //select elements
    				invalidate(elements[i])
    			}
    			else if (elements[i].type==undefined && elements[i].length>0){ //radio and checkbox elements
    				var onechecked=false
    				for (var r=0; r<elements[i].length; r++){
    					if (elements[i][r].checked==true){
    						onechecked=true
    						break
    					}
    				}
    				if (!onechecked){
    					invalidate(elements[i][0])
    				}
    			}
    		}
    		if (!validated)
    			alert(invalidtext.join('\n'))
    		return validated
    	},
    ********************
    Also I want that in a lightbox. The code for lightbox I know, like:
    ********************
    Code:
    <a class="modal" href="some_link" rel="{handler: 'iframe', size: {x: 760, y: 440}}">Show in a lightbox</a>
    ********************
    but can't understand what to code for showing the form within 'href'.

    Would you please have a look on your free time. Thanking you lots.

    Raihan
    UK
    Last edited by jscheuer1; 05-16-2013 at 01:22 PM. Reason: Format

  10. #68
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,025
    Thanks
    44
    Thanked 3,209 Times in 3,171 Posts
    Blog Entries
    12

    Default

    In order to put the form in a lightbox, assuming it's the type of lightbox script that can do that (I seem to remember that it is), the form has to be on a separate page. If so, you just put the URL of that page as the href in the lightbox link, same as you would if it were an ordinary link and you wanted it to go to the form page.

    Once you have that setup and working (form is on a separate page and showing in the lightbox), if there's still a problem with the validation script, that can be diagnosed in the normal manner on that separate page (the one with the form on it). If there is such a problem and you still want help with it, I would need a link to the top page.
    - John
    ________________________

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

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

    raihan (05-16-2013)

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

    Default

    Hi, Thanks a lot for your reply. I have tried as you suggest. You may have a look please.
    It's coming with the full page, instead I need to show only the form. Also I have used exactly same code to show the form. But, it's showing error 'Categories not found' and not showing the form. What I may could do now, please? Thanking you again.

  13. #70
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,025
    Thanks
    44
    Thanked 3,209 Times in 3,171 Posts
    Blog Entries
    12

    Default

    I have no idea what I'm looking for. I see no link on that page like the one from your post.
    - John
    ________________________

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

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

    raihan (05-18-2013)

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
  •