I want the current form to redirect to the other form when a particular field is selected.However i want an intermediate form should be displayed which displayes the message to the user 'Page is redirecting to x form in y seconds'.
I can redirect the form to the intermediate form by calling the script call form and pass the parameters , but how i should make the intermediate page to resubmit automatically after y seconds so that i can trigger the script on 'Before Page' event?
Or is there any other way ?
Redirecting the form
Moderators: Jon, Steve, Ian, Dave
- Wai
- Moderator
- Posts: 165
- Joined: Wed Sep 12, 2007 9:04 am
- Location: Sandy, UK
- Contact:
On your intermediate form you can use the meta redirect HTML tag, also known as meta refresh.
This can be used to redirect to a URL, specify the URL to the new form. If you need to pass parameters, you can potentially store them in the browser session.
For example:
Redirect to yourdomain.com after 5 seconds:
<meta http-equiv="refresh" content="5;url=http://yourdomain.com"/>
In Ebase, you define the meta tag in the Form's maintain form level metadata icon on the form (fourth icon from the right)
Alternatively, use Javascript to display a message and after so many seconds, redirect to the form. This is probably the more elegant approach.
Hope that helps.
This can be used to redirect to a URL, specify the URL to the new form. If you need to pass parameters, you can potentially store them in the browser session.
For example:
Redirect to yourdomain.com after 5 seconds:
<meta http-equiv="refresh" content="5;url=http://yourdomain.com"/>
In Ebase, you define the meta tag in the Form's maintain form level metadata icon on the form (fourth icon from the right)
Alternatively, use Javascript to display a message and after so many seconds, redirect to the form. This is probably the more elegant approach.
Hope that helps.
0 x
-
- Ebase User
- Posts: 8
- Joined: Wed Mar 20, 2013 9:25 am
- Location: Carmarthen, UK
- Contact:
-
- Ebase User
- Posts: 8
- Joined: Wed Mar 20, 2013 9:25 am
- Location: Carmarthen, UK
- Contact:
OK,
I've got a little further but have a couple of queries which may get to a resolution.
I've used the html++ to add javascript to the page header. I now have the flexibility of full javascript. I simply set a timeout to run scripts.
Problem -> How do I now access an ebase javascript from this javascript?
Is there a specific way to do a call? An example would be ideal. Also on another note, can I access the variables on the page from a script within html++?
I've got a little further but have a couple of queries which may get to a resolution.
I've used the html++ to add javascript to the page header. I now have the flexibility of full javascript. I simply set a timeout to run scripts.
Problem -> How do I now access an ebase javascript from this javascript?
Is there a specific way to do a call? An example would be ideal. Also on another note, can I access the variables on the page from a script within html++?
0 x
- Wai
- Moderator
- Posts: 165
- Joined: Wed Sep 12, 2007 9:04 am
- Location: Sandy, UK
- Contact:
Using JQuery you can trigger a button click on the page and also get field values.
1) Trigger button click
Button on page (which can be hidden or not using display: none) has a locator (e.g ID or class) in HTML Element Properties
client side function script
function updateFormTrigger(){
$('#myButtonID').trigger('click');
}
When the button is triggered it will run the server side script attached to the button
2) Get field values from fields on page
Place locator on the HTML Element Properties (ID or Class).
var myfield = $('#myfieldId').val();
1) Trigger button click
Button on page (which can be hidden or not using display: none) has a locator (e.g ID or class) in HTML Element Properties
client side function script
function updateFormTrigger(){
$('#myButtonID').trigger('click');
}
When the button is triggered it will run the server side script attached to the button
2) Get field values from fields on page
Place locator on the HTML Element Properties (ID or Class).
var myfield = $('#myfieldId').val();
0 x
-
- Ebase User
- Posts: 8
- Joined: Wed Mar 20, 2013 9:25 am
- Location: Carmarthen, UK
- Contact:
Thank you very much. I have got it working.
Simply added a button to the form, via HTML properties gave it an ID.
Under html++ on the page, added my timeout that achieved a button click and it worked a treat.
Minor thing, I used javascript code instead of jquery code for the button click. Not sure why jquery code did not work.
Simply added a button to the form, via HTML properties gave it an ID.
Under html++ on the page, added my timeout that achieved a button click and it worked a treat.
Minor thing, I used javascript code instead of jquery code for the button click. Not sure why jquery code did not work.
0 x
- Wai
- Moderator
- Posts: 165
- Joined: Wed Sep 12, 2007 9:04 am
- Location: Sandy, UK
- Contact:
Who is online
Users browsing this forum: No registered users and 11 guests