This topic is locked
[SOLVED]

 Multiple Projects

11/23/2010 12:33:25 PM
ASPRunnerPro General questions
R
Roger author

Hi all, just a quick question that I'm sure is easy to answer.
I have 3 projects and they all run quite well (a few minor issues). In any case, when a user logs in, they have access to their own data and all is well. Now when a Manager or Administrator logs in, I'd like to have an option on the menu (or tab) so that they can access the Admin Site. I use the same session variables, so redirecting them to the appropirate page is not a problem. I am currently using an HTML link to do this.
I use the Madrid Them with Paris Color Scheme. I'd like to see another Tab displayed, but for the life of me I can's figure out how to do this.
Also, when editing a Form using the GUI Editor, I need to move certain items around and group them accordingly. I've watched the video on how to create a Credit Card form and followed each step, pausing at certain steps, editing and rerunning etc. When I try to resize the tables as the video does, my form goes all "Foo Bar". When I get the form "Kinda" the way I want it, I try to copy the HTML (as the demo demonstated) from the Add Page to the Edit Page - well that was just a disaster...
Don't know what I am doing here.
Any ideas on either of these?
Thanks,
Roger

Sergey Kornilov admin 11/23/2010

You can add a new tab using Menu Builder and then add link to admin site there. Using ModifyMenuItem event you can hide this link from non-admin users.
Not sure what exactly might be wrong with form editing. There is no black magic there just a pure HTML.

R
Roger author 11/24/2010



You can add a new tab using Menu Builder and then add link to admin site there. Using ModifyMenuItem event you can hide this link from non-admin users.
Not sure what exactly might be wrong with form editing. There is no black magic there just a pure HTML.


Thanks for the information. I added a Menu Item prior to the post (should have told you that so as not to waste you time <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=54684&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' /> ), but I should have looked at the Events before posting - DOH!!!
As for the editor, when I click on the table resize handle after selecting the table and I drag (very slowly and carefully) the table (or columns depending on which I drag) either resizes too large to the point where it will JUMP in or out - depending on the direction I'm dragging. I followed the steps "exactly" as done in the video. I've actually tried this before and had similar issues and just gave up. But now I need to rework the page layout. Finally, when I select the table in the gui (or HTML mode), copy it and go to the Edit Page and paste it, well the resuls are just horrific. I've even tried it just in HTML mode.
Thanks for the pointer for the Tabbed Menu...

R
Roger author 11/26/2010



Thanks for the information. I added a Menu Item prior to the post (should have told you that so as not to waste you time <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=54727&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' /> ), but I should have looked at the Events before posting - DOH!!!
As for the editor, when I click on the table resize handle after selecting the table and I drag (very slowly and carefully) the table (or columns depending on which I drag) either resizes too large to the point where it will JUMP in or out - depending on the direction I'm dragging. I followed the steps "exactly" as done in the video. I've actually tried this before and had similar issues and just gave up. But now I need to rework the page layout. Finally, when I select the table in the gui (or HTML mode), copy it and go to the Edit Page and paste it, well the resuls are just horrific. I've even tried it just in HTML mode.
Thanks for the pointer for the Tabbed Menu...


Sorry to revisit this again, I added the menu item as inidcated. I've looked and looked and can't see any ModifyMenuItem event anywhere. I have the following: Function BeforeShowMenu(xt,templatefile) and Function BeforeProcessMenu(conn). The last one makes no sense here. So it follows that I'd put it into the first one. Now I don't know what code to put there. I've looked over this forum pretty thouroughly and found all kinds of links to xt.assign, but nothing that seems to help me. I've even copied the code examples and to no avail.
So I then put this line of code in the BeforeShowMenu event to see it I was indeed getting to the event: for I = 1 to -1 response.write (i) next response.end. Which should run forever. Nothing, no output at all. I have dDebug=true as well. So I'm wondering what goes on here.
I am using ASPR 6.2 (should have mentioned that).
Ideas???
Thanks, Roger

Sergey Kornilov admin 11/26/2010
R
Roger author 11/26/2010



Find this event under 'Global events':

http://xlinesoft.com/asprunnerpro/docs62/menu_item_modify.htm


Thanks for the help and I "certainly don't mean to be difficult", but I "Do Not" have that event in Global Events. Unless I am dumb and blind. I have these two events available (as mentioned) under Global Events:

  1. Function BeforeProcessMenu(conn),
  2. Function BeforeShowMenu(xt,templatefile).
    So I put this code in the BeforeShowMenu and still nothing:

    if menuItem.getLinkType() = "External" then

    if cint(session("Access_LVL")) > 900 then ' This is here to make sure that my coding is right for now...

    menuItem.setUrl("/flexr/admin/menu.asp")

    ModifyMenuItem = true

    else

    ModifyMenuItem = false

    end if

    end if
    Session("Access_LVL") is set in After Successful Login and it is populated correctly. The menu item ADMIN was added in the Menu Editor with an external link to the above link. Seems odd that one would have to do this even tho I have the extrnal lilnk in the menu editor.
    I also copied the function code (as per the link) edited the appropriate pieces and still nothing.
    If I even put a rsponse.write (and END) in this event I get nothing. So I'm guessing this event is not firing.
    Every user gets the ADMIN tab and access to the admin page. BTW, the admin redirection works fine, because everyone can access the link and the menu (and it's liks) are available and working. So that part is fine.

Sergey Kornilov admin 11/26/2010

What build of ASPRunnerPro 6.2 do you use?
If your build is not 5482 you need to contact support in order to get download link.

R
Roger author 11/26/2010



What build of ASPRunnerPro 6.2 do you use?
If your build is not 5482 you need to contact support in order to get download link.


Thanks muchly, I was really getting concerned that I was going goofy or senial (or both), so I'm glad it seems to be my build. I believe somewhere that we have the upgrade to 6.3 (not sure but will check).
Regardless if we already have it, would it not make more sense to upgrade? And if so, what caveates should we be aware of. This is quite important. I know that when we upgraded from 6.0 to 6.2 we had to edit a fair amount of our code to appease 6.2 (xt.assign comes to mind).
We really don't want to have to go back and re-manage 16 projects that we've developed over time, more correctly I really don't want to pay my two developers to rework old project (unless we have to by client request).
Your input with regard to upgrade is appreciated and as always, your help is greatly appreciated.
And thanks again for confirming my cerebrial content <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=54741&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />

Sergey Kornilov admin 11/29/2010

The typical advice is to install ASPRunnerPro 6.3 keeping previous version, open your project and save it under another name. If your project builds and runs fine under ASPRunnerPro 6.3 - it's safe to switch.

R
Roger author 11/29/2010



The typical advice is to install ASPRunnerPro 6.3 keeping previous version, open your project and save it under another name. If your project builds and runs fine under ASPRunnerPro 6.3 - it's safe to switch.



It turns out we have 6.2 and I've installed it on a seperate machine with a copy of the project.
When I enter this code:

if menuItem.getLinkType() = "External" then

if session("Access_LVL") > 900 then

menuItem.setUrl("/flexr/admin/menu.asp")

ModifyMenuItem = true

else

ModifyMenuItem = false

end if

end if


I get an error in the browser saying "Object doesn't support this property or method: menuItem.setUrl.
Now what can I look at. I've copied the code directly from the link you gave me, reviewed the manual:
(<<< Syntax

ModifyMenuItem(menuItem)

Arguments

menuItem - menu item. You can use the following methods:

getLinkType() - get the link type

getUrl() - get the link URL

setUrl(url) - set the link URL and make the link foreign

>>>)

And just can't get past this error. I've even tried a Blank URL, so it seems to be a property issue.
Thanks

Sergey Kornilov admin 11/29/2010

I would suggest to 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.

R
Roger author 11/30/2010



I would suggest to 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.



Thanks for the suggestion, but that's not an option here. We have several Proprietary COM components that are referrenced and used at login time so the code will fail if we do this.
However, I did do some checking at it seems that the method that we want to use is: menuItem.setUrl_p1. This is what is in menuitem.asp. However, when I do this, we get no error (that's good) but all the menus are available regardless of the users access_lvl.
Debugging on with response.writedisplays the correct access_lvl for a given login, but nothing has changed.
Any other ideas???
Thanks

Sergey Kornilov admin 11/30/2010

The only option for us to troubleshoot this project is to access your files and database. Why don't you create a copy of this project without the login page and upload it to demo account?

R
Roger author 11/30/2010

There's an idea. We do have just a few issues to cover first on our end; one of which is that we check for a user home directory with an AD Com component (and create if not there) and set some system data in our db during login so we need this page. I'll get one of my developers to create a fake login page with some sort of "Dummy/Demo" account - that should work.
So I understand the process, we would build, then upload to a demo account (after registering I imagine). Then you guys would come in and get the project using ftp or is there a wizard that does all that magic?
Sorry, never done this end so I want to make sure that I don't hinder the process.
BTW: thanks for sticking with this. I was starting to get a little frustrated with thinking about having to spend more on upgrades again, so your help and patience (patients???) is appreciated.
I'll setup the demo thing once I have my gal do her thing or maybe get her to do it all. Her name is Rebecca, so she may be using this login id to communicate if she has troubles.
Cheers....

Sergey Kornilov admin 12/2/2010

Once you post your application to Demo Account open a ticket at http://support.xlinesoft.com sending your Demo Account URL along with description of the issue you having.