Skip to content

Tag: javascript

Cakephp: how to pass values into a javascript file?

I have some javascript that is being included in a view and I used inkedmn’s method in this thread: adding-page-specific-javascript-to-each-view-in-cakephp So I now have the following code in my view: But I need to pass some values from the view into the javascript file and I’m unsure of how to ac…

Javascript Equivalent to PHP Explode()

I have this string: 0000000020C90037:TEMP:data I need this string: TEMP:data. With PHP I would do this: How do I effectively explode a string in JavaScript the way it works in PHP? Answer This is a direct conversion from your PHP code:

how to include js file in php?

I have a problem with an js file in php. if i include it like this: the file isn’t included and i get an error that the function isn’t defined. When i try it this way: the first tag in the document.write function closes <script type=”text/javascript”> what is the correct way to d…

Save Google map to jpeg using PHP?

Is it even possible? I am implementing an export to pdf functionality for a pile of data, one of which is a Google map with a marker. Thank you. Answer I think you are looking for this: http://code.google.com/apis/maps/documentation/staticmaps/ you just need the url and the google api returns the google maps …