Jump to:

3393 Posts in 976 Topics by 852 members

Template Questions

SilverStripe Forums » Template Questions » javascript "self.name"

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 2917 Views
  • SalvaStripe
    Avatar
    Community Member
    89 Posts

    javascript "self.name" Link to this post

    hello,

    when a window was opened as popup, it has a value in self.name, otherwise (normaly browserwindow) should have no value in "self.name"..

    so.. i want to display the same page normaly, with navigation, footer etc.. and as popup.
    there are nearly 100 pages with a lot of text, so is would be easier to create these pages one time, not 2 times.. (editing would take double time)..

    and when i create a pagetype, what loads just the content of the main site with the content, i get the problem, that the links inside this content link to "normal view site" OR "popup view site"!!

    the best way would be an "IF" command.. simple JS code like

    dokument.write(self.name)


    does work to show the window name.. (when popup is open its value is "popup_id".. otherwise its empty.

    i need to different this value in SilverStripe Code to seperate my template easy.. u know what i mean?

    help me pleeasee^^ THX

    2917 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.