Tuesday, February 26, 2013
A Basic Example of JQuery's UI.Dialog Dynamically Loading an URL with an IFRAME
0 comments Posted by Duc Nguyen at 6:00 AMsee this link http://clarkupdike.blogspot.com/2009/03/basic-example-of-jquerys-uidialog.html
I have looked at many examples of inserting an iframe into a jQuery UI dialog and have had little success. Then I came across this blog post describing a method that works… function showDialog(){ $("#divId").html('').dialog("open"); $("#modalIframeId").attr("src","http://www.google.com"); return false; } $(document).ready(function() { $("#divId").dialog({ autoOpen: false, modal: true, height: 500, width: 500 }); }); HTML: Show the Dialog
To close a dialog within the iframe use: $(parent.document).find('.ui-dialog'); window.parent.$('#dialogIDname').dialog('close');Saturday, February 23, 2013
Recently I completed a project where I had to show a panel to the left side using JQuery,
on mouse hover it comes out and on mouse leave it goes back. Its seems
to be easy but to maintain the functionality is not that easy.
Here’s a small snippet on how to do it.
HTML
JQuery
jQuery(function($) { $(document).ready(function() { $('#panelHandle').hover(function() { $('#sidePanel').stop(true, false).animate({ 'left': '0px' }, 900); }, function() { jQuery.noConflict(); }); jQuery('#sidePanel').hover(function() { // Do nothing }, function() { jQuery.noConflict(); jQuery('#sidePanel').animate({ left: '-201px' }, 800); }); }); });
demo here http://jsfiddle.net/nirajmchauhan/GPdFk/
Labels: Javascript, jquery
Open command prompts and run these commands one by one on command prompt
- cd /d C:\Windows\Microsoft.NET\Framework\v4.0.30319
- iisreset /stop
- aspnet_regiis -i
- iisreset /start
- %systemroot%\system32\inetsrv\appcmd set config /section:isapiCgiRestriction /[path='%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll'].allowed:True
- %systemroot%\system32\inetsrv\appcmd set config /section:isapiCgiRestriction /[path='%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll'].allowed:True
In this post, I will show you how to get the QueryString variable value using jQuery. I have created a function which returns value of any querystring variable.
//Code Starts function GetQueryStringParams(sParam) { var sPageURL = window.location.search.substring(1); var sURLVariables = sPageURL.split('&'); for (var i = 0; i < sURLVariables.length; i++) { var sParameterName = sURLVariables[i].split('='); if (sParameterName[0] == sParam) { return sParameterName[1]; } } } //Code Ends
And this is how you can use this function assuming the URL is, "http://phattrienweb.com/?technology=jquery&blog=jquerybyexample".
// var tech = GetQueryStringParams('technology'); var blog = GetQueryStringParams('blog'); //
OR....
// Read a page's GET URL variables and return them as an associative array. function getUrlVars() { var vars = [], hash; var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); for(var i = 0; i < hashes.length; i++) { hash = hashes[i].split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } return vars; }
var first = getUrlVars()["qid"];
http://phattrienweb.com/