Panos
asked on
pop jqmodal on cookie disabled
Hello experts.
I m using the jqmodal (http://dev.iceburg.net/jquery/jqModal/ )
and the jcookie plugin. (http://plugins.jquery.com/files/jquery.cookie.js.txt)
If cookies are disabled i want to load via ajax a page with instructions.
The first code below is working but i need to style this with the jqmodal plugin.
I get the error:
h is undefined
please help
I m using the jqmodal (http://dev.iceburg.net/jquery/jqModal/ )
and the jcookie plugin. (http://plugins.jquery.com/files/jquery.cookie.js.txt)
If cookies are disabled i want to load via ajax a page with instructions.
The first code below is working but i need to style this with the jqmodal plugin.
I get the error:
h is undefined
please help
1.
<script type="text/javascript" language="javascript" src="js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" language="javascript" src="js/jCookies.js"></script>
<script>
jQuery(document).ready(function()
{
var TEST_COOKIE = 'test_cookie';
jQuery.cookie( TEST_COOKIE, true );
if ( jQuery.cookie ( TEST_COOKIE ) )
{
jQuery.cookie( TEST_COOKIE, null ); // delete the cookie
}
else
{
alert( 'blabla ');
}
})
</script>
2.
<script type="text/javascript" language="javascript" src="js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" language="javascript" src="js/jqmodal/jqmodal.js"></script>
<script type="text/javascript" language="javascript" src="js/jqmodal/jqDnR.js"></script>
<script type="text/javascript" language="javascript" src="js/jCookies.js"></script>
<link href="js/jqmodal/jqmodal.css" rel="stylesheet" type="text/css">
<script>
jQuery(document).ready(function()
{
var TEST_COOKIE = 'test_cookie';
jQuery.cookie( TEST_COOKIE, true );
if ( jQuery.cookie ( TEST_COOKIE ) )
{
jQuery.cookie( TEST_COOKIE, null ); // delete the cookie
}
else
{
$('#popuppage').jqmShow({
ajax: 'load_popup_articel.html',
overlay: 50,
onShow: function(h) {
/* callback executed when a trigger click. Show notice */
h.w.css('opacity',1).slideDown("slow");
},
onHide: function(h) {
/* callback executed on window hide. Hide notice, overlay. */
h.w.slideUp("slow",function() { if(h.o) h.o.remove();})
}
});
}
})
</script>
<div class="jqmWindow" id="popuppage">
please wait ... <img alt="loading" src="style/images/busy.gif">
</div>
ASKER
Hi mplungjan.
I try to pop up the window but it is not working.Take a look please:
<script>
jQuery(document).ready(fun ction()
{
var TEST_COOKIE = 'test_cookie';
jQuery.cookie( TEST_COOKIE, true );
if ( jQuery.cookie ( TEST_COOKIE ) )
{
jQuery.cookie( TEST_COOKIE, null ); // delete the cookie
}
else
{ var myOpen=function(hash){ hash.w.css('opacity',0.88) .show(); };
$('#popuppage').jqm({onSho w:myOpen}) ;
}
})
</script>
<div class="jqmWindow" id="popuppage">
please wait ... <img alt="loading" src="style/images/busy.gif ">
</div>
I try to pop up the window but it is not working.Take a look please:
<script>
jQuery(document).ready(fun
{
var TEST_COOKIE = 'test_cookie';
jQuery.cookie( TEST_COOKIE, true );
if ( jQuery.cookie ( TEST_COOKIE ) )
{
jQuery.cookie( TEST_COOKIE, null ); // delete the cookie
}
else
{ var myOpen=function(hash){ hash.w.css('opacity',0.88)
$('#popuppage').jqm({onSho
}
})
</script>
<div class="jqmWindow" id="popuppage">
please wait ... <img alt="loading" src="style/images/busy.gif
</div>
You need the function myopen too
ASKER
mplungjan i found this solution in my net too but i'm not able to fix it myself but it is not complete there
If you can please post the full js code.I will never fix it myself.
If you can please post the full js code.I will never fix it myself.
ASKER
mplungjan:
i think i made step forward.
in relation to this post:http://stackoverflow.com/questions/2884185/show-jqmodal-window-on-page-load
imade a little changes to my code.
I have now the popup but i cant load the ajax page.It stacks on please wait.....
i think i made step forward.
in relation to this post:http://stackoverflow.com/questions/2884185/show-jqmodal-window-on-page-load
imade a little changes to my code.
I have now the popup but i cant load the ajax page.It stacks on please wait.....
jQuery(document).ready(function()
{
var TEST_COOKIE = 'test_cookie';
jQuery.cookie( TEST_COOKIE, true );
if ( jQuery.cookie ( TEST_COOKIE ) )
{
jQuery.cookie( TEST_COOKIE, null ); // delete the cookie
}
else
{
$('#popuppage').jqm().jqmShow({
ajax: 'load_popup_articel.cfm',
overlay: 50,
onShow: function(h) {
/* callback executed when a trigger click. Show notice */
h.w.css('opacity',1).slideDown("slow");
},
onHide: function(h) {
/* callback executed on window hide. Hide notice, overlay. */
h.w.slideUp("slow",function() { if(h.o) h.o.remove();})
}
});
}
})
Not very clear that one HAD to do the .jqm first to initialise.
Now mine works too
http://jsfiddle.net/mplungjan/xPA3D/1/
Now the question is, does load_popup_articel.cfm load something when called from the location bar?
Now mine works too
http://jsfiddle.net/mplungjan/xPA3D/1/
Now the question is, does load_popup_articel.cfm load something when called from the location bar?
ASKER
I made a test page that is loading nothing so that i will not have any server side problems.
Check here please with cookies disabled:
http://ierotheos.selfip.com/testcookie2.cfm
Check here please with cookies disabled:
http://ierotheos.selfip.com/testcookie2.cfm
ASKER
You can check now.
It was closed
It was closed
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That was perfect mplungjan.
Many many thanks!!!
A complete working SOLUTION IN NET
Many many thanks!!!
A complete working SOLUTION IN NET
ASKER
Thank you again.
Regards
Panos
Regards
Panos
You are welcome. It was an interesting exercise.
onShow (callback)
Called when a dialog is to be shown. Be sure to show (set visible) the dialog.
// onShow : show+make the window translucent
var myOpen=function(hash){ hash.w.css('opacity',0.88)
$('#dialog').jqm({onShow:m