Forum Moderators: mack

Message Too Old, No Replies

Open a new small window upon clicking?

new small window help

         

RiverGuy

1:56 am on Aug 24, 2005 (gmt 0)



I have a newsletter signup box on my site. When the visitor clicks submit, I have it so a new window opens and says thank you. The new window then closes itslef automatically after 3 seconds. How can I get this window to open at a size of 400x400 instead of full screen? Can it be done with html? We tried it with java script & it was opening an error message in the window saying: "" is not a valid email address.

The info was sent properly to the autoresponder (AWeber) but the thank you page did not display, just the error page. I believe this is due to the javascript we tried to use.

Please help.

bhonda

11:34 am on Aug 25, 2005 (gmt 0)

10+ Year Member



Hey there Mr River,
I was messing around with this myself a couple of days ago - I ended up using JavaScript to do it.

What code were you using that gave you the error? It might help if you posted it. Sometimes it turns out that it's something really simple that causes the whole thing to fall over and die!

I don't know how you want to open your window, but you could use the following code within JavaScript <SCRIPT></SCRIPT> tags -

window.open('page.html','newWin','width=400,height=400');

...where 'page.html' is the page you want to be displayed, and 'newWin' is the name of the new window. Be warned though - I haven't testing this myself - I'm using asp.net and had to use a bit of dynamic JavaScript to get working what I wanted, but I'm fairly confident this will work too!

Let us know if you get it sorted.
B

<edit_reason>Me being a muppet</edit_reason>

S e a r c hBliss

7:20 pm on Aug 25, 2005 (gmt 0)



I would use the JavaScript inside your submit button using the onClick event:

onClick="window.open(.....)"

[edited by: rogerd at 8:39 pm (utc) on Aug. 25, 2005]
[edit reason] No sigs or URLs, please... [/edit]

leatherback

11:28 am on Aug 30, 2005 (gmt 0)

10+ Year Member



Hi,

in full, including some variables:
<a class="thumblink" href="http://www.example.com/portfolio/slideshow.php?c=South Africa&amp;keys=Animals" onclick="window.open('http://www.example.com/portfolio/slideshow.php?c=South Africa&amp;keys=Animals','', 'width=500, height=500, location=no, menubar=no, status=no,toolbar=no, scrollbars=no, resizable=no'); return false">See as slideshow</a>

<Sorry, no personal URLs.
See Terms of Service [webmasterworld.com]>

[edited by: tedster at 12:57 pm (utc) on Aug. 30, 2005]