Saturday, February 25, 2012

Wi-fi Network to Mobile using BSNL Modem


Configure Wi-fi Network to Mobile using BSNL Modem

I have configured my HTC Wild Fire – S  Wi-Fi network using BSNL modem model  DNA-A211-1

Open Internet Explorer –
Type the Following IP  - http://192.168.1.1/


Enter you user name and password as admin  in login box which will appear in your brower



After Login you will see the following screen.



Click on the Wireless option from the right hand side link menus.




Make sure in your configuration . Enable Wireless option is Check, give your own SSID (for e.g. BhushanWifi)

Select your country. (for. e.g here is INDIA)
Then click on Save/Apply

Now Step 2 

Click on Security Option from the right menu of Wireless menu option.

You will get the following below screen.

Select SSID as what u type before BhushanWifi
Select all the Above Option in your Settings
Give a WPA Pre-Shared Key which u will be used as ur mobile setting Password.

Click Save/Apply


Step 3 Click on Wireless Bridge. Option from right Menu


Check AP Mode is Access Point
Bridge Restrict is Disabled


After all process.. Reboot your Modem.


Start - your wireless options from  your mobile.. 

You will find  the network name which you entered in your SSID previously. According to screen here it is BhushanWifi network in your Mobile.
Enter your Password which is Pre Shared key previously entered by you.

Your Mobile Wifi will be connected. You can start enjoying your Wifi in your Mobile..

Thanks Regards

Wednesday, February 22, 2012

Get selected radio button value using JQuery

How to know which radio button is selected from the group of Radio Buttons on button click  using JQuery?

Example – 

I will explain with the help of an example.

Following are the radio buttons tags

  <input type="radio" name="rdNew" id="rdAll" checked="checked" value="0" >All</input>

  <input type="radio" name="rdNew" id="rdNew" value="1">New</input>

  <input type="radio" name="rdNew" id="rdInvoiced" value="3" >Invoiced</input>

  <input type="radio" name="rdNew" id="rdCancelled" value="4" >Cancelled</input>

  <input type="radio" name="rdNew" id="rdPartialInvoice" value="5" >Partial</input>

  <input type="radio" name="rdNew" id="rdPaid" value="6">Paid</input>



Input button Tag– On click we will get the value of Selected Radio Button

 <input type="button" id="btnOrder" onclick="GetSelectedRadionButtonValue();"></input>

  
JavaScript code for getting the selected radio button value.
 

<script language="javascript" type="text/javascript">

function GetSelectedRadionButtonValue ()
{
       var selectedValue = $("input[@name=rdNew]:checked").val();
 }

</script>



 selectedValue is JavaScript Variable  which will return the value of the selected radio button.



You can put this code :  $("input[@name=rdNew]:checked").val();

Tuesday, February 21, 2012

Setting customised Item Level Permission to the Group


How to set Customized item level Permissions to SharePoint Groups through Code C# in event receiver?
Here in Example we will assign “View Only” Permission to “HomeOwner”Group.

Note : Here “View Only” is Customized Permission created with Specific rights assigned in that group and “HomeOwner” is group Created in share point Group.

Assuming that you know how to create the Event Receiver in SharePoint and its Events.
Example. We will use C# code in Event receiver.

Following is the function written to set the Group Level Permission.
private void SetPermissionToGroup(stringgroupName, SPListItem listItem, ArrayList permissionList, SPWebspWeb)
{

SPGroup spGroup = spWeb.SiteGroups[groupName];
foreach (stringpermission in permissionList)
{
SPRoleDefinition spRole = spWeb.RoleDefinitions[permission];
SPRoleAssignment roleAssignment = new SPRoleAssignment(spGroup);
roleAssignment.RoleDefinitionBindings.Add(spRole);
if (!listItem.HasUniqueRoleAssignments)
{

listItem.BreakRoleInheritance(true);
}

listItem.RoleAssignments.Add(roleAssignment);
}
}


In the above Function SetPermissionToGroup we require 4 paramenters

Parameter 1: groupName: Which requires the Group name to passed to set the Permission for e.g “HomeOwner”

Parameter 2: SPListItemParamete this: Which requires a SPListItem for which the permission is to be set.

Parameter 3: ArrayList : Which requires the list of Permission to be set on the Item.For eg. new ArrayList { "View Only" }

Parameter 4: SPWeb : Which requires the SPWeb.

You can pass the Parameter as given below in your Event. I have used in ItemAdded Event.

SetPermissionToGroup("Homeowners", item, new ArrayList { "View Only" }, Site);

How to Change Display name of User in Sharepoint.

Change the Display name of the User in Sharepoint

You can use power Shell script to change the Display name of the User

For example

Set -SPUser -Identity "existingdisplayname" -DisplayName "newDisplayname" –Web http://sitename

Trimming issue in IE 8 .trim(). JQuery


Trimming issue in IE 8 .trim().

Using .trim() to trim the value of the text does not works properly in I.E 8


For example

   var productName =$("#hdnProdName").val().trim();
 
for the above code we get an error message


"Message: Object doesn't support this property or method"


Solution for this Issue is.

 Use

   var productName = $.trim($("#hdnProdName").val());



This works in all browsers well.