Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

https and a security alert

Posted on 2006-11-28
11
Medium Priority
?
377 Views
Last Modified: 2012-06-27
Hi there,
I have a page that is sitting in a secure folder where the user is supose to enter personal information, the main idea of the page is to validate the user date of birth to see if can continue with the application. I have somewhere on my form the following else statament:
 Else
                    Call Response.Redirect("http://www.somewhere.com/volunteer/pdf/VolunteerApplication.pdf")
               End If
of course it has and if but is to long so i don't want to fill this question with unnecesarry stuff ;-)

now on that part of the esle is there a way to change the Security alert that is generete due the change of locations?
right now if the user is not over 18 yeras of age it gets directed to that pdf to print it out and fill it up and submitt it instead of doing it online.
if there is a way! can we replace that alert message for something like you will be redirected to the PDF file becasue you are not over 18 or something like that?
i tihink it has to be inside that else statement
can anyone help me?

Thanks
JSCTECHY
0
Comment
Question by:jsctechy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
11 Comments
 
LVL 13

Expert Comment

by:bigbillydotcom
ID: 18030913
is this script inline in the page??
if so, you could break out of script and give them a link to click, something like this

...
else
%>
You are not old enough - please click link below to open a form to download and mail to us  - Thanks Kid!
<a hef="http://www.somewhere.com/volunteer/pdf/VolunteerApplication.pdf">Click Here </a>
<%
 End If
.....resume script
0
 
LVL 1

Author Comment

by:jsctechy
ID: 18030934
thats a good approach but i want soemthing else right now whenever the submit button is clicked i have a security warning and instead of having that i want to change for a message like the one you have
0
 
LVL 13

Expert Comment

by:bigbillydotcom
ID: 18031849
OH - OK
if I understand it correctly, the reason you are getting the security warning is because you are irecting to a folder/document that is not under SSL - right?
Then why not redirect to a page that is under SSL that then has a link as inidicated above

I have also used javascript on a page to redirect to another non-SSL page, but the page you redirect to initially
(the page in the call response.redirect bit) has to be under SSL or will always get this warning

in a nutshell:

SSLpage1.asp (the SSL protected page they are on with the submit button)
on SSLPage1.asp
**********
else
     Call Response.Redirect("SSLTooYoungRedirPage.htm")
end if

SSLTooYoungRedirPage.htm ( the SSL protected page they get redirected to in the "else" bit)

code for SSLTooYoungRedirPage.htm - create new htm page and place this script under body tag
******************************
<script language=javascript>
     window.navigate("http://www.somewhere.com/volunteer/pdf/VolunteerApplication.pdf");
</script>

should redirect without popping up security warning
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:jsctechy
ID: 18031910
so i have to write just this on my else statemnet just to avoid the alert right?

<script language=javascript>
     window.navigate("http://www.somewhere.com/volunteer/pdf/VolunteerApplication.pdf");
</script>

and how about the message i want to display?
0
 
LVL 13

Expert Comment

by:bigbillydotcom
ID: 18032026
sorry
no

if you want to display the message - create a page with the message and redirect to that page

**********
else
     Call Response.Redirect("SSLTooYoungErrorPage.htm")
end if

then on that page have the message and the link for the pdf file (NEW ANCHOR SCRIPT BELOW - WILL OPEN PDF IN A NEW WINDOW)
*****************************
You are not old enough - please click link below to open a form to download and mail to us  - Thanks Kid!
<a target="_blank" hef="http://www.somewhere.com/volunteer/pdf/VolunteerApplication.pdf">Click Here </a>

I dont think you will get securtiy warning when you popup the pdf using the link - only when you try and do a response.redirect on the server
0
 
LVL 1

Author Comment

by:jsctechy
ID: 18032244
i don't want to redirect the user to another page all i wants is to have a message displaying the rerason why he/she is redirect to that other page or form thats all.

0
 
LVL 13

Expert Comment

by:bigbillydotcom
ID: 18032334
oh ok
sorry - instead of redirecting - just write out to the browser

**********
else
     Response.write("You are not old enough - please click link below to open a form to download and mail to us  - Thanks Kid!")
     Response.write("<br>")
     Response.write ("<a target="_blank" hef="http://www.somewhere.com/volunteer/pdf/VolunteerApplication.pdf">Click Here </a>")
end if
0
 
LVL 13

Expert Comment

by:bigbillydotcom
ID: 18032397
oops
forgot to clean out the dbl quotes in the a href
**********
else
     Response.write("You are not old enough - please click link below to open a form to download and mail to us  - Thanks Kid!")
     Response.write("<br>")
     Response.write ("<a target='_blank' hef='http://www.somewhere.com/volunteer/pdf/VolunteerApplication.pdf'>Click Here </a>")
end if
0
 
LVL 58

Accepted Solution

by:
amit_g earned 2000 total points
ID: 18034986
Change

Call Response.Redirect("http://www.somewhere.com/volunteer/pdf/VolunteerApplication.pdf")

to

Call Response.Write("<script>")
Call Response.Write("alert('You are too young');")
Call Response.Write("location.href = 'http://www.somewhere.com/volunteer/pdf/VolunteerApplication.pdf'")
Call Response.Write("</script>")

The warning message you get now is because http getting redirected to https. You can't change that message. You can remove that message if you host the page in the same place where you have your application i.e. in https.
0
 
LVL 1

Author Comment

by:jsctechy
ID: 18036425
amit_g

ok that works exactly the way i want it but i have a question if i create a forlder inside the https folder and now the path change how can i change that line in other to pull the pdf direct from the folder?

>>Call Response.Write("location.href = 'http://www.somewhere.com/volunteer/pdf/VolunteerApplication.pdf'")

instead of having that here is folder that holds the pdf now pdf\VolunteerApplication.pdf

should i just write it like this
Call Response.Write("location.href = 'pdf/VolunteerApplication.pdf'")
?????????
0
 
LVL 58

Expert Comment

by:amit_g
ID: 18038826
Yes that would work as long as the pdf folder is within the same fodler where your asp is.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question