on 03-26-2009 11:39 PM
Hi all, V12.0
I have an AJAX call to this url:
var runnerUrl = 'http://myhostname:50000/XMII/Illuminator'
+ '?QueryTemplate=APEX/Queries/EX/plantSelectionQuery'
+ '&Content-Type=text/xml'
+ '&StyleSheet=http://localhost:50000/XMII/CM/APEX/styleSheets/plantSelection.xsl';
It works, but I get the XML header: <?xml version="1.0" encoding="UTF-8"?> in the
request.responseText which doesn't display when setting innerHTML in a div, so it is OK.
I don't like to do things that are not quite right though.
1. I am wondering what the right way is to have two divs on the page and when a selection is
done from the list(a link tag with javascript href) in the first div, send in a request to retrieve the
data and populate a list into the second div. And it needs to be rendered in a special way
(sort of like a horizontal nav bar), so I don't want to use packaged XMII widgets.
2. Also I would like to use a relative URL like XMII/Illuminator?etc. Or maybe get the
hostname and port from somewhere? http://localhost:50000. gives js "access denied" and
XMII/Illuminator... results in 404.
Thanks,
--Amy Smith
--Haworth
You can add
<xsl:output omit-xml-declaration="yes"></xsl:output>
in your xsl to remove the header.
1. I don't think there is a "right" way. You may want to give some indication to the user that the page is waiting for a response.
2.
window.location.hostname
&
window.location.port
Also you need to add
Session=true
to the url to pass security.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you use /XMII/Illuminator (note the initial / character) it should work just fine using relative links, as long as you are loading/testing your pages via the server and not just loading them from disk.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just as an FYI, for the most reliable/cross-browser usage, you should URL encode the "right side" of any URL parameters when you build up your URL string. In particular, the string "http://localhost:50000/XMII/CM/APEX/styleSheets/plantSelection" should be URL encoded so that the special characters such as : and / are properly interpreted.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
7 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.