pass $_POST data into popup window

This is a discussion on "pass $_POST data into popup window" within the JavaScript Forum section. This forum, and the thread "pass $_POST data into popup window are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 18th, 2006, 21:51
Up'n'Coming Member
Join Date: Sep 2005
Location: athens
Age: 25
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
pass $_POST data into popup window

Hi all!
I have a page (generated with PHP) that has a list of employee names. What I want to do is, when the user hits on each name, a pop-up window (using Javascript) to appear which will say some more details on the employee (i.e his age, job experience etc).
So I thought I make a form for each employee name, and use hidden fields to pass the info I want.
For example

<form>
<input type="hidden" name ="age" value="23 years old">
<input type="hidden" name="experience" value="expert">
<input type="submit" value="John">
</form>

With the above, I show a little example of course. What I have is a submit button with John's name written in it and I want, when the user clicks on John, a pop-up window to appear and contain the "hidden" values of age and experience in it.
I don't know much about Javascript, i tried usind the document.write function, but no luck. I can only "send" data to the next page that are written in an input field, but not data that are written in hidden fields...
Any thoughts?
Reply With Quote

  #2 (permalink)  
Old Apr 19th, 2006, 16:49
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: pass $_POST data into popup window

Hi there,

Pop-up windows are not a good idea as they can be blocked and most end-users object to them these days. It is also a bit of an over the top approach for what you want to do.

I would suggest placing the hidden information in blocks using the div tag, eg.,

Code: Select all
<div id='john' class='hidden'>
   Age = 23<br />
   Experience = expert
</div>
Then using css something like;

Code: Select all
.hidden {
   display: none;
}

.hidden:hover {
   display: block;
}
You will need to add appropriate positioning code depending on your layout.

You will also need to incorporate the file that makes IE play properly with the psuedo :hover.

You can get this from: http://www.xs4all.nl/~peterned/csshover.html
Reply With Quote
Reply

Tags
pass, _post, data, popup, window

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Forced Selection In a popup window Jamie18 JavaScript Forum 0 Jun 18th, 2007 18:58
Got to fit the image to 800x600 popup window kivanc JavaScript Forum 2 Dec 29th, 2006 20:12
Rollover menu / popup window magiccupcake JavaScript Forum 3 Dec 18th, 2006 16:10
Popup window problem in netscape 8.1 nitu JavaScript Forum 0 Sep 12th, 2006 11:33
Javascript popup window with ASP madhuri.t Classic ASP 0 May 3rd, 2006 10:42


All times are GMT. The time now is 19:23.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43