...

View Full Version : Using window.location to Display Content



CSS
01-03-2011, 09:50 PM
Hey guys.
I'm currently paying for a web service on a hosted platform. Basically, I'm unable to edit any raw content, however I am able to do things like add JS/HTML to the header or footer of a page, which will in turn be displayed on every page of this platform. My dilemma is, I only want content being showed on a single page of the platform. Specifically, I want a window.alert being displayed on the "/signup" page, but all I have to work with is JS in a global footer.

Is there some way I can use window.location to achieve this?

Logic Ali
01-03-2011, 10:07 PM
I want a window.alert being displayed on the "/signup" page, but all I have to work with is JS in a global footer.

Is there some way I can use window.location to achieve this?


if( location.href.indexOf( 'signup.html' ) > -1 )
alert( 'This is the signup page' );



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum