Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

adding popup

Asked Modified Viewed 3,481 times
F
free1301
F
  • Member, joined since
  • Contributed 66 posts on the community forums.
  • Started 25 threads in the forums
  • Started this discussions
asked
Member

Not sure if this is correct place to post but, if i have a exit popup script that runs when someone is going to close the window down once they arrive at the site, where would I put that script? would it be in news.php or site welcome or somewhere else? thanks for any help!
0 replies

6 posts

T
timewarp
T
timewarp 10
  • Junior Member, joined since
  • Contributed 35 posts on the community forums.
  • Started 1 thread in the forums
answered
Junior Member

I believe it's in /themes/templates/header.php you should put your script.

Right above:
echo "</head>\n<body>\n";


But ain't it JavaScript you're using for this ? - If yes, I believe there's a bit code for the <body>-section too ??
Edited by timewarp on 22-04-2010 20:26,
0 replies
F
free1301
F
  • Member, joined since
  • Contributed 66 posts on the community forums.
  • Started 25 threads in the forums
  • Started this discussions
answered
Member

yes its javascript....Not the best with code, its html how do i put it in above that if its php? messes up website?
Edited by free1301 on 22-04-2010 22:13,
0 replies
T
timewarp
T
timewarp 10
  • Junior Member, joined since
  • Contributed 35 posts on the community forums.
  • Started 1 thread in the forums
answered
Junior Member

If you change all " to \" in the JavaScript code it should be able to "pull it off". ;)

Or else post the code here - and I'll take a look at it.
0 replies
F
free1301
F
  • Member, joined since
  • Contributed 66 posts on the community forums.
  • Started 25 threads in the forums
  • Started this discussions
answered
Member

I got it by just inserting the html at the bottom of the header.php :D Thanks Timewarp!
0 replies
T
timewarp
T
timewarp 10
  • Junior Member, joined since
  • Contributed 35 posts on the community forums.
  • Started 1 thread in the forums
answered
Junior Member

NP.

Maybe you can post the code here too - just if there's other that maybe can use it ?
0 replies
B
browser1
B
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 2 threads in the forums
answered
Newbie

Hi Guys,

I would like to add a popup window to my page. I have two codes with the instructions:

1. Paste the first part into the head of your html document
2. Use the form code to open the popup page on your site

<head>
<script type="text/javascript">
function popup(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=500,left = 262,top = 134');");
}
</script>


<!-- STEP TWO: Paste this onLoad event handler into the body tag -->

<body onload="javascript:popup('http://www.mysite.com/viewpage.php?page_id=14')">


Where I should put these exactly?

Thanks for the answers!

0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 6 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

F
F
  • Member, joined since
  • Contributed 66 posts on the community forums.
  • Started 25 threads in the forums
  • Started this discussions
T
T
timewarp 10
  • Junior Member, joined since
  • Contributed 35 posts on the community forums.
  • Started 1 thread in the forums
B
B
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 2 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet