url-redirection


Spotfire Redirecting to home after link click


Ask: Have a button that when clicked downloads a file from a folder on the server and remains on the current page.
Current state and problem: I have a CustomWizardPromptControlPage that writes a simple button to the HTMLTextWriter. The onclick event for the button fires off a window.open(urlToDocument, '_blank'). By doing the button with the onclick it does actually allow me to download the file, however the parent page redirects to the home page.
Already tried: href - didn't download the file and redirected me to the home page. form submit - didn't do anything.
If anyone can give me some insight as to why Spotfire does this and what I can do to stop it from happening it would be greatly appreciated
--Follow up with working code sample for comments request
namespace ACompanyName.SpotFire.ExportWithFilters
{
public class ExportWithFiltersWebPromptControl : CustomWizardPromptControl
{
public ExportWithFiltersWebPromptControl(ExportWithFiltersFileSettings settings)
{
this.AddPage(new ExportWithFiltersPage(settings));
}
private class ExportWithFiltersPage : CustomWizardPromptControlPage
{
private readonly ExportWithFiltersFileSettings _settings;
public ExportWithFiltersPage(ExportWithFiltersFileSettings settings) : base("Export with Filters")
{
_settings = settings;
}
protected override void OnGetContentsCore(HtmlTextWriter writer)
{
var domain = "https://dev.AURL.com";
var filename = _settings.ExportWithFiltersFileInfo.Name;
var fullFilePath = string.Format("{0}/{1}/{2}", domain, "Exports", filename);
writer.WriteLine("Download Export with Filters", fullFilePath);
}
protected override void OnGetScriptsCore(StringBuilder builder)
{
}
protected override void OnLeavePageCore(FormData data)
{
}
protected override bool OnValidatePromptCore(FormData data)
{
return true;
}
}
}
}
Turned out that Spotfire didn't like putting <button> into the page. Swapped it out with an hyperlink with a target of blank and it worked like a charm. If a button is still desired, stylized div should do the trick.

Related Links

Django : Rever with arguments and RedirectView
Redirect https://domain.com to https://www.domain.com in Godaddy
How do I use redirections and the Google search console?
OPENWRT : Redirect all wireless client's http/https traffic to the local webserver?
HAProxy redirect to subdomain
Gtmetrix Mimimize Redirect Chains
outlook calendar api redirection uri with vhost , not working
Redirect address when IP and port are mapped to domain
Masking an URL after redirect
How to redirect without change url?
.Search bar not storing history correctly on redirect from separate search page
301 redirect index.html to index.php and hide index.php from the url
Check redirect rules from .htaccess file
301 Redirect with limited access to site
How to create a custom expression to 301 redirect multiple html pages to a single page
URL Rewrite Module and Folder Redirects

Categories

HOME
cobalt
merge
mjml
pascal
mstest
jelastic
owl-carousel
sublimetext
rendering
onclick
maxscript
nuget-package
data-visualization
flume
elasticsearch-5
syntaxnet
augeas
categorical-data
ycsb
jxl
tput
shared-libraries
atlassian
android-intent
glyphicons
powershell-v5.0
fileserver
google-content-api
imessage
digital-signature
symfony-console
selinux
springfox
visual-studio-extensions
exploit
highstock
froala
subclass
boost-asio
r-grid
rselenium
carriage-return
reverse
sim-toolkit
magento-1.9.2.4
projects-and-solutions
verifiable-c
odoo-website
photos
apache-directory
httrack
openrasta
mschart
netbeans6.8
corruption
amq
check-mk
payload
type-theory
lsyncd
gameplay-kit
objectscript
bootstrap-tags-input
stripe-connect
cubism.js
autosar
parfor
xcode-server
cifilter
observablecollection
http-status-code-401
data-protection
blitline
iokit
doctype
keyup
snoop
cakephp-2.7
jbake
entry-point
genymotion-call
wcm
strawberry-perl
mintty
ray
decoupling
clickbank
tlf
kogrid
scringo
sqlclr
nokia-s40
vfs
httponly
relative
creole
inline-formset
tmx
nhprof
undefined-index
uideviceorientation
django-piston
tui

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile