Welcome Guest, Not a member yet? Register   Sign In
Adding JavaScript to head in view
#4

[eluser]jedd[/eluser]
Dang this forum's blasted script-remover.

I modified my message - dunno if you can be bothered to do the same to yours - space after the < and maybe spread spaces through the word script.

Anyhoo, yes, I think I understand what you're trying to do. Have a read of the user guide's section on views, specifically the bit about using the third parameter set to TRUE to return the rendered version of that view partial to be echo'd later in a 'one big view rendering page'. Also see my [url="/wiki/Header_and_Footer_and_Menu_on_every_page_-_jedd/"]ramble in the wiki[/url] - nominally on using MY_Controller, but touches on using sub-view generators. I reckon it'd be fairly easy to modify that to suit what you're trying to do.

I'm writing a system at the moment, actually, that uses some javascript goodness - but using jquery my required code is only about a dozen lines, so I've left that in the primary view file for the time. I may well shuffle that into a separate file later, particularly if I want to start modifying some of the settings in it (which, as it happens, I do) dynamically, via PHP variable substitutions, before sending it back to the browser.


Messages In This Thread
Adding JavaScript to head in view - by El Forum - 11-24-2009, 08:38 AM
Adding JavaScript to head in view - by El Forum - 11-24-2009, 10:16 AM
Adding JavaScript to head in view - by El Forum - 11-24-2009, 11:25 AM
Adding JavaScript to head in view - by El Forum - 11-24-2009, 12:06 PM



Theme © iAndrew 2016 - Forum software by © MyBB