How to change web site behavior without changing code?

15 pts.
Tags:
JavaScript
Web development
Does anyone know how to do this or if it is even possible? There is a tree view explorer along the left side of the page and a page viewer on the right. The user clicks an item in the tree view and it loads a page in the page viewer on the right. The page in the page viewer just contains a link to another page. So user then has to click on that link to actually see the document. They want to be able to see the document with one click. So the user clicks on the item in the tree view and it opens the document in a new window. Simple, right? I thought so, too. I created a javascript that finds the correct document to open and opens the document in a new page. In order for the javascript to work, I need to embed a command in the web page to call the javascript when a tree view item is clicked. My manager said that the web page can't be changed so I can't put embed any commands in it. It is part of a corporate package that is shared by several divisions. The other divisions have put the actual data in the web page viewer instead of just a link. He said just create a javascript to do this. How do I create code to respond when a user clicks on a specific item on a webpage without changing any of the code on the webpage? How is the javascript supposed to know what has been clicked and which document to open? Any help or ideas would be appreciated. Thanks.

Answer Wiki

Thanks. We'll let you know when a new response is added.

You mention that <b>The other divisions have put the actual data in the web page viewer instead of just a link</b>

If you control the web page view you can put it in there. If you do not you could try entering the script into one of the fields not in use, like a summary field.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • mshen
    Sounds like a hard job. If they put "data" meaning text, there isn't much you can do than change the website. If nobody figures it out, your best bet is to give your boss the javascript and tell him the divisions need to embed some code here or there.
    27,385 pointsBadges:
    report
  • Contractanalyst
    Consider this question closed. Thanks for your suggestions. They had decided to solve this problem another way.
    15 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following