Ajax (1) Apex Class (12) Apex Trigger (2) Community (2) Home Page (1) HTML (4) Integration (3) JS (7) KB (1) Label (1) Licenses (1) Listing (1) Log (1) OOPs (5) Sharing (1) Static Resource (1) Test Class (3) URI (1) Visualforce (10)
Showing posts with label HTML. Show all posts
Showing posts with label HTML. Show all posts

Sunday, 11 January 2015

How to Auto refresh a page one time.

<script type="text/javascript">  $(document).ready(function(){    //Check if the current URL contains '#'   if(document.URL.indexOf("#")==-1)  {  // Set the URL to whatever it was plus "#".  url = document.URL+"#";  location = "#";    //Reload the page  location.reload(true);    }  });  </script> 

Thursday, 21 August 2014

Resize Iframe

<script language="JavaScript">


function autoResize(id){
    var newheight;
    var newwidth;

    if(document.getElementById){
        newheight=document.getElementById(id).contentWindow.document .body.scrollHeight;
        newwidth=document.getElementById(id).contentWindow.document .body.scrollWidth;
    }

    document.getElementById(id).height= (newheight) + "px";
    document.getElementById(id).width= (newwidth) + "px";
}

</script>

<iframe src="https://thekrrish.weebly.com" width="100%" height="100%"  name="CHANGETHIS" id="CHANGETHIS" marginheight="0" frameborder="0" onLoad="autoResize('CHANGETHIS');"></iframe>

Wednesday, 20 August 2014

Hide iframe element with id

<script>  function myFunction()  {  //alert("Page is loaded");  var iframe = document.getElementById('myFrame');  var frameDoc = (iframe.contentDocument || iframe.contentWindow.document);   frameDoc.getElementById('j_id0:SiteTemplate:j_id16:j_id17:j_id25:j_id26:j_id259').style.display = 'none';   //frameDoc.getElementById('j_id0:SiteTemplate:j_id16:j_id17:j_id25:j_id26:j_id67').style.display = 'none';      //alert("Page is loadedagain ");  }  </script>

    
<body onload="myFunction()">            <iframe id="myFrame" src="http://fullsb-aurea.cs16.force.com/internal/articles/en_US/Article/{!pkbCon.theKad.urlName}?l=en_US&fs=Search&pn=1" width="800" height="1000" ></iframe>                     </body>



Monday, 23 June 2014

Web to lead with record Type

<!--  ----------------------------------------------------------------------  -->
<!--  NOTE: Please add the following <META> element to your page <HEAD>.      -->
<!--  If necessary, please modify the charset parameter to specify the        -->
<!--  character set of your HTML page.                                        -->
<!--  ----------------------------------------------------------------------  -->

<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8">

<!--  ----------------------------------------------------------------------  -->
<!--  NOTE: Please add the following <FORM> element to your page.             -->
<!--  ----------------------------------------------------------------------  -->

<form action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">

<input type=hidden name="oid" value="00D90000000roim">
<input type=hidden name="retURL" value="http://www.kg91.weebly.com">

<!--  ----------------------------------------------------------------------  -->
<!--  NOTE: These fields are optional debugging elements. Please uncomment    -->
<!--  these lines if you wish to test in debug mode.                          -->
<!--  <input type="hidden" name="debug" value=1>                              -->
<!--  <input type="hidden" name="debugEmail" value="kg91.in@gmail.com">       -->
<!--  ----------------------------------------------------------------------  -->

<label for="first_name">First Name</label><input  id="first_name" maxlength="40" name="first_name" size="20" type="text" /><br>

<label for="last_name">Last Name</label><input  id="last_name" maxlength="80" name="last_name" size="20" type="text" /><br>

<label for="email">Email</label><input  id="email" maxlength="80" name="email" size="20" type="text" /><br>

<label for="company">Company</label><input  id="company" maxlength="40" name="company" size="20" type="text" /><br>

<label for="city">City</label><input  id="city" maxlength="40" name="city" size="20" type="text" /><br>

<label for="state">State/Province</label><input  id="state" maxlength="20" name="state" size="20" type="text" /><br>

<label for="Campaign_ID">Campaign</label><select  id="Campaign_ID" name="Campaign_ID"><option value="">--None--</option><option value="70190000000gZI1">GC Product Webinar - Jan 7, 2002</option>
<option value="70190000000gZI2">User Conference - Jun 17-19, 2002</option>
<option value="70190000000gZI3">DM Campaign to Top Customers - Nov 12-23, 2001</option>
<option value="70190000000gZI4">International Electrical Engineers Association Trade Show - Mar 4-5, 2002</option>
</select><br>

<label for="recordTypeID">RecordType</label><select  id="RecordType_ID" name="recordTypeID"><option value="">--None--</option><option value="01290000000tzEVAAY">A</option>
<option value="701290000000tcJ3AAI">for Cars</option>
</select><br>

<input type="submit" name="submit">

</form>