This topic is locked

Possible to link to one page from two different tables

3/4/2009 7:44:08 PM
ASPRunnerPro General questions
A
aspdummy author

I'm using the standard real estate template. Under the table retblresults, I have list page and view page. Each item in the retblresults list has a "View" hyperlink which takes a user to the corresponding retblresults view page.
I have basically copied the retblresults table, called it retblmain and set it to display only a few select records from the retblresults table. These retblmain results also have a "View" hyperlink.
All of this works fine so far. But the retblmain "view" hyperlink automatically points to the retblmain view page which is a totally different format from the retblresults view page.
I have tried to copy the code from retblresults view page to retblmain view page to make them identical, but this doesn't seem to work. Also I have tried to change the retblmain "View" hyperlink to point to the retblresults view page, but that also doesn't seem to work.
Is there a simple solution to make the retblmain "view" hyperlink point to the retblresults view page?
As always, any help greatly appreciated

J
Jane 3/5/2009

What ASPRunnerPro version do you use?

A
aspdummy author 3/5/2009

ASPrunner Pro V6.0 Build 766

Sergey Kornilov admin 3/5/2009

You should be able to achieve this modifying View link in Visual Editor.
If you need more help post your project to Demo Account and open ticket at http://support.xlinesoft.com sending your application URL along with your order number.

A
aspdummy author 3/7/2009

Which seems to bring up an entirely different problem...I'm trying to set up a "demo" version of the page - basically remove my passwords and set up a database with only a couple of samples to keep size down. But as soon as I uncheck "Create Login Page" or try "Hardcode Username and Password" set to "admin", "admin" I get a message to the effect of "Unable to apply changes to retblresults_list if the page looks wrong reset the code" Well, the list page is essentially gone except for one title at the top, and 'resetting' the code undoes the hours of custom work I've done to it.
So...perhaps I could post up the code from the original issue.
On my retblresults_list page, the view link code is:

<TD align=middle width=35><A id=viewlink{$row.1recno}

href="retblresults_view.asp?{$row.1editlink}">View</A></TD>



which takes me to the correct retblresults_view page: http:// ..../retblresults_view.asp?editid1=XXX (where XXX would be the record number, such as 223)
On my retblmain_list page, the view link code is: (of course, totally different)

{BEGIN grid_row}<TR vAlign=top {$rowattrs} {$rowstyle}>{BEGIN grid_record}{BEGIN view_column}

<TD vAlign=middle align=middle>{BEGIN view_link}<A {$viewlink_attrs}>View</A>{END view_link}</TD>{END view_column}



This takes me to the page: http:// .../Featured_view.asp?editid1=XXX (again, XXX is the 3 digit record number). But I would really like this link to point to the retblresults_view page mentioned above.
I have tried to simply cut and paste the code from the working link to the retblmain_list page, but it seems to loose the editid1=XXX portion. I've also tried to figure out where the "Featured_view.asp..." portion of the second link is generated, thinking maybe I could change it to the correct location, but haven't been able to locate that either.
Sorry to be such a pain, I'm trying to set this up for our small family business on a shoestring budget. I'm 'the computer guy' only by default of having a little html experience, and am still finding ASP utterly frustrating - as shown above two roughly equivalent links can have utterly different coding!
Many Thanks.

J
Jane 3/12/2009

Hi,
you can check view link in the List page: After record processed event on the Events tab.

Here is a sample:

editlink="editid1=" & my_htmlspecialchars(SafeURLEncode(rs("PropertyID")))

record("viewlink_attrs")="href=""retblresults_view.asp?" & editlink & """ "