Jump to content
  • 0

Cascading Elements to Separate DataPages


kpcollier

Question

Is it possible to have cascading elements across two different pages? 

I have an Orders Submission page. There is cascading elements working already in the page. When you select the Job that the order is for, an order number is automatically created based on the Job number.

I want to create a link on this page that connects to another html page. This page will show the number of orders already previously placed for this Job.

So, when someone selects a job, they can quickly check how many orders have been placed previously for this job with this link before they complete it. 

 

 

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

I have this in my header.

<script type="text/javascript">

	var states = [];
	var abc;

	function foo() {

		//reference to popup window
		var popup;

		//link to popup page
		var url = '[@app:https://c3eku680.caspio.com/dp/xxxxxxxxxxxxxxxxxx]';

		var queryStarted = url.search(/\?/g) > -1 ? true : false;

		//build query string based on user's selection
		var query = f_GetQueryStringForMultiple();

		//check that query string not empty
		if (query) {
			//open popup and pass some parameters to it
			popup = window.open(url + (!queryStarted ? '?' : '') + query);

			// do something when popup will be closed
			popup.onbeforeunload = function () { alert(abc); }
		}
	}

	function f_GetQueryStringForMultiple() {
		var ctrl = document.getElementById("Order_Number"); //Change it to actual field Id
		var q = "";

		if (ctrl) {
			for (var i = 0; i < ctrl.options.length; i++) {
				if (ctrl.options[i].selected) {
					q += (i > 0 || queryStarted ? "&" : "") + "prm=" + encodeURIComponent(ctrl.options[i].value);
					states.push(ctrl.options[i].value);
				}
			}
		}
		return q;
	}
</script>

And an html block with this.

<input type="button" value="Open" onclick="foo();" />

The popup page is predefined search tabular report. The predefined search is set to Order_Number and it is to receive value on load. I am not too sure what I am doing wrong.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...