Click here to Skip to main content
15,901,505 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my project i need to use two different jquery.
one for showing message(tiny box js)..another for captcha..

First tinybox work fine, but after adding captcha js, tinybox doesnot work..

This For Captcha:

  	<script type="text/javascript" src="captcha/jquery-1.5.1.min.js"></script>
	<script type="text/javascript" src="captcha/jquery-ui.min.js"></script>
	<script type="text/javascript" src="captcha/jquery.captcha.js"></script>
	
	

	<link href="captcha/captcha.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" charset="utf-8">
function pageLoad(sender, args)
    {
    captcha();
    }
function captcha() {
	
	
$(function() {
			$j(".ajax-fc-container").captcha({
				borderColor: "silver",
				text: "Verify that you are a human,<br />drag <span>scissors</span> into the circle."
			});
		});
		
}

function  Button2_onclick()
{
captcha();
}
	</script>



This For Tiny Box message

<script type="text/javascript" src="tinybox.js"></script>
     <script type="text/javascript">
    function openJS(){alert('loaded')}
function closeJS(){alert('closed')}
    function pass()
{
TINY.box.show({html:'Enter the Password minimum 6 character',animate:false,close:false,boxid:'error',top:250})
}

function Button1_onclick() {
captcha();
}

    </script>

Thanks n advance
Posted
Updated 19-Jun-12 19:43pm
v3
Comments
Sergey Alexandrovich Kryukov 20-Jun-12 1:20am    
Not clear why it's the problem. Perhaps if you give us more detail... what did you try so far and why you failed to succeed? what was the problem? Use "Improve question" above.
--SA

1 solution

Please see my comment to the question. The problem looks artificial to me. Normally, all your jQuery does is this: it handles the event $(document).ready. From withing this handler, you handle any other events of any other objects, as many as you want. Something like
JavaScript
$(document).ready(function(){
   // setup tiny box messages
   // setup CAPTCHA
   // anything else...
});

To get better idea, please see:
http://docs.jquery.com/Tutorials:How_jQuery_Works[^].

If you still have some concerns, try to show what did you try and why it could not work for you. In this case, please use "Improve question" above.

—SA
 
Share this answer
 
v2
Comments
Muthu Vinoth Kumar 20-Jun-12 1:35am    
Now i improved my question...
Sergey Alexandrovich Kryukov 29-Jun-12 22:22pm    
Thank you for clarification, but the answer remains the same. You should stick all your code inside this top-level frame.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900