CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Newbie - How to get login to return to a new framespage

Print topic Send  topic

Author Message
Paul Shearing
Posted: 10/18/2005, 4:32 PM

(Latest CCS Studio purchased two weeks ago and experimenting with beta 3). This is my first CCS project.

I have used the application builder to create a login page and some database pages. I need to integrate these into an existing website. So, I am accessing the login page from within a website that uses frames. There are four frames on the page - in a classic layout (that FrontPage calls "Header, Footer and Contents") i.e. a narrow heading top and bottom, a left sidebar in which a menu is displayed and a frame called "main" to the right (the Content frame). When a user selects "Members' Area" from the sidebar menu, I display the CCS login form in "main". After successfully loging-on I wish CCS to open a different frames page in a new browser window (this has a similar layout but a different sidebar menu). Effectively, I want to enter a new "member's universe" based on a different frames page. I have specified the name of the required frame page html file as the [Return Page] for the login button.

It works but it opens the frames page within the "main" frame of the website, effectively nesting and displaying the new frame page within the "main" frame. How can I get it to open in a new browser page? :-/

The [Return Page] parameter is currently set to: ..\DB_MainFramePage.htm

This is kid's stuff I know but I just can't see how to do this, nor can I find references to such a technique in the documentation or forums.

Any help would be gratefully received.

Paul Shearing
Software Development Services
Caterham, Merrie England.
Edd


Posts: 547
Posted: 10/18/2005, 8:02 PM

Paul
Copy and paste the following for reference:
_blank
The user agent should load the designated document in a new, unnamed window.
_self
The user agent should load the document in the same frame as the element that refers to this target.
_parent
The user agent should load the document into the immediate FRAMESET <present/frames.html> parent of the current frame. This value is equivalent to _self if the current frame has no parent.
_top
The user agent should load the document into the full, original window (thus canceling all other frames). This value is equivalent to _self if the current frame has no parent.

Therefore, your return page is

..\DB_MainFramePage.htm target="_blank"

Hope that helps
Edd

_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message
Paul Shearing
Posted: 10/19/2005, 4:50 AM

Thanks Edd

I've done as you suggested but unfortunately it causes a fault in the ASP file. (Perhaps I should have mentioned that I'm using ASP 3 with Templates).

The code generated by CCS in the Login.ASP file for the button press event is:

Redirect = "../DB_MainFramePage.htm target="_blank"?" & CCGetQueryString("QueryString", Array("ccsForm"))

This gives "Page cannot be displayed" in the browser, with the following details:

HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

--------------------------------------------------------------------------------

Technical Information (for support personnel)

Error Type:
Microsoft VBScript compilation (0x800A0408)
Invalid character
/BRL_DATABASE/BRL_WEB/login.asp, line 204, column 45
Redirect = "../DB_MainFramePage.htm target="_blank"?" & CCGetQueryString("QueryString", Array("ccsForm"))
--------------------------------------------^


Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)

Page:
GET /BRL_DATABASE/BRL_WEB/login.asp

This looks to me as though the generated code is getting confused by lack of parity with double quotes so I've tried doubling-up on the quotes in the CCS login return field, thus:

..\DB_MainFramePage.htm target=""_blank""

This generates:

Redirect = "../DB_MainFramePage.htm target=""_blank""?" & CCGetQueryString("QueryString", Array("ccsForm"))

Iand gives: "The page cannot be found". I've also tried single quotes around the target clause:

..\DB_MainFramePage.htm target='_blank'

Kind regards

Paul Shearing
Edd


Posts: 547
Posted: 10/19/2005, 3:03 PM

Paul,

Your
Redirect = "../DB_MainFramePage.htm target="_blank"?" & CCGetQueryString("QueryString", Array("ccsForm"))

Should be
Redirect = "../DB_MainFramePage.htm target=""_blank"?""" & CCGetQueryString("QueryString", Array("ccsForm"))

In ASP a double quotes within a string need to be wrapped.

Edd

_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message
Paul Shearing
Posted: 10/19/2005, 4:17 PM

Thanks again Edd.

Sorry to be a total pain, but it is still not working for some reason.

I could be wrong but believe that there is a minor correction required to your last email - your suggestion gives an ASP parsing error, I think that what you intended was:

Redirect = "../DB_MainFramePage.htm target=""_blank""?" & CCGetQueryString("QueryString", Array("ccsForm"))

Please correct me if I am wrong. This puts the quotes around "_blank", but it still gives a "The page cannot be found" error.

I notice that this code is assigning a value to a local variable called Redirect, it is not, if I have understood properly, actually performing the Response.Redirect command at this point. I am wondering if inserting the target is subsequently upsetting some other aspect of the CCS / ASP system that is maybe parsing the string and not expecting a target clause to be there. I could have got this all wrong because I cannot see where this variable is being used to open the new page.

The ASP code for the routine is generated by the "New Page | Login" wizard and currently, including the latest changes, looks like this:

'Login Operation Method @2-C621B7C6
Sub Operation()
If NOT ( Visible AND FormSubmitted ) Then Exit Sub

If FormSubmitted Then
PressedButton = "Button_DoLogin"
If Button_DoLogin.Pressed Then
PressedButton = "Button_DoLogin"
End If
End If
Redirect = FileName & ""
If Validate() Then
If PressedButton = "Button_DoLogin" Then
If NOT Button_DoLogin.OnClick() Then
Redirect = ""
Else
Redirect = "../DB_MainFramePage.htm target=""_blank""?" & CCGetQueryString("QueryString", Array("ccsForm"))
End If
End If
Else
Redirect = ""
End If
End Sub
'End Login Operation Method

Perhaps I need to change something elsewhere?

Kind regards

Paul Shearing :-(
Edd


Posts: 547
Posted: 10/19/2005, 5:37 PM

Doh! Doh! Doh!

Your right I screwed up big time. Too many cups of coffee.

Forget what I said TOTALLY!!! AHHHHHH!!!!

You need to set the FORM target as "_blank" and you can do by changing the HTML or properties of the form.

Sorry for wasting your time.

Edd

_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message
Paul Shearing
Posted: 10/19/2005, 6:02 PM

Thanks Edd, that's done the trick.

Interestingly, changing the HTML for the login button to include target="_blank" is accepted and the colour syntax highlighting shows that it is understood, but it does not work. Right-clicking on the Login HTML page and changing the target frame to _blank does.

Thanks again

Paul


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.