Link to home
Start Free TrialLog in
Avatar of uk747
uk747

asked on

Modifying subscribe page

Hi ;

I am trying to edit one of my website page  it's subscribe page .
What I want to do is ;  when someone  fill all the input form data a small popup window show up  in the middle o f the screen contain  his/her  previous entered information  / it's like conformation  page ! /

I used javascript to call popup window but I couldn't Get the passed input values In the popup win !!  I tried  many JS function.

also I want to set a style for the popup window and show organize user information!

you can use the next script to give me some ideas
 
<html>
<head>
<script Language="JavaScript">
function Data(){
win2 = window.open("", "", "width=320, height=200,resizable=0,scrollbars=1,status=0,toolbar=0,top=50,left=50");
win2.document.write("You said: " + document.forms[0].Item1.value);
win2.document.close();
}
</script>
<META NAME="generator" CONTENT="Web Scripting Editor 5.0 (Win32)">
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#0080C0" alink="#FF0000">
<form>
<input type="text" name="Item1" size="20" value="whatever">
<input type="button" value=" Submit! " onClick="Data()"></td> Development 
</form>


</body>
</html> 

Open in new window

Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

This is almost an exact copy of what you posted.  It worked perfectly for me in Chrome.

<?php // RAY_temp_uk747.php
error_reporting(E_ALL);
?>
<html>
<head>
<script Language="JavaScript">
function Data(){
  win2 = window.open("", "", "width=320, height=200,resizable=0,scrollbars=1,status=0,toolbar=0,top=50,left=50");
  win2.document.write("You said: " + document.forms[0].Item1.value);
  win2.document.close();
}
</script>
</head>

<body>
<form>
<input type="text" name="Item1" size="20" value="whatever">
<input type="button" value=" Submit! " onClick="Data()"></td> Development
</form>

</body>
</html>

Open in new window

So please explain a little more about what's wrong here?
Avatar of uk747
uk747

ASKER

yes it's work ..
but I couldn't make it appear in a middle  of screen  
and couldn't set a style for this popup as you see it's Java-script
Avatar of uk747

ASKER

it's not necessary to modify the above script
you cant post  another one based on the main Idea ;

    * show popup in the center of screen contain previous input values
    * the ability to set style for this popup
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gary
Avatar of uk747

ASKER

Hi;

thank you all for  your response  :) its was useful to center p
but how can I Set a style  for the popup windows  ex (color, background , font ,table ...etc) as you all see :

win2.document.write("You said: " + document.forms[0].Item1.value);

this java-script code get just value without setting any style for the output ...

I was thinking  to add PHP lang to get the previous input with function <?_Get and use java-script only to call the popup win !

the popup contain html script include php script to call the values

I thing this all can be done by setting parent and a child window (02 separate pages ).... but can I make it ?

if you have any other idea please help
Ray has already told you to put the css in the popup page code,
Avatar of uk747

ASKER

thank you ;

see my comment !!
no points for me....
Please see the grading guidelines here:
https://www.experts-exchange.com/help/viewHelpPage.jsp?helpPageID=26

If you give a B or C grade you're expected to explain what was wrong.

If you want to share points among more than one of the Expert responses, the page that lets you close the question allows you to do this.

What was deficient in the answers?
Avatar of uk747

ASKER

hi;

I give a B because get just 50% of the solution ;

Solution to center a popup win in a middle of screen and  get the previous input with  java-script :

win2.document.write("You said: " + document.forms[0].Item1.value);

Ray give me just an Idea to put CSS in popup page but what I am looking for is one script in ONE PAGE !!

Best Regards
win2.document.write("<link rel='stylesheet' href='style.css'/>You said: " + document.forms[0].Item1.value);
win2.document.close();
...but what I am looking for is one script in ONE PAGE !!
Good grief, hire a professional developer!  We answer questions here, without compensation, and when you have a "want" that is not the same as a "question."  

I want a new Mercedes.  But I will have to pay for it.  A question might be, "How much does a new Mercedes cost?"
You got a solution for centering the popup and how to apply css to the popup.
What more do you want?
Welcome to EE UK747

Please be advised that all experts are volunteers and take time out from their busy day job or spend their spare time to try and help you.
A quick read of the help pages will explain more.
The reactions you just got is of course not taking into account that you only just joined and still need to get into how things at EE works.

The grading is not like at school. If you feel the need to give a B or C grade, tell us and explain why so we can possibly improve the answer when we understand you were not able to insert styling on your own, which as you can see from my comment can be done with style sheet or inline styling in the document.write.
Avatar of uk747

ASKER

hi;

I am realy sorry about what i did before ;; cause I am New in EE
and thank you for your advices , thank you all

I will more carefull next time !

Regards