could anybody help with abit of javascript?
open_window() { setTimeout("window.open('http://www.google.co.uk', 'http://www.google.co.uk', 'scrollbars=0,resizable=0,height=120,width=170')',1000)" } </script> </head> <body <body onLoad="open_window()">
Doesnt do anything, anda window is supposed to load after 1 second?
Thanks
Pop up window?
Hi rmcivo1,
How are you calling it?
Re: Pop up window?
could anybody help with abit of javascript?
open_window() { setTimeout("window.open('http://www.google.co.uk', 'http://www.google.co.uk', 'scrollbars=0,resizable=0,height=120,width=170')',1000)" } </script> </head> <body <body onLoad="open_window()">
Doesnt do anything, anda window is supposed to load after 1 second?
Thanks
Hi
The last line isn't valid:
You have:
<body <body onLoad="open_window()">
and it should be
<body onLoad="open_window()">
Trevor
Pop up window?
Hi Trevor,
I completely missed the last line.
I must have my "see only valid code" glasses on
Pop up window?
Hiya sorry about this, I should have seen that :? There is another problem in the script somewhere, but I cannot see it?
<script language="JavaScript"> open_window() { setTimeout("window.open('http://www.google.co.uk', 'http://www.google.co.uk', 'scrollbars=0,resizable=0,height=120,width=170')',1000)" } </script> </head> <body onLoad="open_window()">
Thanks
Pop up window?
Hi rmcivo1,
Your quotes are wrong.
Pop up window?
ooohhhhh, whoops sorry havn't got much experience in Javascript? I dont know which quotes? :?
Pop up window?
Hi rmcivo1,
If you look at the function you have a double quote inside setTimeout that is closed outside setTimeout.
I think you should be able to remove the double quotes altogether in this case.
Hope that helps
Pop up window?
ok this is what I have now? but it doesnt seem to do anything
<script language="JavaScript"> open_window() { setTimeout(window.open('comments_view.php', 'comments_view.php', 'scrollbars=0,resizable=0,height=120,width=170'),1000) } </script> </head> <body onLoad="open_window()">
Can anybody help?
Pop up window?
try this:
<script language="JavaScript"> function open_window() { setTimeout("window.open('comments_view.php', 'Comments', 'scrollbars=0,resizable=0,height=120,width=170')",1000) } </script> </head> <body onLoad="open_window()">
You hadn't declared open_window as a function.
Pop up window?
thanks for that guys, I think It was my web browser not allowing pop ups not the code
Thanks again for you time and effort
Rees
Pop up window?
Hi
Ah, like Firefox etc block these by default?
Why not consider popping up a hidden div instead. Or similar. It would need javascript to be enabled, but doesn't fall foul of the po-up blockers.
Trevor
Pop up window?
oh cool, how would that work? sorry to be a pain
Pop up window?
Hi
As a demo only, see the ? buttons next to the form elements on this page. See the ones next to the dropdowns marked sidebar intrudes ... about halfway down. As you can see, you can put html in here, as I did with this image.
http://207.44.137.103/pagemaker_form.php
I used DOM Tooltips from freshmeat, but I had to mod the code to get it working how I wanted it.
Trevor
Pop up window?
If you want your page to validate, don't forget to make the onload attribute all lowercase