PDS and Inserting JavaScript in Task Name

  • Thread starter Unites_web_developer
  • Start date
U

Unites_web_developer

Hello - Does anyone know of a method to insert JavaScript, specifically
window.open, in the <Name> Task attribute. If I insert it directly, Project
strips out the code between the <> and leaves me with nothing. If I escape
the <> characters, then it pushes over the JavaScript code literal resulting
in the JavaScript code being visible in the Task Name. All I want is some
text and a HTTP link in the Task Name. Does anyone know how to do this
seemingly simple task?? Thanks - Chad
 
R

Rod Gill

How about putting the link into the Hyperlink field for the task and leave
the name with text?
 
U

Unites_web_developer

I would love to do that, but I'm using PDS to create the project and can't
seem to find out how to write a HTTP link to the Hyperlink field. Any ideas
 
R

Rod Gill

If its not in the PDS documentation that comes with the SDK (download free
from microsoft.com) then you need to write a PDS extension to do it. That
requires development work.
 
U

Unites_web_developer

Rod - Thanks for your time. There are no methods listed in the PDS for
creating HTTP links that I can see. Days of reading the PDS documents has
come up with nothing. It looks like all the PDS extender does is to call some
other PDS methods, do some work, and then return a developer defined result.
Since there is not a method (that I can see) for inserting Hyperlinks to
begin with, it seems that a PDS Extender won't work for me. I've looked at
the SQL Server database and tried to insert my own Hyperlinks directly into
the database with no positive results. Any ideas or resources that you can
recomend? Thanks - Chad
 
R

Rod Gill

The pjdb.htm file will tell you: I think its TASK_Hyperlink in MSP_Tasks
table. Make sure you update the EXT_REF type flags. Read pjdb.htm CAREFULLY!
 
U

Unites_web_developer

Rod - Thanks again for your help. After your reply, I did find the pjdb.htm
file. Following the methodology described in the Project 2003 Data
Reference, I
set the values in MSP_TEXT_FIELDS and updated the flags in MSP_PROJECTS
(set proj_ext_edited=1 and proj_ext_edited_text=1). After creating several
projects and trying this, I still see no Hyperlink column in PWA. I can see
hyperlinks for Projects that have been created on the client and published to
PWA, but the Projects I have created using PDS show no hyperlinks after I do
the above procedure. Any ideas on how to tame this beast? Thanks - Chad
 
R

Rod Gill

There's a specifying Hyperlinks section in the pjdb.htm file. Did you follow
it's example? Does it work in a new Project?
 
U

Unites_web_developer

Rod - I followed the "Specifying Hyperlinks" section exactly as described. I
ran the INSERT statement they provided, included the correct project id and
task uid. I also updated the MSP_PROJECTS as described to indicate external
editing. Still I get no results. I've tried this on new PDS created projects
and client created projects that already have hyperlinks. Nothing seems to
work. Are there any known issues with this method? Is there any Project
Server configuration settings that are not enabled? Thanks as always - Chad
 
R

Rod Gill

When setting the Ext_Edited_flag, you need to set it to '1' (text 1) rather
than numeric 1. If you try numeric one the update may well fail. Check the
field type and if it's character make sure you update to '1'.
 
U

Unites_web_developer

Rod - the Datatype of the ext_edited columns is type Bit. Whether I run the
update with character or numeric "1", SQL Server takes it eitherway. I can
see the data in the tables after my insert/update, but still I see no
Hyperlink column in PWA. Here are the DML statements I ran. I did substitute
the correct proj_id and task_uid. Any ideas on waht's going on????
Thanks - Chad

INSERT INTO MSP_TEXT_FIELDS
(PROJ_ID,
TEXT_CATEGORY,
TEXT_REF_UID,
TEXT_FIELD_ID,
TEXT_VALUE)
VALUES
(10, -- my project ID
0, -- task category
2, -- My UID of the task
188743898, -- 'Task Hyperlink Address'
'http://myserver/default.htm')

UPDATE MSP_PROJECTS
SET PROJ_EXT_EDITED = '1',
PROJ_EXT_EDITED_TEXT = '1'
WHERE proj_id = 10
 
U

Unites_web_developer

Rod - Thanks for your help on the issue. Since this thread is old and has
strayed from it's original title, I will post a new question with the
specific problem I'm having now. -Chad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top