Hi, Can you expand on option a). I am adding my JS and CSS as resources by creating ResourceReference() for them and using renderCSSreference() and renderJavascriptReference() to add them to the pages header, but how I do not know how to add a resource reference to the XML file.
Thanks MartinM wrote: > > Hi! > > I can suggest two things: > a) reference it as resource in wicket, similar way you do with > javascript or css, find out its url > b) put the xml file in your src/webapp directory, static files can be > accessed directly from there. > > ** > Martin > > 2010/3/21 JonnyL <[email protected]>: >> >> Hi Martin, >> >> Yes, the XML file is a remote file on the server. I have written a >> javascript function that returns a node value from the XML file, the >> javascript function is in a JS file which is referenced in the page >> header. >> The javascript cannot access the XML file because I believe it is not >> referenced as a resource by Wicket. >> >> Any suggestions on how I should reference the XML file? >> >> Thanks for the speedy response. >> >> >> THe javascript and >> >> MartinM wrote: >>> >>> Hi! >>> >>> You mean remote xml file.. on the server. >>> >>> ** >>> Martin >>> >>> 2010/3/21 Jon <[email protected]>: >>>> My Wicket app has a page that calls a Javascript function that accesses >>>> an XML file. I have added the Javascript resource and it runs, but it >>>> cannot access the XML file. How do I set the XML file as a resource so >>>> it can be accessed by Javascript? >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [email protected] >>> For additional commands, e-mail: [email protected] >>> >>> >>> >> >> -- >> View this message in context: >> http://old.nabble.com/Access-file-from-Javascript-tp27975931p27976065.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > -- View this message in context: http://old.nabble.com/Access-file-from-Javascript-tp27975931p27976913.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
