aliento Posted October 18, 2008 Share Posted October 18, 2008 I have this link <a href="javascript:ajaxpage(\'../index/php/load_menu.php?page='.$pages['label'][$i].'&language='.$language.'\', \'menu\'); ajaxpage(\'../index/php/load_content.php?page_id='.$pages['id'][$i].'\', \'content\'); " > I want to put it all together to a function. Can be done? Quote Link to comment Share on other sites More sharing options...
F1Fan Posted October 18, 2008 Share Posted October 18, 2008 I'm sure it can. What are you trying to do? I see an "ajaxpage" reference, are you trying to do Ajax? Quote Link to comment Share on other sites More sharing options...
aliento Posted October 19, 2008 Author Share Posted October 19, 2008 I need a javascript code like : load_content (languge,page_label,page_id) { ajaxpage(\'../index/php/load_menu.php?page=page_label&language=languge, \'menu\'); ajaxpage(\'../index/php/load_content.php?page_id=page_id, \'content\'); } Any correction? Quote Link to comment Share on other sites More sharing options...
Acs Posted October 19, 2008 Share Posted October 19, 2008 We don't know what the ajaxpage functions does (We can presume yes, but we still need to see the code). Quote Link to comment Share on other sites More sharing options...
F1Fan Posted October 20, 2008 Share Posted October 20, 2008 Again, are you trying to use AJAX??? Quote Link to comment Share on other sites More sharing options...
Acs Posted October 20, 2008 Share Posted October 20, 2008 Again, are you trying to use AJAX??? I think it's a bit obvious that he is trying Quote Link to comment Share on other sites More sharing options...
rhodesa Posted October 20, 2008 Share Posted October 20, 2008 assuming ajaxpage is already working: in the HEAD tag: <script type="text/javascript"> function load_content (languge,page_label,page_id) { ajaxpage('../index/php/load_menu.php?page='+page_label+'&language='+languge, 'menu'); ajaxpage('../index/php/load_content.php?page_id='+page_id, 'content'); } </script> then in your page: <?php print '<a href="javascript:load_content(\''.$language.'\',\''.$pages['label'][$i].'\',\''.$pages['id'][$i].'\'); ">'; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.