Improve company productivity with a Business Account.Sign Up

x
?
Solved

How to make browser automatically return to start webpage on a timer FROM AN OFFSITE PAGE

Posted on 2011-02-27
7
Medium Priority
?
896 Views
Last Modified: 2012-05-11
I am working on a Kiosk that accepts donations using, in part Paypal payment pages. The user touches the screen to start and is then given options of payment amounts. Those pages are on the localhost. When they hit a payment amount in takes them to Paypal's site. If the user abandons the process and gives no input, then I need the browser to return to the start page.
0
Comment
Question by:Jeff swicegood
  • 3
  • 3
7 Comments
 
LVL 12

Accepted Solution

by:
Amick earned 1000 total points
ID: 34994382
You can use a meta-refresh/redirect.

The content parameter is the number of seconds until it returns to the page identified in the url parameter, in this case 5, but probably more likely to be 210 to 360  in the situation you describe:

<html>
<head>

<meta http-equiv="refresh" content="5;url=http://www.salvationarmyusa.org/usn/www_usn_2.nsf/vw-local/ways-to-give">

</head>
<body>

<object type="text/html" height="100%" width="100%"
data="https://www.paypal-community.com/t5/US-PayPal-Community/ct-p/US">
</object>


</body>
</html>

Open in new window

0
 
LVL 8

Expert Comment

by:JT92677
ID: 34994429
I'd access the PayPal website as a popup window so the referer page isn't really gone, it's just hidden by the paypal page. Of you can access paypal as a frame within your window.

Check out popup windows or using a frame so you don't give up total control to the paypal site.

Here is some info on using popups
http://www.htmlcodetutorial.com/linking/linking_famsupp_72.html

Or read about frames
http://www.htmlcodetutorial.com/frames/frames.html

this would allow you to send a user to any other site for information, or downloading a document, etc., and retain control so the user ends up on your controlling webpage.

Hope this helps even though it's sort of a "pointer" rather than a "hard coded solution"

Jeff
0
 
LVL 1

Author Comment

by:Jeff swicegood
ID: 35001478
Thank you both for your great solutions. Amick: This looks like exactly what I was looking for, unfortunately I failed to realize when I asked my question that my problem is a little more complicated. The launch of Paypal is done within the <form element. Here is the page that launches to the Paypal site: (Please forgive me if this is really bad code.)
<html>
<head>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

//-->
</script>
<meta http-equiv="Refresh" content="60;url=http://localhost:8080/start.jsp">
</head>
<link href="golokaStyles.css" rel="stylesheet" type="text/css">
<body  oncontextmenu="return false;" onselectstart="return false;">

<div id="Layer1" class="textHeader30" style="position:absolute; width:900px; height:368px; z-index:1; left: 25px; top: 34px;"> 
  <p class="textHeader30" >Hello !!</font></p>
  <p class="textMedium" >Touch one of the buttons below to donate</p>
</div>
<div style="position : absolute; top : 325px; z-index : 1;">

<form name="paypalform" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="LTRH59SJ2DQMN">
<BUTTON   type="submit" class="roundbutton">Deity Dresses & Ornaments $501</BUTTON>
</form>
<form name="paypalform" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="GXBHCGQKYQD9A">
<BUTTON   type="submit" class="roundbutton">Sunday Evening Love Feast &nbsp; $251</BUTTON>
</form>
<form name="paypalform" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="KV8QNVXTAPM22">
<BUTTON   type="submit" class="roundbutton">Daily Deity Flowers One day $51</BUTTON>
</form>
<form name="paypalform" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="KV8QNVXTAPM22">
<BUTTON   type="submit" class="roundbutton">Raja Bhoga Offering One day $51</BUTTON>
</form>
<form name="paypalform" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="9T5MNYGH97DNY">
<BUTTON   type="submit" class="roundbutton">Donate another amount &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $$$</BUTTON>
</form>
  </div>
</body>
</html>

Open in new window

0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
LVL 8

Expert Comment

by:JT92677
ID: 35003612

You could start here:

http://freelanceswitch.com/money/making-a-paypal-form-tutorial/

Then look into the free version of this form builder:

http://www.formsite.com/landing/paypal-integration.html

Watch some videos, starting here and then looking at the related videos

http://www.youtube.com/watch?v=kpPMWemn7RM

Hope this helps. Remember to assign points if anything comes up that is useful !!

Jeff
0
 
LVL 1

Author Closing Comment

by:Jeff swicegood
ID: 35010126
This was exactly what I asked for, even though I did not completely ask for what I really needed. Thank you
0
 
LVL 8

Expert Comment

by:JT92677
ID: 35010652
Did you look at the form builder options?
0
 
LVL 1

Author Comment

by:Jeff swicegood
ID: 35014323
I will look more deeply into it. I did not look deeply into it yet because I had a hunch It was not what I needed. My project is done except for that one little element of having the browser always return to the start.jsp page so a new person approaching the kiosk will always find it at the beginning. As far as I know I don't need any more elaborate forms than what I have--it works as is. So I am unsure as to how learning to build forms will help with that. Maybe you can tell how you think it will help me.
0

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Strategic internal linking is often considered an SEO power technique, especially for content marketing. Do you need to hire an SEO agency to optimize you internal linking? No, this article will help you understand the basics of internal linking and…
An ASP.NET Web Form User Control is not newly introduced in ASP.NET. In fact, it was an old technology yet still playing a role to generate web content, especially when we want to use it to have a better and easy way to control part of the web conte…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

606 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