You are here: Re: Calling Javascript function in php script. « PHP Programming Language « IT news, forums, messages
Re: Calling Javascript function in php script.

Posted by IchBin on 11/12/06 16:14

Jerry Stuckle wrote:
> IchBin wrote:
>> IchBin wrote:
>>
>>> BKDotCom wrote:
>>>
>>>> echo the function call from php likey so?
>>>> echo 'setCheckedValue("abbr_letter", "'.$_SESSION['abbr_letter'].'");
>>>> '; //?
>>>>
>>>
>>> Thanks for the call format. I think I maybe having a problem with the
>>> javascript function.
>>>
>> Yea, I rewrote the js function and I know it works now... I just need
>> to find the right place to call it in my code.
>> function setCheckedValue(newValue) {
>> var len = document.author_abbrv.abbr_letter.length
>> for(var i = 0; i < len; i++) {
>> document.author_abbrv.abbr_letter[i].checked = false;
>> if(document.author_abbrv.abbr_letter[i].value ==
>> newValue.toString()) {
>> document.author_abbrv.abbr_letter[i].checked = true;
>> }
>> }
>> }
>>
>
> You can't "call" a JS function from your code. PHP runs on the server,
> and JS on the client.
>
> You can, however, echo a value from PHP in the JS code.
>
Thanks...

--
Thanks in Advance... http://ichbin.9999mb.com
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
______________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация