Free Android CakePHP GMaps Articles by Bali Web Design

September 20, 2008

How to load javascript file on window on load

Filed under: html,javascript — Tags: , — admin @ 7:36 pm

Here is another way to load a javascript file on window on load.

<script type="text/javascript">
window.onload = function () {
var script = document.createElement("script");
script.src = "site/js/3000297746.js";

August 1, 2008

Yellow background on HTML text field Form

Filed under: html — Tags: , — admin @ 10:05 am

Have you ever found a confusing condition on your browser IE or Firefox that when you open an HTML Form page some text field has yellow background even you dont have this color on your css or html.

This situation also make me confuse because my client said that he saw yellow background on a computer but on another computer he doesn’t see yellow background. He want to know the answer why.

I was already thinking about this confusing thing before, but i didn’t try to find more detail about this problem. But i know this is something to do with the plugin on browser. Something like auto complete form.

So i go to forum and found the reason. According to the forum, it is because we use google toolbar for auto complete capability when we input data on HTML form. So we can set an auto complete form when we fill another html form later.

To disable the toolbar just go to View > Toolbars > Google Toolbar. And then refresh the browser. The textfield background will colouring with its original color.

July 29, 2008

How to post form into a popup window

Filed under: html,javascript — Tags: , — admin @ 10:04 am

When you need to send a variable to a popup window from mainpage, ussually we will put it in url as GET method. But using this problem we will get problem when the variable has long character. We know that GET has limited long.

So we need to use POST method to submit a form. But how we can do it? I have a trick how to do it.

First we create a javascript for handling onsubmit event on html form.

function thePopupWindows(windowsname){
var win ='', windowsname, ''width=580,height=450');
return true;

and then set this function on HTML Form :

<form action="popupwin.php" method="post" target="thepopup" onsubmit="return thePopupWindows(;">
<input id="name" name="name" type="text" />
<input type="submit" value="Submit">