This topic is locked

Hyperlink Popup

7/18/2006 5:10:57 PM
ASPRunnerPro General questions
J
JAT author

Greetings:
I am trying to get field "instructor" to display as a hyperlink (this I can do) and open a popup with the content from field "instructor bio" (this I can't figure out); similar to how the 'more...' window pops up.
Is there a way to do this?
Thanks for the help!
J

J
Jane 7/19/2006

Julie,
you can do the following:

  1. edit SQL query on the Edit SQL query tab: create new calculated field.

    Here is an example:

select InstructorID,

InstructorName,

InstructorBio,

'Table1_fulltext.asp?picfield=InstructorBio&where=InstructorID=' & [InstructorID] as [Name_and_Bio],

from Table1



where InstructorID, InstructorName and InstractorBio are your actual field names, Table1 is your actual table name.
2. Select Hyperlink for the Name_and_Bio field in the View as dropdown box on the Formatting tab.
3. Check off Open link in a new browser window option, choose Display field content and select InstructorName in the dropdown box.
Benjamin,
go to the My controls and select Edit avatar settings in the My profile section.

J
JAT author 7/19/2006

Thanks!
I put
select [InstructorID],

[InstructorName],

[InstructorBio],

'InstructorTBL_fulltext.asp?picfield=InstructorBio&where=InstructorID=' & [InstructorID] as [Name_and_Bio]

from [InstructorTBL]
into the SQL menu and did the hyperlink format. The results look right on the _list page (http://www.co.sanmateo.ca.us/eps/training/Fall2006v2/InstructorTBL_list.asp) and the link pops open the window, but I get a "Page cannot be displayed" error for the generated link:
http://www.co.sanmateo.ca.us/eps/training/...=InstructorID=1
Error Type:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)

[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.

/Training2006/InstructorTBL_fulltext.asp, line 29
Did I do something wrong? Thanks!

J

Alexey admin 7/20/2006

Hi,
since your InstructorID field is of character type you need to add quotes to it.

So here is the correct query:

select [InstructorID],

[InstructorName],

[InstructorBio],

'InstructorTBL_fulltext.asp?picfield=InstructorBio&where=InstructorID=''' & [InstructorID] & '''' as [Name_and_Bio]

from [InstructorTBL]

J
JAT author 7/20/2006

Hi,

since your InstructorID field is of character type you need to add quotes to it.

So here is the correct query:


AWESOME! Worked great! Thanks so much!!
J

J
JAT author 12/20/2006

Greetings!
It's time for the next edition of our catalog, but I can't get the old code (messages above) to work with the new version of ASPRunner (Build 187) to display the instructor bio in a popup window from clicking the instructor name.
I created a new ASPRunner file for the new version of the program. Though I have "Open link in new window" checked, the link opens in the same window and the instructor bio is missing/blank.
I also have other fields, MapURL and Location, that are causing problems where none used to exist (in old version of ASPRunner). When I check "open in a new window" and have MapURL displayed as Location, the field turns out blank. When I select to have MapURL displayed as URL, it's also blank.
My files are on the demo server...http://demo.asprunner.net/jtgoebel%5Fco%5Fsanmateo%5Fca%5Fus/Project1/COMPUTER_list.asp.
Help!
Thanks!! Happy Holidays!

J
Jane 12/21/2006

Julie,
this tip in the new ASPRunner version looks like:

select [InstructorID],

[InstructorName],

[InstructorBio],

'InstructorTBL_fulltext.asp?field=InstructorBio&key1=''' & [InstructorID] & '''' as [Name_and_Bio]

from [InstructorTBL]

J
JAT author 12/21/2006

Thanks!
The field displays the instructor's name and the link now opens in a new window, but there isn't any bio text displayed, just the link to close the window. I'm starting to think the problem is in my database, I just can't nail it down.

J
JAT author 12/27/2006

Help!
I've gone over everything (that I can think of) in my database and ASPRunner Project and just can't figure out why the bio text isn't showing up. Everything seems like it's working fine as far as tables/queries/etc. go.
http://demo.asprunner.net/jtgoebel%5Fco%5F...MPUTER_list.asp
Any advice is appreciated!
~Julie

Sergey Kornilov admin 12/27/2006

Julie,
two things:

  1. You need to make sure InstructorBio field appear at least on one of the following pages:

    List/View/Edit/Print/Export
  2. Here is the correct SQL query:
    gstrSQL = "select [CourseID], [CourseCategory], [CourseTitle], [CourseDate(s)], [CourseLength], [CourseTimes], [MapURL], [Location], [TargetAudience], [Pre-Requisite(s)], [CourseDescription], [InstructorName], [InstructorBio], [InstructorID], [NonprofitPricing], [SessionOffered], 'COMPUTER_fulltext.asp?field=InstructorBio&key1=' + [CourseID] as [Name_and_Bio] From [COMPUTER]"
    I have fixed this on your Demo Account.

J
JAT author 12/27/2006

PERFECT!! Thank you so much!!