View Full Version : Talking to another page

12-14-2007, 08:48 PM
Hey all,

Im not to familiar with JS so this may be impossible or easy to do, but my question is i want to talk to another page from another page.

For example i have a color picker for javascript and i am trying to take an onClick and have that certain function talk to the other page to tell it to change the color.

how would i take for instance:

function SendColor() {

some code


How would i send that to another existing page to complete that function?

thanks in advance if this is possible!!

12-14-2007, 09:08 PM
If the second page is simply called by the first page, you can call it with the additional information appended to the called url. Thus instead of calling targetpage.htm, you can call targetpage.htm?color=#FF0000.

The target page can then parse location.search. In this case the value of location.search would be "?color=#FF0000".

John Rostron