JavaScript Fragments
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-03-19 06:03 PM
Hi everyone, i want to use Javascript code to my object.
Ex;
function maximizar(){
window.moveTo(0,0);
window.resizeTo(screen.width,screen.height);
}
Documento sin título
to maximize the ie window. Any idea how should i write it in the data item?
Thanks,
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-03-19 06:29 PM
If you need to maximize the IE window, you can use a navigate stage and use the action in it to maximize the window. I don't think this was always a feature in BP, so it may not be in older versions. I think I've used Win32 mode to spy the window and then one of the actions available in the navigate stage is Maximize.
Dave Morris, 3Ci at Southern Company
Dave Morris, 3Ci at Southern Company
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-03-19 06:48 PM
You are absolutely right about that David, but what i wanted to know actually is how i should type the syntax of a Javascript code in a data item, so i could run with ""JavaScript Fragment"" option.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
13-03-19 03:35 PM
1. Call the Navigate Stage action 'Insert JavaScript Fragment' using the root level element and in the input 'Fragment', pass in the function text:
function maximizar(){
window.moveTo(0,0);
window.resizeTo(screen.width,screen.height);
}
2. Then call the Navigate Stage action 'Invoke JavaScript Function' with the following inputs, including the quotes:
Function Name: ""maximizar""
Arguments: ""[{}]
Dave Morris, 3Ci at Southern Company
Dave Morris, 3Ci at Southern Company
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
22-03-19 04:49 PM
I think you can just insert js fragment:
window.moveTo(0,0);
window.resizeTo(screen.width,screen.height);
and it will get executed, no need to mess with calling a function, unless you need to pass parameters to existing one.
