This topic is locked
[SOLVED]

 Built in Button to target new page

7/19/2012 8:54:02 PM
PHPRunner General questions
C
crhys author

Hi,
I have created an application based on the Members Template and am using it within an iFrame.
The paypal screen will not display within the Frame so I require to open that page in a new window.
How do I specify a target for a built in PHPRunner button?
Code:
<A class=runner-button href="#" {$paynow_attrs}>Pay now</A>
I have tried the following with no success :-
<A class=runner-button href="#" target=_blank {$paynow_attrs}>Pay now</A>
Any Help Appreciated

Admin 7/20/2012

What is the actual HTML code generated by this snippet?
Usually target=_blank does the job.

C
crhys author 7/22/2012

Hi,
Here is the whole TD for that Pay Now button, as you can see the "Target =_blank" is in the code but does not open up the PayPal page in a new window.
It would be very handy to get this working, otherwise we will have to ask registered customers to Pay via a link in email.
Thanks
<TD style="TEXT-ALIGN: center" class="runner-cc runner-cc1"

colSpan=2><SPAN class=runner-btnframe><SPAN class=runner-btnleft></SPAN><SPAN class=runner-btnright></SPAN><A class=runner-button href="#" target=_blank {$paynow_attrs}>Pay now</A>

</SPAN></TD></TR></TBODY></TABLE></DIV></TD>

Admin 7/23/2012

Show us HTML code as it appears in the browser. What you have posted is a template code from Visual Editor.

C
crhys author 7/23/2012

Hi,
Below is the HTML code from the browser, target blank is there but maybe the onclick command is interfering with it.
<TD style="TEXT-ALIGN: center" class="runner-cc runner-cc1"

colSpan=2><SPAN class=runner-btnframe><SPAN class=runner-btnleft></SPAN><SPAN class=runner-btnright></SPAN><A target=_blank class=runner-button href="#" onclick="document.forms[0].submit();return false;">Pay now</A>

</SPAN></TD></TR></TBODY></TABLE></DIV></TD>

Admin 7/24/2012

Thanks, I see what's happening.
This button executes Javascript code that submits the form. You need to change this form target so it's submitted to the new tab/page.
Here an example of doing this:

<form action="form_action.asp" method="get" target="_blank">
C
crhys author 7/25/2012

Hi,
Thanks for the advice however I cannot find the form command in the HTML of the login page, where do I edit the form command ?
Below is the HTML for the login page :-
<!DOCTYPE html>

<HTML {$html_attrs}><HEAD><TITLE>{$pagetitle}</TITLE>

<META content=IE=7 http-equiv=X-UA-Compatible>

<META content="text/html; charset=Windows-1252" http-equiv=Content-Type><LINK rel=stylesheet type=text/css href="styles/default.css">{BEGIN rtlCSS}<LINK rel=stylesheet type=text/css href="styles/defaultRTL.css">{END rtlCSS}{BEGIN styleCSSFiles}<LINK rel=stylesheet type=text/css href="{$stylepath}">{END styleCSSFiles}{BEGIN pageCSSFiles}<LINK rel=stylesheet type=text/css href="{$pagestylepath}">{END pageCSSFiles}<!--[if IE]><LINK rel=stylesheet type=text/css href="styles/defaultIE.css">{BEGIN IEcssFiles}<LINK rel=stylesheet type=text/css href="{$stylepathIE}">{END IEcssFiles}<![endif]-->

<META name=GENERATOR content="MSHTML 9.00.8112.16447"></HEAD>

<BODY class="{$stylename}" {$bodyattrs}>{BEGIN body}{$header}

<TABLE class=runner-toptable cellPadding=0>

<TBODY>

<TR class=runner-header>

<TD class=runner-top colSpan=3>

{BEGIN container_fields}

<TABLE class="runner-c runner-c-fields" cellPadding=0 align=center>

<TBODY>

<TR class="{$cheaderclass_fields}">

<TD class=runner-cl><IMG src="images/spacer.gif"></TD>

<TD class=runner-cc></TD>

<TD class=runner-cc></TD>

<TD class=runner-cr><IMG src="images/spacer.gif"></TD></TR>

<TR style="WHITE-SPACE: nowrap"

class="runner-row style1 runner-b-memloginfields {$brickclass_memloginfields}">

<TD class=runner-cl></TD>

<TD class="runner-cc runner-brickcontents" colSpan=2>

{$msgWaite}

<DIV {$simpleLoginClass}>

<TABLE class="runner-c runner-c-fields" width="100%">

<TBODY>

<TR class="runner-row style2 header">

<TD style="TEXT-ALIGN: center; MARGIN: 5px"

class="runner-cc runner-cc1" colSpan=2>Login</TD></TR>

<TR class="runner-row style1 runner-b-loginfields">

<TD class="runner-cc runner-cc1" width="40%"><SPAN style="MARGIN: 5px">{BEGIN username_label}Username: {END username_label}</SPAN></TD>

<TD class="runner-cc alt"><INPUT style="MARGIN: 5px"

name=username {$username_attrs}> </TD></TR>

<TR class="runner-row style1 runner-b-loginfields">

<TD class="runner-cc runner-cc1"><SPAN style="MARGIN: 5px">{BEGIN password_label}Password: {END password_label}</SPAN></TD>

<TD class="runner-cc alt"><INPUT style="MARGIN: 5px"

name=password type=password {$password_attrs}> </TD></TR>

<TR class="runner-row style1">

<TD class="runner-cc runner-cc1"><SPAN style="MARGIN: 5px">{BEGIN remember_password_label}Remember Password: {END remember_password_label}</SPAN></TD>

<TD class="runner-cc alt"><INPUT style="MARGIN: 5px"

type=checkbox {$rememberbox_attrs}> </TD></TR>

<TR class="runner-row style2">

<TD style="TEXT-ALIGN: center" class="runner-cc runner-cc1"

colSpan=2><SPAN class=runner-btnframe><SPAN class=runner-btnleft></SPAN><SPAN class=runner-btnright></SPAN><A class=runner-button href="#" {$loginlink_attrs}>Submit</A>

</SPAN></TD></TR>

{BEGIN message_block}<TR>

<TD colSpan=2>{$message}</TD></TR>

{END message_block}<TR>

<TD colSpan=2><A style="MARGIN: 5px" href="register.php"

{$registerlink_attrs}>Register</A></TD></TR></TBODY></TABLE></DIV>

<DIV {$payLoginClass}>{$event PayPal_Submit}

<TABLE class=runner-c width="100%">

<TBODY>

<TR class="runner-row style2">

<TD style="TEXT-ALIGN: center; MARGIN: 5px"

class="runner-cc runner-cc1" colSpan=2>Membership

payment</TD></TR>{$paymentElements}

<TR class="runner-row style2">

<TD style="TEXT-ALIGN: center" class="runner-cc runner-cc1"

colSpan=2><SPAN class=runner-btnframe><SPAN class=runner-btnleft></SPAN><SPAN class=runner-btnright></SPAN><A class=runner-button href="#" target=_blank {$paynow_attrs}>Pay now</A>

</SPAN></TD></TR></TBODY></TABLE></DIV></TD>

<TD class=runner-cr></TD></TR>

<TR class="{$cfooterclass_fields}">

<TD class=runner-cl><IMG src="images/spacer.gif"></TD>

<TD class=runner-cc></TD>

<TD class=runner-cc></TD>

<TD class=runner-cr><IMG src="images/spacer.gif"></TD></TR></TBODY></TABLE>{END container_fields}</TD></TR>

<TR class=runner-body>

<TD class="runner-left {$blockclass_left}"></TD>

<TD class="runner-center {$blockclass_center}"></TD>

<TD class="runner-right {$blockclass_right}"></TD></TR>

<TR class=runner-footer>

<TD class=runner-bottom

colSpan=3><!--%%bottom%%--></TD></TR></TBODY></TABLE>{$footer}{END body} </BODY></HTML>
Thanks

Admin 7/26/2012

Most probably FORM tag is generated by PHP code.
If you have a valid support contract post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program. We'll be glad to assist you with this.

C
crhys author 7/26/2012

Hi,
I have some work to do on the app this weekend, I will post a support request for this issue and one more early next week, I will message you privately for a price.
Thanks
Rhys