Wednesday, November 16, 2011

How to Create Image on Button


Would you like to create a button like the left button with an image?

You can do it with just HTML code without any javascript or so ever...Copy the code below..

<button type="button" name="login_button" class="button"><img src="images/lock.png" width="15" height="15" border="0" />&nbsp;Login</button>

The button will look like this...


So, if you like to have a button just like mine, you got to have the css style for this button.

.button{background:url(images/button.png) no-repeat 0 0;width:80px;height:34px;border:none;color:#fff;cursor:pointer;text-align:center;line-height:34px;font-weight: bold;}

And now the last path is the image, save this image (below) in the location that your file can reach it.




Hope you manage to do it...

Sunday, September 18, 2011

HD Player VS Blu Ray

I guess the store that sells the CD, DVD and also Blu Ray doesn't practical anymore when the technology come with HD Media Player that not require a disc! It make me thinking what will happen to our entertainment industry someday?

As people in Malaysia, the government has been prevent some downloaded site to visit as free downloaded site to help the entertainment industry back in business.

But are the government can prevent the technology grow? as I know the HD Player only require a movie data in your harddisc or USB. The movie itself you can share between your friend or downloaded it for free in the internet.

When we talks about internet, no one can stop it from grow. The movie/music itself, when the government prevent the downloaded site, we have the other choice. The downloaded site is too much to handle by the government. 

But do you know that we as the user that always happy when downloaded the movie now faces the scam in the internet. I couldn't happy anymore as the scam all over the new and hottest film nowadays. It's hard to get the right copy. 

It make sense now that one day we buy a disc from the pirate disc. It funny now we been cheated back by them. It a cycle of life.

Saturday, August 20, 2011

How to make Small Ads at Sidebar

You want to add this to your Blog? Full Ads at Sidebar you can view in here..

Step 1 :-
Go to Settings -> Add a Gadget -> Choose HTML/JavaScript

Step 2 :-
Copy and Paste this Code Below.


<div align="center"> <table align="center" cellpadding="0" cellspacing="3" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"> <tbody> <tr><td style="text-align: center;"> <a href="http://www.churpchurp.com/mizsyaahmad/share/churpchurp-invite"> <img border="0" src="http://cdn.main.churpchurp.com/buzz/img/571/5552.jpg" width="100" height="100" /> </a></td><td style="text-align: center;"> <a href="http://www.churpchurp.com/mizsyaahmad/share/MaxisHotTiket"> <img border="0" src="http://cdn.main.churpchurp.com/buzz/img/4332/6492.jpg" width="100" height="100"/> </a></td></tr> <tr><td class="tr-caption" style="text-align: center;"> <a href="http://www.churpchurp.com/mizsyaahmad/share/churpchurp-invite"> Invite Your Friend & Get RM1.00 each</a></td> <td class="tr-caption" style="text-align: center;"> <a href="http://www.churpchurp.com/mizsyaahmad/share/MaxisHotTiket"> Don’t forget your loved ones this Ramadhan</a></td></tr> </tbody></table> </div>

Step 3 :-
Change the Red Color to Your Ads URL

Step 4 :-
Change the Blue Color to Your Ads Image

Step 5 :-
Change the Green Color to Your Ads Descriptions

Step 6 :-
You can saved your HTML/JavaScript and view your Ads now...

Thank you...and have a nice day...

Tuesday, August 16, 2011

New Adobe Muse : No code needed



Adobe released the public beta of its new website creation software, code-named Muse, on Monday.

Unlike Dreamweaver, Adobe’s flagship web development tool, Muse is for graphic designers who want to create elegant websites without having to code.

We’ve been playing with Muse for the past two weeks as part of the private beta, and we are impressed with the tool’s functionality and featureset. What differentiates Muse from some other code-free website creation tools is this: the user interface and the design paradigms mimic those from other Adobe Creative Suite applications, namely InDesign.

This was by design. Adobe says that the majority of users who identify themselves as graphic designers — i.e., not web developers or interaction designers — still primarily work with print. Muse is for these users.

A common scenario is that a graphic designer will create a website in Illustrator, Fireworks or Photoshop and then pass the flattened file off to web designers who will then do their best to code the comp.

With Muse, Adobe hopes to eliminate that coding step for users whose sites don’t need lots of dynamic content — and who want to lay out and generate the code for their site with one tool.

Wednesday, August 10, 2011

Why Google + is better than Facebook

So, Google launched its long-awaited new social network Google +. According to rumors, it was she was instantly at the peak of popularity, Facebook moved into second place. According to the site comScore, before users spent 62% more time on Facebook, than on Google and its related sites, which could not possibly please the developers of Google and meant a significant loss in advertising. Former Projects Google, such as Buzz and Orkut, have failed, but a new attempt, a social network Google +, has been very successful and has a good chance to completely replace Facebook.


1. Slogan «Google Plus» is the simplicity and naturalness, and its positioning as a "simple and easy way to share information with friends." Thus, the main advantages of «Google Plus»:

The first advantage: Privacy. «Google Plus» introduced a special "community" - the specific group of users, so that you can determine for themselves what information and with whom to share.


2. The second advantage: Facebook offers the option of "friends" - so, basically, you can also determine for themselves what content and for any of your readers is an open question. But the process of forming groups of friends on Facebook is much more complicated than «Google Plus».


3. The third advantage: «Google Plus» is the perfect addition to the projects Google Map and operating system, Android, which acts on many smartphones.


4. A fourth advantage: Facebook recently too, "overcrowded". Often in your contact list you can find people, which generally have no idea. According to recent studies, all in a larger number of Facebook users a feeling of unease and insecurity. In addition, the site leaves a lot of users, saying that just because they have too many unwanted contact and receive requests for admission to friends of people with whom to be friends and do not want to communicate. It should also be noted that most U.S. citizens are dissatisfied with where and created a social network. Eloquent proof, is not it?

The fifth advantage: Because the encoding site Facebook is a PHP, to develop applications for the site is problematic. And just in the application of social networks and are most popular.

The sixth advantage: As long as that one advantage of Facebook is that it can create pages of firms and companies to promote their advertising and promotion in the market. But «Google Plus», most likely, too, will soon be possible.

Seventh: In addition, the company Google is elementary more experience than of Facebook, at least by the fact that it exists for a longer time.
Eight: And, finally, the option «Google Plus», as Huddle, which allows you to send messages to groups of friends entirely.


5. That these eight factors are prerequisites for the enormous success Google Plus. Time will tell whether this will get a new social network development.








Friday, August 5, 2011

FREE BLOG PROMOTION IN AF


Hey guy, I has joined the blog promotion in Awan Fantasia. It's Cool and it was my first time to enter any contest or segment like this. I build this SHASSCRIPT blog to share the information that I know. I'm working as a programmer and my job have to write code every day. I Love my Job. I'm also have the other blog that I use to write the latest news, information, and my personal life @ ♥Sya♥.

For your info as well, you can also find me in here :-


Follow me ya!! (^_^)

Thanks to Awan Fantasia to think this cool idea.

How to Change the Broadband Provider


Before this I was a Celcom user, but decide to end the service with them. My hubby use HTC with Digi Internet. I try to put the Digi Simcard in the Broadband but unfortunately it lock.

After google it for some time, I found one website that can unlock your broadband code online. As easy as ABC.

Step 1 :
Take a look at your Broadband, find the IMEI code behind it.

Step 2:
Go to Unlock Huawei Device to enter your IMEI code and Capcha code and Generate the unlock code.

Step 3:
Put the Digi Simcard in the Broadband and connect to your PC.

Step 4:
A Message will prompting ask for unlock code.  Just enter the code given to you earlier by that website.

And Walla...You can start enjoying surfing the Internet with any provider. Good Luck ya!!

Tuesday, August 2, 2011

How to Display Ubuntu on Projector/External Monitor

Recently I've switched my OS to uBuntu. But I found the function to switched to external monitor is not working. After google it, I found my solution.

Here what i found:

Step 1:
Open Terminal

Step 2:
Find the location of this file xorg.conf

locate xorg.conf

Step 3:
Type this code

sudo gedit 'location of the file'
example:(not every version have the same location)

sudo gedit /etc/X11/xorg.conf

Step 4:
It will appear like this One

Section “Device”
..
..
EndSection

Insert the code below before the EndSection:

Option “MonitorLayout” “CRT,LFP”
Option “Clone” “true”
Option “DevicePresence” “true

And Restart your PC or Press “Ctrl + Alt + Backspace” to restart Xorg.conf

And Walla!!...It automatically appear on the external monitor..exactly like your PC, no need to change the resolution either..

I love uBuntu..♥♥♥

Tuesday, July 26, 2011

Redirect Page to Index(Login) after Logout

If you had trouble to force your page to login page again after logout. I have the solution for you that I use in Javascript. It work fine in IE. You can try it out too.



<script>
function backButtonOverride()
{
// Work around a Safari bug
// that sometimes produces a blank page
setTimeout("backButtonOverrideBody()", 1);
}
function backButtonOverrideBody()>
{
// Works if we backed up to get here
try {
history.forward();
} catch (e) {
// OK to ignore
}
// Every quarter-second, try again. The only
// guaranteed method for Opera, Firefox,
// and Safari, which don't always call
// onLoad but *do* resume any timers when
// returning to a page
setTimeout("backButtonOverrideBody()", 500);
window.location = "index.php";
}
</script>

Friday, July 22, 2011

Google Buy G.co for URL shortener


Google has just bought the domain shortener G.co to provide a service on site URL address.

This treatment is later provided to cut the links the URL (Universal Resource Locator) of a range of services of Google, in order to be distributed to various social networks and services microblogs.

"We will use G.co to submit websites that are owned by Google. So, every time there is a link g.co, users can make sure that the link when clicked on will only lead to Google services," said Google is collected from the site PCWorld .

The emergence of this G.co services later will not affect shortener services  public url that had been operating Goo.gl. Not yet known what price incurred by Google to purchase this domain. However, generally the domain. Co beginning with the letters sold for more than U $ 1.5 million or around Rp 13 billion.

Some companies also have top domains. Co. Besides Google, Overstock has purchased the domain O.co. While Amazon has bought the domain A.co, Z.co, K.co, and Cloud.co. Twitter even do not want to miss, bought T.co as a service URL.

In fact, domain. Co initially provided as a domain for the Republic of Colombia. But with the permission of that country, commercialized as an alternative of growing domains is full. Now, domain registration. Co reported to have more than 1 million names.

Make Drop Down Menu From PHP Function

We use be writing a Drop Down with HTML...But I have found simple way to make it short...

Here the older one (HTML):-

<select name="P_State" class="textinput" id="P_State" onChange="display_district11(this.value)" tabindex=5> <option value="">--Please Select--</option>
<?php
do {
?>
<option value="<?php echo $row_state['CD_State']?>"<?php if (!(strcmp($row_state['CD_State'], $row_ins['CD_State']))) {echo "selected=\"selected\"";} ?>><?php echo $row_state['Desc_State']?></option>
<?php
} while ($row_state = mysql_fetch_assoc($state));
$rows = mysql_num_rows($state);
if($rows > 0) {
mysql_data_seek($state, 0);
$row_state = mysql_fetch_assoc($state);
}
?>
</select>


Here is the PHP code that I use...You just need to call this function only when you need to use the down drop..short isn't it?

<?php

$PP_State = '';
$js = "display_dis(this.value,'PP_District','panel_addr','8')";
 State_db('PP_State', 'PP_State', '7', $PP_State, $js);?>

The Code below, you need to put to some place that you can call it...
example : - Create a new page, and other page that you need the Drop Down just include this page...easy...

<?php
function State_db($name, $id, $tab, $exist, $java)
{
$sql = 'SELECT CD_State, Desc_State FROM LT_State ORDER BY Desc_State ASC';
$result = mysql_query($sql);
echo '<select name="'.$name.'" id="'.$id.'" class="textinput" tabindex="'.$tab.'" onchange="'.$java.'">';
echo '<option value="">Please Select</option>';
while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
$cd = $row['CD_State'];
$desc = $row['Desc_State'];
$selected = ($cd==$exist)?'selected':'';
echo '<option value="'.$cd.'" '.$selected.'>'.$desc.'</option>';
}
echo '</select>';

}
?>

Friday, June 3, 2011

Recent Post Widget





1. Dashboard > design > add a gadget > HTML/javascript

2. Copy and Paste this Code.



<style type="text/css" media="screen">
<!--
#spylist {
overflow:hidden;
margin-top:5px;
padding:0px 0px;
height:350px;
}
#spylist ul{
width:220px;
overflow:hidden;
list-style-type: none;
padding: 0px 0px;
margin:0px 0px;
}
#spylist li {
width:208px;
padding: 5px 5px;
margin:0px 0px 5px 0px;
list-style-type:none;
float:none;
height:70px;
overflow: hidden;
background:#fff repeat-x;
border:1px solid #ddd;
}
#spylist li a {
text-decoration:none;
color:#4B545B;
font-size:11px;
height:18px;
overflow:hidden;
margin:0px 0px;
padding:0px 0px 2px 0px;
}
#spylist li img {
float:left;
margin-right:5px;
background:#EFEFEF;
border:0;
}
.spydate{
overflow:hidden;
font-size:10px;
color:#0284C2;
padding:2px 0px;
margin:1px 0px 0px 0px;
height:15px;
font-family:Tahoma,Arial,verdana, sans-serif;
}
.spycomment{
overflow:hidden;
font-family:Tahoma,Arial,verdana, sans-serif;
font-size:10px;
color:#262B2F;
padding:0px 0px;
margin:0px 0px;
}
-->
</style>
<script language='javascript'>
imgr = new Array();
imgr[0] = "http://2.bp.blogspot.com/_CEj8AwvwSNM/TPkQUkM0wnI/AAAAAAAAFD8/TxYWe-CMPr8/s320/no_image.gif";
imgr[1] = "http://2.bp.blogspot.com/_CEj8AwvwSNM/TPkQUkM0wnI/AAAAAAAAFD8/TxYWe-CMPr8/s320/no_image.gif";
imgr[2] = "http://2.bp.blogspot.com/_CEj8AwvwSNM/TPkQUkM0wnI/AAAAAAAAFD8/TxYWe-CMPr8/s320/no_image.gif";
imgr[3] = "http://2.bp.blogspot.com/_CEj8AwvwSNM/TPkQUkM0wnI/AAAAAAAAFD8/TxYWe-CMPr8/s320/no_image.gif";
imgr[4] = "http://2.bp.blogspot.com/_CEj8AwvwSNM/TPkQUkM0wnI/AAAAAAAAFD8/TxYWe-CMPr8/s320/no_image.gif";
showRandomImg = true;
boxwidth = 255;
cellspacing = 6;
borderColor = "#232c35";
bgTD = "#000000";
thumbwidth = 70;
thumbheight = 70;
fntsize = 12;
acolor = "#666";
aBold = true;
icon = " ";
text = "comments";
showPostDate = true;
summaryPost = 40;
summaryFontsize = 10;
summaryColor = "#666";
icon2 = " ";
numposts = 10;
home_page = "http://URL BLOG.blogspot.com/";
limitspy=4;
intervalspy=4000;
</script>
<div id="spylist">
<script src='https://sites.google.com/site/unwanted86/javascript/animatedrecentpost.js' type='text/javascript'></script>
</div>
</center>
<small><a href="http://shasscript.blogspot.com/2011/06/recent-post-widget.html" target="_blank">get this widget here</a></small>


Note : Please change the URL to your blog.

Tuesday, May 31, 2011

Can't open .docx file in Internet Explorer

If you having trouble with this situation...try to put this code


AddType application/vnd.ms-word.document.macroEnabled.12 .docm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType application/vnd.ms-powerpoint.template.macroEnabled.12 potm
AddType application/vnd.openxmlformats-officedocument.presentationml.template potx
AddType application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
AddType application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
AddType application/vnd.ms-excel.addin.macroEnabled.12 xlam
AddType application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
AddType application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
AddType application/vnd.ms-excel.template.macroEnabled.12 xltm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx

in file called .htaccess or you can add this code into httpd.conf...then you should open .docx file again..(close and reopen IE)..

Note : If you add in the code into httpd.conf, you should restart your server : service httpd restart.

Monday, May 23, 2011

Calculating differences between two date in months and days

<?php
$date1 = $TPC_From;
$date2 = $TPC_To;
$diff = abs(strtotime($date2) - strtotime($date1));
$years = floor($diff / (365*60*60*24));
$months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24));
$days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));
printf("%d bulan, %d hari\n", $months, $days);  ?>

You can customize the code using your own purposes..

Thursday, May 5, 2011

HTML button tag

Do you know that the button tag in Internet Explorer will submit the text between the <button> and </button> tags but other browsers will submit the content of the value attribute as we want it to be. In IE we have to use the input element to create buttons in an HTML form, But it still can't bring the value as I want. The value attribute is the button label.


Is there a chance that IE can take value in button tag..I have try in IE 8, it can but I got a problem with compatibility view..



Friday, April 15, 2011

for each in php

1. For each bring one value at a time

<?php

 $fruit
= array( "Banana","Apple", "Plum");

foreach (
$fruit as $fruit_name)
{
    echo 
"$fruit_name<br/>\n";
}
?>
 


The above will display:
Banana
Apple
Plum 
2. For each bring two value in the array


<?php

$fruitColours 
= array("Banana" => "Yellow","Apple"  => "Green","Plum"   => "Purple");

foreach (
$fruitColours as $fruit_name => $fruit_colour)
{
    echo 
"$fruit_name is $fruit_colour<br/>\n";
}
?>




The above will display:
Banana is Yellow
Apple is Green
Plum is Purple

LinkWithin

Related Posts Plugin for WordPress, Blogger...