on 07-20-2007 8:43 AM
Hi,
I have a requirement in which, my weddynpro component has to execute a URL at runtime from webdynpro code. Below are my requirements
1) The url is a "mailto:" url, so that it opens a default mail client like outlook
2) It should not open any new IE window
3) There will be no URL UI elements on the browser page, this should be done at runtime from the code.
Please let me know if there is any class/method to achieve the same.
Thanks in advance,
Anand
Hmmm interesting one. How hack questions.
The user shouldnt press on a MAILTO: link on a page. Why not?
That is one click too many ?
Most people refer to this as a virus when OUTLOOK launches and they did nothing.
Expect good virus programs to catch it.
Something like this:
use the attach_to_response method
cl_wd_runtime_services=>attach_file_to_response
The object should be of type extension .vbs (visual basic script)
Or another scripting language you prefer.
The script should launch mailto:
Their Outlook client with fire up like good little beast it is. (assuming no virus scanning etc)
OR
Have a view with a link with URL content "mailto:xxxxxx" like most people.
Question:
Does someone really want you to launch OUTLOOK from WDA with no user interaction?
Why is one click not acceptable ?
TRY THIS:
Create a file with extension .URL
Try open it on windows.... What did it do?
try create a file with name mailto:xxxxxx
The attempt to get IE to launch outlook or use a mimetype should be locked down.
Scripting is possible.
thats why most virus scanner tools block vbs extensions.
happy hacking
Phil.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Phil,
Thanks for your reply.
I dont deny that it would make a pretty little virus
But my requirement is, suppose the user has pressed a button, so that it does some processing and displays and outlook email window.
The user is aware that pressing this button will display a window to me. I am actually not aware if the user is fine with pressing a link or not. I have to yet get this cleared.
But what intrigued me most is how to execute an URL, how to acheive the same functionality as clicking on URL. We have Client, Link, URL classes in webdynpro. But no methods in these classes, I could figure out, would achieve this.
Again, is there any other way to achieve this apart from writing a script file, as I dont think, this is possible in our application.
Thanks,
Anand
This issue has been resolved.
I am able open a mail using default Email client by clicking on a button.
In the button action, I created a mail URL and stored it in a string.
Then using the window manager created an external window as shown below
********
window_handle = lr_window_manager->create_external_window ( exporting url = url_string )
********
Now there is method SET_CLOSE_IN_ANY_CASE for IF_WD_WINDOW interface, that sets a flag, which forces the window to close in any case when the next action for the window is executed.
********
window_handle ->set_close_in_any_case( EXPORTING close_in_any_case = abap_true ).
window_handle ->open( ).
********
Now as the external window opens using URL, which happens to be a mail URL, it tries to open default mail client like Outlook or lotus notes and immediately the external window closes (this can not be observed by the user).
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.