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

What is enum with example?

1006


Explain how to detect the operating system on the client machine?

936


What is a module in javascript?

1063


What is the use of blur function?

974


What is the data type of variables in javascript?

1019


What Does JavaScript Void(0) Mean?

951


How do you disable javascript?

922


What is innertext javascript?

973


What is a framework programming?

929


What close() does in javascript?

954


How do you round a value in javascript?

925


What javascript method would convert the string “20” to an integer (on the fly) so “20” + 20 = 40?

929


What are self invoking functions?

961


How to get an element by class in javascript ?

1100


What is a named function in JavaScript? How to define a named function?

986