Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 23rd, 2005, 07:44 AM
Registered User
 
Join Date: Jul 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ghalebro Send a message via Yahoo to ghalebro
Default get value from javascript and use in php loop

Hi,

I want to get the value from javascript into php and my loop will go on according to the value received from javascript. But i am not getting into the loop. I tried type casting too but could not get solution. Can any one help me please. My code goes like this

<script language='javascript'>
var nom = 3;
    </script>
<?php
    $nom = "<script language='javascript'> document.write(nom);</script>";
echo $nom;
for($i=0; $i<$nom; $i++)
{
    echo "Test";
}
?>

 
Old February 23rd, 2005, 07:53 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Suggest this goes into a JavaScript forum.

You may want to look at my reply in this thread:

http://p2p.wrox.com/topic.asp?TOPIC_ID=11765

You cannot pass a client side value to a server side process without a web request of soome sort.

--

Joe (Microsoft MVP - XML)





Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript 'for' loop in xslt mummra1 XSLT 22 February 6th, 2007 04:26 PM
What am I doing wrong: Javascript For Loop interrupt Javascript How-To 4 June 19th, 2006 05:23 AM
incrementing javascript loop use i++ or ++i crmpicco Javascript How-To 4 May 11th, 2006 01:39 AM
how to build a JavaScript for loop decrement (--) crmpicco Javascript How-To 2 November 15th, 2005 12:24 PM
javascript with php kuehhc Beginning PHP 8 February 1st, 2005 10:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.