Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
FormAPI function to access port number
cari
Hi,
In formapi we can use the IWDatacapture.callServer(url, data, isGet) to access data over http.
var server = window.location.hostname;
gives the server name of your server. Our webd runs on another port other than port 80. When constructing the url for the CallServer, at present I am hard-coding the portnumber. So there is a problem when code is moved to staging server as it runs on different port number. So it requires manual changes to the code.
Is there a function in formapi through which I can get the port number over which the webd is running. So that the hardcoding can be removed.
Thanks
Cari
Find more posts tagged with
Comments
reddyl
You can use a inline script to get the web deamon port number add a hidden filed in the DCT which can be retrived using FormAPI.
Johnny
I think doing the whole servername is a waste of time. There is no need to specify the server and port
Just make the URL the path to your cgi/servlet
EG
/iw-bin/some_cgi
instead of
http://servername
ort/iw-bin/some_cgi
You don't normally make absolute URL's with the server name, so why in this instance.
It's too much work for me
John Cuiuli
nipper
It's too much work for me
any work is too much work for you.
Johnny
Unless it's the demise of you of course!
John Cuiuli