Thursday, June 18, 2009

String Split using JavaScript

Found this helpful when I'm trying to modify a script that I didn't do...hehehe

Split a string in JavaScript using the following method:

var stringToSplit = "string-to-split";
var splitArray = stringToSplit.split("-"); //splits the string when the system encounters "-", the delimeter
In a function:
<SCRIPT language="JavaScript">
<!--
function split_string() {
var stringToSplit = "string-to-split";
var splitArray = stringToSplit.split("-");
alert(splitArray[0] + "\n" + splitArray[1] + "\n" + splitArray[2]);
}
//-->
</SCRIPT>
<FORM>
<INPUT TYPE="button" onClick="split_string()" value="Split string-to-split!" />
</FORM>

Tuesday, June 9, 2009

Con-Ass? Anyone?

Have you heard of Constituent Assembly?  If not, then you should check the local news as this is what's hottest in politics these days.

During these times (I mean when National Election is fast approaching), Cha-Cha (Charter Change) is always the noisiest thing in politics.  Some of the people in positions want to amend the current laws of our country.  As to why, I don't fully understand.  A lot of people (who are against it) are telling me, if the administration wants to change the provisions to their favor, it will be bad for us.  They said, there will be another Ferdinand Marcos if this happens.  But even so, isn't GMA already told us she will really end her term?  Does this mean that the people don't really trust her words anymore?  Because if that's the case, maybe Con-Ass isn't a bad idea after all to retain the respect and fear of the people to the authorities.

I mean, have you seen the country right now?  Rallies here and there, most are shouting "Gloria Resign!".  We are indeed given the right to freedom and the democracy, but all I can see now is abuse of that freedom.  The people want to overthrow anyone in GMA's position, as if no one's going to be good enough for our beloved country.

I'm not ranting about this.  Something about the "Ako Mismo" campaign hit me that I'm trying my best not to blog anything that might destroy our country's reputation.  All I want is for the people to have faith on our leaders.  Yes, we heard a lot of corruption issues.  Yes, there are cheating everywhere.  And yes, they've made mistakes.  Who didn't???

Being on that position isn' easy.  I believe that GMA is doing her best to please us.  But she can't do everything.  She indeed has the power to mandate everything, but she's not a superhuman.  Even though she's the President of the Philippines, she's still a person who has a limitation.

Now, about the con-ass.  Do you agree to have amendments in our current laws?  Or are you one of those people who want to stop Con-Ass tomorrow?  Will you take a step. try to be heard, and oppose the Con-Ass?  Or are you in favor of that?  As we always hear in marriage ceremonies, "Speak now or forever hold your peace...".

Monday, June 8, 2009

2010 Presidentiables

Hello again.  This is just going to be a short one since I still have work to do.

In the news this evening, one of the reports was about the presidentiables for the coming national election.  Well, surveys say that GMA's trust survey went down.  Likewise, polls for Joseph Estrada, Mar Roxas, etc. went up.  Noli de Castro's credibility is torn when a group of people rallied and campaigned for "No Votes for Noli".  *sigh...when will this ever end????

Anyway, the question is not whose presidentiable will be worthy enough for the position.  From my viewpoint, the real question is, whose presidentiable is the LEAST evil that CAN be on that position.

My sister, who's still in first year high school, told us, a lot of people hate GMA again.  She said that no matter what GMA do, people won't trust her again.  Well, our mom and I told her, it's not easy to be in that position.  No matter how huge her accomplishments are, people will find a way to destroy her.  This goes on and on from the beginning, no only in her watch.  She might have done 5 good things during her administration, but one small mistake and the people won't trust her anymore.  That's life...that's Philippines...that's the world.  Do you know crab mentality?  Well, that's the reason...