Reply
forcing a javascript block in an include php file..
Old 03-24-2006, 03:33 AM forcing a javascript block in an include php file..
Junior Talker

Posts: 1
Im trying to do a class layout for a php file, and to create a function in the include file for an entire javascript block using php-nuke. the problem is that javascript block includes instances of functions from the same include file (instancing occurs in the root file). how do i call this instance variables?
here is a parcel of the code (function) in the include file :

function Get_Map(){
$content .= "<script type=\"text/javascript\">\n";
$content .= "var gme_map;var gme_markers=[];var gme_genres=[];\n";
$content .= "if (GBrowserIsCompatible()) {\n";
$content .= "gme_map = new GMap(document.getElementById(\"map\"));\n";

/* the instance variables should be called here */

$content .= "gme_map.addControl(new GLargeMapControl());\n";
$content .= "gme_map.addControl(new GMapTypeControl());\n";
$content .= "}\n";
$content .= "function addGMarker(markerNo, lng, lat,genre){\n";
$content .= "var marker = new GMarker(new GPoint(lng, lat));\n";


i just started studying php and it would be really helpful if somebody could give me some idea about this problem. thanks~~
kiki is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Reply     « Reply to forcing a javascript block in an include php file..
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11065 seconds with 12 queries