Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inject JS in a page

Status
Not open for further replies.

jshurst

Programmer
Oct 27, 2004
1,158
US
Strange question here, but I need to do it, so here it goes...

We have a vendor app written in asp.net, hosted on our servers. The code is precompiled (but I can add to the web.config file). I would like to be able to inject javascript into each page while the page is loading. This would allow me to do stuff like validation when I click a button on their site (i.e. clicking a "Save" button would fire my custom JS first).

I was thinking about 2 ways to do this, but haven't tested either. 1) Write a http module. Would this have to be compiled into their project? I've only done one before (to encrypt querystring params). Would this even accomplish what I want?

2) Host my own page with an iframe in it that will then load their application. The JS would be contained in the page hosting the iframe. Not sure if this would work either.

Any thoughts/suggestions on how I should approach this?

Thanks,

J
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top