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 null javascript?

974


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

933


How to make a array as a stack using javascript?

997


What is dom in javascript?

985


Which javascript is best?

938


What is the use of a boolean object in javascript?

1012


name any two javascript functions which are used to convert nonnumeric values into numbers?

908


How many types of functions are there in javascript?

909


Explain prototypal/differential inheritance?

1066


If an array with name as "names" contain three elements, then how will you print the third element of this array?

994


What is the statement to enable strict mode in javascript quiz?

1055


Does javascript have the concept level scope?

990


TypeError: document.getelementbyid(...) is null?

931


Should I disable javascript?

926


What is viewstate in javascript?

1016