As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
Hi, I am using HTML layout painter in developer studio 716 to create a HTML user interface. There is a button in the tool that can be used to set a hyperlink that will link to another procedures or html pages. Is there a way to set this hyperlink based on the user's selection instead of predefining it? Thanks in advance for your help...
WebFOCUS 7.1.6 on Win 2K/IIS 6/ISAPI HTML
Posts: 77 | Location: San Ramon, CA | Registered: May 17, 2007
Is it possible for you to post the html code related to the part you are trying to create dynamically?
I am pretty sure that you can use JavaScript to get this done. I would use an event to call a function which dynamically creates the link (createElement) and then appends it to an existing html element (appendChild). Google these terms and you should have plenty of help on hands.
Mike
Prod: WebFOCUS 7.1.3 on Linux Kernel-2.6.5 zSeries 64bit/Apache Tomcat/5.0.28 JAVA version 1.4.2_11 server
Posts: 35 | Location: Oklahoma City | Registered: May 11, 2006
Thank you very much for your response. I do very much appreciate.
I use the HTML layout painter to drag and drop the button into the Design area. Then, I right click the button and choose the option "create hyperlink". But if i do this, it will be a static hyperlink which is controled by the function button1_OnClick as shown below. I tried to comment out the button1_OnClick function and added document.form2.action and document.form2.submit(). But that doesn't work. What I would like to do is the have users to be able to select the html pages within Developer studio. This is where I don't know how to do. How do you implement createElement, so that the hyperlink can be dynamic?
Once again, thanks for your response.
Simon
<script> function button1_OnClick(ctrl) { // TODO: Add your event handler code here OnExecute(ctrl) }
(INPUT1 language=java_script id=button1 style="Z-INDEX: 1; LEFT: 212px; POSITION: absolute; TOP: 176px" onclick=button1_OnClick[this) tabIndex=1 type=button value=Button name=button1 autoExecute="True" requests_list="0") SELECT1 id=combobox1 style="Z-INDEX: 2; LEFT: 212px; WIDTH: 71px; POSITION: absolute; TOP: 108px" tabIndex=2 name=combobox1 operation="NONE" (OPTION1 value=FOC_NONE selected displaytext="Where to go")Where to go (/OPTION1) (OPTION1 value=test.html displaytext="goto test")goto test (/OPTION1) (OPTION1 value=test2.html displaytext="goto test2")goto test2 (/OPTION1) (/SELECT1)This message has been edited. Last edited by: Learner,
WebFOCUS 7.1.6 on Win 2K/IIS 6/ISAPI HTML
Posts: 77 | Location: San Ramon, CA | Registered: May 17, 2007
To help us all target a response to any question you raise with specific syntax requirements, please add the platform and release to the signature section of your profile. This will then be displayed as a default each time you post .
For your question, are you trying to direct them to a new html file within the same window, an iframe or a new window?
If it is the same window then you just need to redirect the current location to the new html document via this.location="[url required to reach html source]".
If to an iframe on the current page then you would need to set the iframe object source to the url via document.getElementById("[id of your iframe]").src="[url required to reach html source]".
If to a new window then you would need to code this as required in the onclick event.
This is a basic example of calling new pages from an input button and combo box with accompanying JavaScript to get you going. Copy and paste it into a new html document and then open it in your browser -
<html>
<head>
<title>Launch for Simon</title>
<script language=javascript>
function exform() {
if (document.getElementById("select1").selectedIndex == 0) {
alert("You must make a selection");
return false;
} else {
this.location=document.getElementById("select1").value;
}
}
</script>
</head>
<body>
<form id=form>
<select id=select1>
<option value=FOC_NONE>Where do you want to go?</option>
<option value="http://www.google.com">Google</option>
<option value="http://developer.yahoo.com/yui">Yahoo YUI</option>
</select>
<input type=button value="Go!" onclick="exform();">
</form>
</body>
</html>
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Thank you for your response. I have tried the code and it works if I want to redirect users to the internet with a new window open... but i have some html files such as getCustomer.html that i created within domain in MRE and i want to redirect the users to those HTML files. How to do that?
I got the below error message when I submitted the request from apache.
type Status report message /ibi_apps/getCustomer.html description The requested resource (/ibi_apps/getCustomer.html) is not available.
I am new to this Focal point and don't know how to add a platform. I did uncheck the Signature checkbox but I am not sure whether I have already released to the signature section of my profile.
Simon
Posts: 77 | Location: San Ramon, CA | Registered: May 17, 2007
Thanks for the reply.... I tried it but got the error message saying "cannot find the fex program".. i also checked the name in the property of that fex program and use that name but still have no luck.. the fex is in app path.... any idea why I am getting the error message?
WebFOCUS 7.1.6 on Win 2K/IIS 6/ISAPI HTML
Posts: 77 | Location: San Ramon, CA | Registered: May 17, 2007
There could be two possible reasons you are getting this error. 1. fex does not exist (check the name again) or the Server can not find it because fex is not in app path 2. your server might be secured and you may also need to pass a user ID and password to get to it Also, I would check the name of server. You may want to check that with your web server admin.
Mike
Prod: WebFOCUS 7.1.3 on Linux Kernel-2.6.5 zSeries 64bit/Apache Tomcat/5.0.28 JAVA version 1.4.2_11 server
Posts: 35 | Location: Oklahoma City | Registered: May 11, 2006
Hmm... I think I got all those correct.... I am the web administrator and I set the webserver up. I am pretty sure that the name of the server is correct. but i discovered that somehow the code picked the fex program from different directory within the same domain. why is that?
Posts: 77 | Location: San Ramon, CA | Registered: May 17, 2007