freelanceprogrammers.org Forum Index » PHP

How to load smarty variables from javascript variable?


View user's profile Post To page top
uthayaa_p Posted: Thu May 05, 2005 11:48 am


Joined: 12 Apr 2005

Posts: 19
How to load smarty variables from javascript variable?
Hi,


<script language="javascript">
{$groupattribarr} =getAttributs();
function getAttributs()
{
return array
}
</script>

<html>
<body>
{recursion_view_customer_details
groupattribstr=$groupattribstr
groupattribarr=$groupattribarr}
</body>
</html

From the above snippet, smarty variable
$groupattribarr
should get the values dynamically from javascript?

Please give me some suggestions ..

Thanks
uthaya



__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail
Reply with quote
Send private message
View user's profile Post To page top
gangyakin Posted: Fri May 06, 2005 6:54 pm


Joined: 06 May 2005

Posts: 2
How to load smarty variables from javascript variable?
--- In php-objects@yahoogroups.com, uthaya kumar <uthayaa_p@y...>
wrote:
> Hi,
>
>
> <script language="javascript">
> {$groupattribarr} =getAttributs();
> function getAttributs()
> {
> return array
> }
> </script>
>
> <html>
> <body>
> {recursion_view_customer_details
> groupattribstr=$groupattribstr
> groupattribarr=$groupattribarr}
> </body>
> </html
>
> From the above snippet, smarty variable
> $groupattribarr
> should get the values dynamically from javascript?
>
> Please give me some suggestions ..
>
> Thanks
> uthaya
>

Something should be cleared that javacode as you metioned above will
be run at client side; and php code will be run at server side. so if
you want get some varible value from javacode, that is from client
side, you should use HTML code <form> or from URL. then get varible
in phpcode file.
for example :
* the HTML code like : <form action=login.php ><input type=edit
name=pv_pw><input name=pv_un></form>
* the login.php like : if($_POST["pv_un"]=="yourname" and $_POST
["pv_pw"]=="1234") {echo "ok";}

so , your code in client side, almost like this:
> <script language="javascript">
> something=getAttributs();
> function getAttributs()
> {
> return array
> }
> </script>
>
> <html>
> <body>
> some code generate by recursion_view_customer_details
> </body>
> </html
asume that {$groupattribarr}= something in php.

holp that is clear and helpful.
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
Booking Calendar - reservation calendar script
Land Surveying - total station instruments and equipments
China Wholesale - Electronics Products
Character Studio - Tutorials and Help