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)
html within javascript
InterwovenIsFun
i have a dct in which i have a callout button. On the click of this button , i have called a javascript to do some functionality first, and once that is done, the ipl on the callout will be called.
For the first part, i have to write html within the js function(which is called at the button click). this html creates a form which has another button. when the user clicks on this button(the one on the html form), another function in the same javascript file should be called.
i have attached my code.
if a write SCRIPT tag within the HEAD tag, the form doesn open at all.
The same thing works in visual studio. but the SCRIPT tag does not get recognized in this. Hence, it is not running.
anyone please help me with how this cd be solved?
Find more posts tagged with
Comments
Adam Stoller
I will take a semi-educated guess - the fact that you've already done a window.open() prevents the HEAD information being supplied
after
from being processed.
The approach I would suggest - create your own custom CGI, with the desired head and javascript code, etc., and have your callout call that CGI instead of trying to do it within the FormAPI code associated with the DCT.
BarColor.zip
InterwovenIsFun
the problem is that the data that has to be displayed on the form is the sitemap in the expandable-collapsible format. this seems difficult in perl. right? thats why i thought i d go with javascript. i can also make an html file and code on that, right? in this case, i am not able to figure out the path that i should be giving. the dct, javascript file and the html file are in the same folder.
window.open("Y:\\STcom\\main\\STcom\\WORKAREA\\STcom-WA\\templatedata\\PageTemplates\\PageTemplate\\sitemapquestions.html","Window1","menubar=no,width=430,height=360,toolbar=no");
doesn work
window.open(".\sitemapquestions.html","Window1","menubar=no,width=430,height=360,toolbar=no");
doesn work
window.open("sitemapquestions.html","Window1","menubar=no,width=430,height=360,toolbar=no");
doesn work
how else can i give it?
Adam Stoller
Learn how to program CGIs - the nuts and bolts will be HTML and Javascript - the wrapper will be either Perl or Java (or perhaps even some other language) - once you have the CGI - you can invoke it directly from the callout without having to do any special FormAPI stuff, unless you need to add more form variable information to be processed by the wrapper code to get used in rendering the actual form.
InterwovenIsFun
I have 2 callout buttons in the dct.
On the click of the 1st button, the above mentioned expandible-collapsible page opens. This is a cgi script(say ShowSitemap.ipl).
I have another callout button below the 1st one.
Can i raise a click event for this callout button in ShowSiteMap.ipl ??
if so, how can i do it??
I tried raising an event like :
calloutForm.elements[i+1].click();
where
calloutForm.elements
is the first callout button.
if i do calloutForm.elements[i+1].name, it gives me the name of the item i want to work with. But i do not understand how to raise the event on which the next cgi script will run.
Can someone help me plz.