Something that is important when you add javascript functionality (like jQuery), you should always keep in mind that what you are doing should work for search engine robots, screen readers and so forth.
AJ Mercers code is a good example how to do it the right way. You can try to disable javascript in your browser, you will still get to the information when you click the readers name link, e.g. http://cfobjective.com.au/speaker/webonix/ When you have javascript enabled, the jQuery function are stopping you to go to http://cfobjective.com.au/speaker/webonix/ but opens a modal window and loads the content from http://cfobjective.com.au/speaker/webonix/view/displayTeaserStandard If you want to experience with this I always recommend to beginners that they should keep the markup clean and simple and always have the firebug, or your favorite debugging tools console open. Are you running this code inside a farcry projects www folder? Jørgen~ On 4. nov. 2010, at 13.36, Marco van den Oever wrote: > mmm i am trying a basic tutorial but getting no result: > > ------- > > <!--- import tag libs ---> > <cfimport taglib="/farcry/core/tags/webskin" prefix="skin" /> > > <!--- load js and css ---> > <skin:loadJS id="jquery" /> > <skin:loadCSS id="jquery-ui" /> > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// > www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > > <script type="text/ > javascript"> > // when the dom is ready execute some code > $(document).ready(function() { > // when a link is clicked execute the alert > $("a").click(function() { > alert("Hello world!"); > }); > > }); > </script> > > <meta http-equiv="Content-Type" content="text/html; > charset=iso-8859-1" /> > <title>Untitled Document</title> > </head> > > <body> > > <!--- this link executes the above click function jquery code ---> > <a href="">Link</a> > > </body> > </html> > > ------- > > On Nov 4, 1:07 pm, AJ Mercer <[email protected]> wrote: >> there is some info on type (list) webskins >> herehttps://farcry.jira.com/wiki/display/FCDEV50/UNIT+07+-+Webskins+II >> <https://farcry.jira.com/wiki/display/FCDEV50/UNIT+07+-+Webskins+II> >> >> On 4 November 2010 19:57, Marco van den Oever >> <[email protected]>wrote: >> >> >> >>> Awesome, I'll go and study this info! >> >>> On Nov 4, 12:28 pm, ""Jørgen M. Skogås"" <[email protected]> wrote: >>>> Hi Marco >> >>>> How much jQuery do you know? If you are new to jQuery you should start >>> with som tutorials or something:http://www.learningjquery.com/ >> >>>> It's nothing magic happening here, jQuery adds click functions to every >>> <a class="speaker"> / $( "a.speaker" ) and takes the hrefs and ads another >>> view to it, >>>> you can how he did this if you look in the html code from the link AJ >>> Mercer sent you: >> >>>> ... >>>> <a href="/speaker/robin-hilliard" class="speaker">Robin Hilliard</a> >> >>>> ... >>>> <script> >>>> $(document).ready(function() { >>>> //hide dialog div >>>> $("#dialog").hide(); >> >>>> $( "a.speaker" ).each( >>>> // hijack link to open dialog >>>> function( intIndex ){ >>>> $( this ).bind ("click",function(){ >>>> // load content, on complete fill the >>> dialog div, then show the dialog >>>> $('#dialog').load(this.href + >>> "/view/displayTeaserStandard", function() { >>>> $('#dialog').dialog({ title: >>> "Speaker Information", modal: true, autoOpen: true, minheight: 100, >>> height:400,width: 500 }) >>>> }); >>>> return false; >>>> }); >>>> } >>>> );}); >> >>>> </script> >> >>>> <div id="dialog" title="Dialog Title">speaker info here</div> >> >>>> And ofcourse you will need to load the jQuery js and css (jquery-ui) wih >>> the farcry tags, you do this like this: >> >>>> <!--- import tag libs ---> >>>> <cfimport taglib="/farcry/core/tags/webskin" prefix="skin" /> >> >>>> <!--- load js and css ---> >>>> <skin:loadJS id="jquery" /> >>>> <skin:loadCSS id="jquery-ui" /> >> >>>> Jørgen~ >> >>>> On 4. nov. 2010, at 12.12, Marco van den Oever wrote: >> >>>>> That is pretty nice, but to be honest i have really no idea where to >>>>> start, what is all included. Must be my lack of ajax knowledge in >>>>> general, a simple example on how to call a webskin would be explaining >>>>> a lot to me i think, could you give such? >> >>>>> On Nov 4, 11:24 am, AJ Mercer <[email protected]> wrote: >>>>>> if you create type webskin you can call this via ajax >> >>>>>> eghttp://cfobjective.com.au/programclickona speaker >>>>>> it called the same webskin used by >>>>>> http://cfobjective.com.au/speaker/webonix >> >>>>>> <http://cfobjective.com.au/program> >> >>>>>> On 4 November 2010 17:51, Marco van den Oever < >>> [email protected]>wrote: >> >>>>>>> So from within the framework but not through formtools. >> >>>>>>> On Nov 4, 10:50 am, Marco van den Oever <[email protected]> >>>>>>> wrote: >>>>>>>> Thanks, wish there were more examples on how to do simple stuff >>> like: >> >>>>>>>> http://d2o0t5hpnwv4c1.cloudfront.net/412_ajaxCalls/DEMO/index.htm >> >>>>>>>> There is a lot off info but i can't grasp what i need from it, i >>>>>>>> simple want to use ajax in my own code not in formtools etc. >> >>>>>>>> On Nov 4, 2:04 am, AJ Mercer <[email protected]> wrote: >> >>>>>>>>> this might get you started >>>>>>>>> ftwatch >>>>>>>>> https://farcry.jira.com/wiki/display/FCDEV50/State >> >>>>>>>>> <https://farcry.jira.com/wiki/display/FCDEV50/State>ajax forms >>>>>>>>> https://farcry.jira.com/wiki/display/FCDEV40/Formtools+Tags >>>>>>>>> <https://farcry.jira.com/wiki/display/FCDEV40/Formtools+Tags> >> >>>>>>>>> On 3 November 2010 22:11, Marco van den Oever < >>>>>>> [email protected]>wrote: >> >>>>>>>>>> I am looking into the jQuery.ajax() etc. functions. >>>>>>>>>> Is there anyone having a simple example of using this within the >>>>>>>>>> farcry framework? >> >>>>>>>>>> -- >>>>>>>>>> You received this message cos you are subscribed to "farcry-dev" >>>>>>> Google >>>>>>>>>> group. >>>>>>>>>> To post, email: [email protected] >>>>>>>>>> To unsubscribe, email: >>>>>>>>>> [email protected]<farcry-dev%[email protected]> >>> <farcry-dev%[email protected]<farcry-dev%[email protected]> >> >>>>>>> <farcry-dev%[email protected]<farcry-dev%[email protected]> >>> <farcry-dev%[email protected]<farcry-dev%[email protected]> >> >>>>>>>>>> For more options:http://groups.google.com/group/farcry-dev >>>>>>>>>> -------------------------------- >>>>>>>>>> Follow us on Twitter:http://twitter.com/farcry >> >>>>>>>>> -- >> >>>>>>>>> *AJ Mercer* >>>>>>>>> <webonix:net strength="Industrial" /> <http://webonix.net> | >>>>>>> <webonix:org >>>>>>>>> community="Open" /> <http://webonix.org>http://twitter.com/webonix >> >>>>>>> -- >>>>>>> You received this message cos you are subscribed to "farcry-dev" >>> Google >>>>>>> group. >>>>>>> To post, email: [email protected] >>>>>>> To unsubscribe, email: >>>>>>> [email protected]<farcry-dev%[email protected]> >>> <farcry-dev%[email protected]<farcry-dev%[email protected]> >> >>>>>>> For more options:http://groups.google.com/group/farcry-dev >>>>>>> -------------------------------- >>>>>>> Follow us on Twitter:http://twitter.com/farcry >> >>>>>> -- >> >>>>>> *AJ Mercer* >>>>>> <webonix:net strength="Industrial" /> <http://webonix.net> | >>> <webonix:org >>>>>> community="Open" /> <http://webonix.org>http://twitter.com/webonix >> >>>>> -- >>>>> You received this message cos you are subscribed to "farcry-dev" Google >>> group. >>>>> To post, email: [email protected] >>>>> To unsubscribe, email: >>>>> [email protected]<farcry-dev%[email protected]> >>>>> For more options:http://groups.google.com/group/farcry-dev >>>>> -------------------------------- >>>>> Follow us on Twitter:http://twitter.com/farcry >> >>> -- >>> You received this message cos you are subscribed to "farcry-dev" Google >>> group. >>> To post, email: [email protected] >>> To unsubscribe, email: >>> [email protected]<farcry-dev%[email protected]> >>> For more options:http://groups.google.com/group/farcry-dev >>> -------------------------------- >>> Follow us on Twitter:http://twitter.com/farcry >> >> -- >> >> *AJ Mercer* >> <webonix:net strength="Industrial" /> <http://webonix.net> | <webonix:org >> community="Open" /> <http://webonix.org>http://twitter.com/webonix > > -- > You received this message cos you are subscribed to "farcry-dev" Google group. > To post, email: [email protected] > To unsubscribe, email: [email protected] > For more options: http://groups.google.com/group/farcry-dev > -------------------------------- > Follow us on Twitter: http://twitter.com/farcry > > -- You received this message cos you are subscribed to "farcry-dev" Google group. To post, email: [email protected] To unsubscribe, email: [email protected] For more options: http://groups.google.com/group/farcry-dev -------------------------------- Follow us on Twitter: http://twitter.com/farcry
