SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    u.s.a
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Form button? -onclick- New Window?

    Hello every1,

    I have created a form that will send me a subscribers email add, but I also want a new window to pop up on the right side of the screen.


    I have a new window code (java s and PHP) but I'm not sure how to make it work when the form button is clicked.

    Can anyone tell me what type of code I need or if this is possible????

    Thanks,
    The Counselor
    In need of counseling

  2. #2
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <input type="submit" name="submit" onClick="window.open('blah');">
    I swear to drunk I'm not God.
    Ľ Matt's debating is not a crime ę
    Hint: Don't buy a stupid dwarf Ų Clicky

  3. #3
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    funny I had this same problem on an app I was developing last month. Here's what I came up with:

    Code:
    <form method='post' action="/servlet/Lookup" target="_popup" onSubmit="return openPopup();">
    and the js method is :

    Code:
    function openPopup(){
    	window.open("","_popup","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=520,height=500,left=30,top=80");
    	return true;
    	};
    I needed (sounds same as you) to pass the variables from the form to the servlet IN the popup ..... this was the only thing I could get to work 100% of the time ........ if they shut of JS , well ...... they dont get to use the app!

  4. #4
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    u.s.a
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks this will work for me!!!!

  5. #5
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    u.s.a
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dc,
    I didn't try your code out because im very new at all the code stuff. A buddy of mine will be trying it out for me soon!!

    I have one more of my many problems you or another coder might be able to help me with. I bought a home page design here at sitepoint and I didnít have enough money to pay someone to code and program it right away, So I used dreamweaver and attempted to code it myself.
    Take a look at http://www.themidnightboutique.com

    1. I donít know how to put a border around the site.

    2. It looks fine in IE browser when I go through Msn Etc...
    But when I open in via IE right from the IE shortcut it looks magnified and pixilated.....

    Any sugg... or info will help!

    Regards,
    The C


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •