Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Is it possible to assign a php variable to javascript ? And
also is it possible to fetch the page contents if the url
is not under our control ?

Answer Posted / gagan rana

Yes ,it is possible by doing like the following:

<?php

$x = 'hai!';

echo "<script>var x = '" . $x . "';</script>";

?>

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is dart better than javascript?

891


What are the benefits of learning javascript?

945


How to have the status line update when the mouse goes over a link (the support of the status line is sporadic)?

965


How much do javascript programmers make?

888


What does the "Access is Denied" IE error mean?

1278


What is the reason for wrapping the entire content of a javascript source file in a function book?

1011


How do functions work in javascript?

943


How to write html code dynamically using JavaScript?

964


What is string in javascript?

1040


How to find the selected radio button immediately using the 'this' variable?

931


Should you disable javascript?

932


What is variable typing?

1013


How to handle event handlers?

982


What is singleton class in javascript? Explain

969


What is memory leak in javascript?

899