How to change the default action to "open in new tab" when clicked on an attachment in xpages? - file

I have an xpage with a "File Download" control in it, binded to a data source which is pretty basic. When its displayed and I click on an attachment in the list from a computer / laptop, it downloads it as expected (When you click on the downloaded thing in the bar below the browser, it opens the attachment in the appropriate application).
But when I use this feature from mobile (phone or a tablet), the attachment is opened in the same page directly. Only when I click on it for a longer period (I'm using an IPhone in this case), I have the option to "Open in New Tab" (as if I "right-clicked" in desktop).
Now what I want to do is, when I click on an attachment from mobile, I want the default action to open it in a new tab.
How can I do this?

This answer put me in the correct path but I'm not quite where I want to be.
This answer works when I extend the Bootstrap3_flat theme (which is the selected application theme in xsp.properties) and add the required code. Then when I use the file download control, attachments are opened in new tab by default.
But in xps.properties of the application, I am selecting "Mobile default" for the mobile theme. So in order to extend "Mobile default" I guess I have to extend "iphone" but when I try that, my application is not loaded correctly.
How can I extend "Mobile default" theme correctly for my application to load correctly?

Related

DNN Session Variable Issues

I am developing skin in DNN 6.02.04. In my insidepage.ascx page how to handle the session variable?.Without creating usercontrol or module how can i set session variable?.
For Example
1st time if anyone went to this webpage http://www.solodyn.com/FORPHYSICIANS.aspx you get one dialogue box .In that dialogue box one button was there. if i click that button " i am healthcare professional". they set session not getting the dialogue box until my session close. In my developement website every page load i am getting that dailogue box again and again. How to use session variable in DNN Skin pages?
Thanks & Regards
Gopinath.R
Session is typically not recommended for use within DNN environments. I would set a cookie and then in the Skin file you could add logic that reads from the cookie using inline code in the ASCX for the skin.

Getting IE Browser to open the File

I embed the default Internet Explorer in my win32-C Application via COM/OLE.
I display a web page having a link (anchor tag) to save/open a file.
When i click on the link, It does some processing in the background but does not give me a dialog box asking to save or open the file. From Fiddler I come to know that it is writing to the cache but not able to access it or show any popup.
I expect to see the dialog box asking me to either save or open the file (default)
If i do this from the IE browser then everything works fine.
EDIT : I tried a sample code in which I do get to see the Dialog Box providing me with the option of saving, opening the file although tallied everything with my code I still fail to see the box.
I was thinking of the Modeless Dialog Box issue but I can see a Message Box in my code. So modeless dialog box is not disabled.
Not able to get how to get it to work.
(Note: Please see the attached images)
EDIT: I edited the The EmbedBrowser Function in my code, my browser was not given a pointer to my IOleClientSite object
New Code :- http://paste.ubuntu.com/1062010/
But problem persists!
I figured out the issue.
The interface DWebBrowserEvents2's invoke method was implemented to not display the File download Box while downloading.
Modified it to allow the same.

Silverlight out of browser WebBrowser block

I've created a silverlight 4.0 OOB application. Inside a menu of the application I've a WebBrowser where I load some predefined webPages. The issue is that those Pages have some links that open a new Internet Explorer instance. I would like to prevent openning that new window, because my application should be the only one running in the computer. I can´t find any event that could give me the information of my app loosing the focus. I don´t know if I can also capture this in the webBrowser.
thanks for the repply!!
UPDATE:
I've found a workaround, In my case I'm sure that the default browser is Internet Explorer, so changing Internet options the problem dissapears. In Internet Options / Privacy / PopUp blocker / Settings, I've set the blocking level to "High" and have unchecked the "show notification bar" checkbox.
Sounds like some of the links in the webpage have a target="_blank" set on them.

How can I make a url embedded in the about dialog box appear as a hyperlink? (resource script .rc)

I have an application written in c that has no dialog box.
However, when you right click the icon you get a floating menu and from there you can choose the about option. This will open an about dialog box. I have inside a link to some webpage, that can be pressed- that will open a browser and navigate to the URL. However, I am unable to make that URL appear as a hyperlink (all that GUI related work is done via the resource .rc file only).
Does anyone know how to color that link in blue and underline to make it appear as a hyperlink through resource script only?
Thank you
I haven't tried this myself but it looks like you can use the CONTROL statement in the resource script to include the SysLink class (which requires common controls v6/Win XP, and will therefore mean you also need a manifest in your application). For more details see http://msdn.microsoft.com/en-us/library/bb760706%28VS.85%29.aspx.
However, you will need to handle the notification from the SysLink control in order to launch the browser and you would need to call InitCommonControlsEx() before the dialog resource is used. That might stop all your GUI work being done by the rc file.
Another alternative would be to register a new window class, subclass from the SysLink control and customise the window message that would normally send the click notification to the parent in order to launch the browser. You could then use your custom class name in a CONTROL statement in the rc file. You still have more work to do but all the GUI handling would be done for you.

SILVERLIGHT. How to download file like from web-site

I want download file from server. I know how to do this using WCF/RIA services. How can I do this like in web site. For example: I click button and It will appear standard dialog browser window to download file.
Use the Hyperlink control and link it to a server-side URL. This is what I've done in my app to avoid the whole generic save file prompt restrictions of the default SL sandbox.

Resources