Thursday, September 26, 2013

Different value Passing without query string in Lightbox POP

This Code Passing Different value same dynamic/static Page without query string  in  Lightbox Form Using JavaScript.Using Following code save as .html/ any script Language like .php   etc.


<!DOCTYPE html>
<html>
<head>
<title>
Different value Passing  without query string in Lightbox POP

</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style>


#shadowing
{
display: none;
position: fixed;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: #64D272;
z-index:10;
opacity:0.5;
filter: alpha(opacity=50);
}


#box
{
display: none;
position: fixed;
top: 20%;
left: 20%;
width: 270px;
height: 150px;
padding: 10px 0 0 8px;;
margin:0;
border: 1px solid black;
background-color: white;
z-index:101;
overflow: auto;
}

#boxtitle
{
position:absolute;
float:center;
top:0;
left:0;
width:277px;
height:24px;
padding:0;
padding-top:4px;
left-padding:8px;
margin:0;
border-bottom:4px solid #3CF;
background-color: #800040;
color:white;
text-align:center;
}


.btn_close
{

position:relative;
top:-15px;
right:-232px;
z-index:99999px;
}




</style>
<script language="javascript" type="text/javascript">
function openbox(formtitle, fadin)
{



var box = document.getElementById('box');
document.getElementById('shadowing').style.display='block';






var btitle = document.getElementById('boxtitle');
//  var btitle2 = document.getElementById('boxtitle');
btitle.innerHTML =formtitle;






var abc=btitle.innerHTML.toLowerCase();
abc= abc.replace(/^\s+|\s+$/g,"");
abc= abc.replace(/[^a-zA-Z 0-9]+/g,'');
abc= abc.replace(/ /g,"-");
abc= abc.replace(/---/g,"-");
abc= abc.replace(/--/g,"-");

document.form1.pdf_name.value = abc;

//document.form1.pdf_name.value = ;

if(fadin)
{
gradient("box", 0);
fadein("box");
}
else
{    
box.style.display='block';
}     
}


// Close the lightbox

function closebox()
{
document.getElementById('box').style.display='none';
document.getElementById('shadowing').style.display='none';
}

function gradient(id, level)
{
var box = document.getElementById(id);
box.style.opacity = level;
box.style.MozOpacity = level;
box.style.KhtmlOpacity = level;
box.style.filter = "alpha(opacity=" + level * 100 + ")";
box.style.display="block";
return;
}


function fadein(id)
{
var level = 0;
while(level <= 1)
{
setTimeout( "gradient('" + id + "'," + level + ")", (level* 1000) + 10);
level += 0.01;
}
}

</script>

</head>

<body>
<h1>Form open in a Lightbox Using Sample Javascript</h1>



<p> <B>Different value passing without Query String </B><b><br><br><br>
Link Test Ex 1 (with fading effect) <a href="#" onClick="openbox('Test Box1', 1)">click  here1</a>. <br><br>

Link Test Ex 2 (with fading effect) <a href="#" onClick="openbox('Test Box2', 1)">Click  here2</a>. <br><br>

Link Test Ex 3 (withot fading effect) <a href="#" onClick="openbox('Test Box3', 0)">Click  here3</a>. <br><br>

Link Test Ex 4 (withot fading effect) <a href="#" onClick="openbox('Test Box4', 0)">Click  here4</a>. <br><br>
<!-- This codeing  Add here Bottom page  and set code before body tag end here -->
<!-- start here -->
<div id="shadowing"></div>

<div id="box">
<form method="POST" action="#" target="_parent" name="form1">
<span  id="boxtitle"></span>
<table cellpadding="2"        cellspacing="2" >
<tr><td><a href="#"  onClick="closebox()" ><img src="close_pop.png" class="btn_close" title="Close Window" alt="Close" /></td><td>
<input type="hidden" name="pdf_name" value="" maxlength="60" size="25"> </a>
</td> </tr>
<tr><td>Name: </td><td>
<input type="text" name="fname" value="" maxlength="60" size="25" >
</td> </tr>  
<tr><td>Email : </td><td>
<input type="text" name="email" value="" maxlength="60" size="25">
</td> </tr>
<tr><td colspan="2" style="text-align:center" align="center">      <input type="submit" name="submit" class="buttonnewlink">
<input type="button" name="cancel" value="Cancel" onClick="closebox()">
</td></tr>
</table>
</form>
</div>
<!-- End here -->
</body>
</html>

Wednesday, September 25, 2013

Submit Query without Pass Query String in Pop Window

 1)make a search button on your web page  and define  type = submit
2)onclick of that button do the following:
// create the pop-up window
// make sure you give it a name
window.open("g.php", "targetSearchResult",
"width=400,height=300");
// adjust your forms target and action as:
mysearchform.target = 'targetSearchResult';
mysearchform.action = 'g.php';
mysearchform.submit();
That way, you have pre-created a pop-up window ; later you
submitted the search queries (via POST/GET method if you don't want queries)

Please Below code using solving Submit Query without Pass Query String.  in Pop Window

File save any name . for EX.  abc.html
<!DOCTYPE html>
<html>
<head>

<script language="javascript">
function doTheSubmit()
{
//document.mysearchform.theField.value='5';
mysearchform.target = 'targetSearchResult';
mysearchform.action = 'g.php';
mysearchform.submit();
}
</script>
<meta charset=utf-8 />
<title>Submit Query without Pass Query String</title>

</head>
<body>
  <form id="mysearchform" name="mysearchform" method="POST" onSubmit="doTheSubmit();">
  <input type="hidden" id="theField" name="theField" value="6">
    <br><input type="submit" value="Send" onclick="window.open('g.php','targetSearchResult','height=400,width=400');">

  </form>
</body>
</html>

.............................
Another File g.php
<?php
print_r($_POST);
echo $_REQUEST['theField'];
?>

Tuesday, September 17, 2013

Print area defined using css and javascript in webpage

if you want to print particular area in webpage . These problem Solve using css and js in HTML Web page. Please below Example  save as html file and run any browser (IE, Firfox and  Crome Etc).

Ex-

<html>
    <head>
        <style type="text/css">
        @media print {
            body * {
                visibility:hidden;
            }
            #printable, #printable * {
                visibility:visible;
            }
            #printable { /* aligning the printable area */
                position:absolute;
                left:40;
                top:40;
            }
        }
        </style>
    </head>
    <body>
      <A HREF="javascript:window.print()">Click to Print This Page</A>
        <div id="printable">
            printable area
            <br>
            printable area
            <br>
            printable area
        </div>
        <div>
            Curabitur tempus hendrerit semper. Nulla vel felis est. Cras nec mattis mauris.
            Vestibulum volutpat urna viverra mi viverra non ultrices leo semper.
            Maecenas scelerisque, augue quis scelerisque aliquam, magna velit scelerisque urna,
            in aliquet lectus dolor vitae urna. Nullam faucibus mattis hendrerit.
            Nam tortor elit, vulputate quis viverra vitae, dapibus id magna.
            Ut ultricies rhoncus erat, id pharetra dui tincidunt at.
            In lorem lorem, suscipit nec elementum vitae, venenatis id ligula.
            Suspendisse et erat id neque facilisis ultricies ac in neque.
            Vestibulum suscipit risus sed erat varius molestie.
        </div>
    </body>
</html>


 

Thursday, May 23, 2013

Android vs iOS Difference

S.no Difference Section Android iOS
1 Company / Developer Center: Google Apple Inc.
2 Program Technology Used: C, C++, java C, C++, Objective-C
3 OS family: Linux OS X
4 Source model: Open source Closed, with open source components.
5 Open Source: kernel, ui, and some standard apps kernel only
6 Initial release: September 2008 June 2007
7 Latest release: Jelly Bean 4.2 ; To Be Released-5.0 Key Lime Pie (API level 18) 6.1
8 Widgets: Yes No
9 Dependent on a PC or a Mac: No No
10 Easy media transfer: depends on model with desktop application
11 Available on: Many phones and tablets, including Kindle Fire, LG and HTC phones, and the Samsung Nexus. Apple products, including iPhone, iPod Touch and iPad.
12 Handset Options: Thousands like Samsung S2, HTC One X iPhone, iPad, iPod Touch
13 Interface: Touch screen Touch screen
14 Customizability Features: A lot. Can change almost anything. Limited unless jailbroken
15 Voice commands: Google Now (on newer versions) Siri
16 Maps: Google Maps Apple Maps
17 Internet browsing: Google Chrome (or Android Browser on older versions) Safari
18 Call features supported: Auto-respond Auto-respond, call-back reminder, do not disturb mode
19 Messaging: Google chat iMessage
20 Video chat: Using Gchat Facetime
21 Application store: Google Play – 800, 000 apps Apple app store – 775,000 apps
22 Market share: 75% of smartphones, 3.7% of tablets in North America (as of Jan'13) and 44.4% of tablets in Japan (as of Jan'13). In the United States in Q1 2013 - 52.3% phones, 47.7% tablets. 14.9% of smartphones, 87% of tablets in North America (as of Jan'13) and 40.1% of tablets in Japan (as of Jan'13)

Thursday, May 9, 2013

Difference between CSS2 and CSS3


The biggest difference between CSS2 and CSS3 is that CSS3 has been split up into different sections, called modules. Each of these modules is making it is way through the W3C schools  in various stages of the recommendation process. CSS2 was submitted as a single document with all the Cascading Style Sheets information within it. Because each of the modules is being worked on individually, we have a much wider range of browser support for CSS3 modules.A superset of CSS,  CSS2 includes a number of new capabilities like absolute relative and fixed positioning of elements the concept of media types support for aural style sheets and bidirectional text and new font properties such as shadows. CSS3 is the latest standard  version for CSS. Though CSS3 is not fully supported yet, many web developers are starting to use many of the new techniques introduced. Some of the CSS3 features are-


1. Border Radius
2. Border Images
3. Box Shadow
4. Multi-Column Layout
5. Multiple Backgrounds
6. @font-face
7. Attribute Selectors
8. Opacity
9. RGBA Colors
10. Wrapping Up


           More Information1

          More Information2

Difference Between html and html5



HTML 5 is an updated version of HTML. It’s much similar to HTML. But difference is HTML 5 contains much better support for media such as, an audio and video tag.HTML is a markup language but HTML 5 is new, there is no big difference in both of them. HTML 5 have some tags and attributes which are not in HTML

HTML
1. DOCTYPE is much longer as HTML4 is based on SGML-based.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">


2. Audio and Video are not part of HTML4 specification

3. Vector Graphics is possible with the help of technologies such as VML, Silverlight, Flash etc.
4. It is almost impossible to get true GeoLocation of user browsing any website especially if it comes to mobile devices.
5. Browser cache can be used as temporary storage.
6. Web Sockets are not available. Generally used mechanisms are long polling and streaming.
7. Works with all old browsers
8. Does not allow JavaScript to run in browser. JS runs in same thread as browser interface.

HTML5

1. DOCTYPE is required to enable standards mode for HTML documents.
<!DOCTYPE html>
2. Audio and Videos are integral part of HTML5 specifications e.g. <audio> and <video> tags
3. Vector graphics is integral part of HTML5 e.g. SVG and canvas
4. JS GeoLocation API in HTML5 helps identify location of user browsing any website (provided user allows it)
5. Application Cache, Web SQL database and Web storage is available as client side storage. Accessible using JavaScript interface in HTML5 compliant browsers.
6. Full duplex communication channels can be established with Server using Web Sockets. Accessible using JavaScript interface in HTML5 compliant browsers.
7. Most of modern browser have started supporting HTML5 specification e.g. Firefox, Mozilla, Opera, Chrome, Safari etc.
8. Allows JavaScript to run in background. This is possible due to JS Web worker API in HTML5




Wednesday, May 1, 2013

18 Brand-Spanking New Social Media Marketing Stats




1)27% of total U.S. internet time is spent on social networking sites. (Source: Experian)

 2)15% of total U.S. mobile internet time is spent on social networking sites. (Source: Experian)

3)Social media produces almost double the marketing leads of trade shows, telemarketing, direct mail, or PPC. (Source: HubSpot)

4)Social media lead conversion rates are 13% higher than the average lead conversion rate. (Source: HubSpot)

5)21% of marketers say that social media has become more important to their company over the past six months. (Source: HubSpot)

6) 74% of all marketers say Facebook is important to their lead generation strategies. (Source: HubSpot)

7) Companies that generate more than 1,000 Facebook Likes also receive nearly 1,400 website visits a day. (Source: HubSpot)

8) 52% of all marketers have found a customer via Facebook in 2013. (Source: HubSpot)

9) On Facebook, brand posts get half of their reach within 30 minutes of being posted. (Source: Socialbakers)

10) 85% of fans of brands on Facebook recommend brands to others, compared to 60% of average users. (Source: Syncapse)

11) 43% of all marketers have found a customer via LinkedIn in 2013. (Source: HubSpot)

12) 36% of all marketers have found a customer via Twitter in 2013. (Source: HubSpot)

13) HubSpot customers with over 1,000 Twitter followers generate more than 800 new website visitors a month. (Source: HubSpot)

14) 59% of Twitter users have visited B2B tech brand sites, compared to 40% for the average internet population. (Source: Compete and Twitter)

15) 25% of consumers who complain about products on Facebook or Twitter expect a response within 1 hour. (Source: American Express)

16) Women are more likely than men to regularly check out a brand's social page (48% vs. 43%). (Source: Ipsos)

17) 23% of marketers are investing in blogging and social media this year, a 9% increase from 2012. (Source: HubSpot)

18) Approximately 46% of online users count on social media when making a purchase decision. (Source: Nielsen)

Reference : http://blog.hubspot.com/