Javascript - Grabbing URL and placing it on the page

Associate
Joined
13 Nov 2003
Posts
1,567
Location
Manchester
Hi GUys

Quick question...

I am working on something at the moment and need some help.

I have a page on a CMS system with an iframe tag on it. The issue is that this page appears on 30 different sites via the CMS but I need to change a variable in the iframe SRC depending on the site it appears on.

Unfortunately because of the way the CMS works (which I have no access to) I cant just make 30 different versions with the ammended tags.

Is there anyway I can use JS to output a different tag depending on what the URL is?

The src is formed along these lines - http://sitelinks.co.uk/page.aspx?brand=xxxx - and it is the xxxx bit I need to change.

I am not sure it can be done in JS and unfortunately I have no server side access to the CMS

Any help would be appreciated

Thanks
Aaron
 
Back
Top Bottom