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 ?



Is it possible to assign a php variable to javascript ? And also is it possible to fetch the page ..

Answer / 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

More JavaScript Interview Questions

How do you check if a value is a number in javascript?

0 Answers  


What is the use of decodeuri() and encodeuri()?

0 Answers  


How do we add javascript onto a web page?

0 Answers  


Explain the for-in loop?

0 Answers  


How you will write a java script function that display an alert on the screen?

1 Answers   Cap Gemini,


Is javascript free to use?

0 Answers  


Is javascript object oriented?

0 Answers  


What is stack in javascript?

0 Answers  


Between JavaScript and an ASP script, which is faster?

0 Answers  


Does javascript support multidimensional arrays ?

4 Answers  


What is the use of history object?

1 Answers  


Are there any iphone Institutes which also train iphone automation testing in Hyderabad?

0 Answers  


Categories