Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old June 26th, 2003, 01:16 PM
aplatts aplatts is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Southampton,Hampshire,UK
Posts: 5 aplatts User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Pop-up window

Help

I would like to open a popup window (window.open) using javascript passing variables from the parent to the child window. On exit from the child window (window.close)I want to set a form field value in the parent window

Can anyone help????????????

Reply With Quote
  #2  
Old June 26th, 2003, 01:46 PM
xs0 xs0 is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Ljubljana, Slovenia
Posts: 760 xs0 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Pop-up window

Something like

opener.document.forms[0].field_name.value="something"

should work...

Reply With Quote
  #3  
Old June 26th, 2003, 02:47 PM
aplatts aplatts is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Southampton,Hampshire,UK
Posts: 5 aplatts User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Pop-up window

On another point

How can I set a PHP variable with a javascript?

Reply With Quote
  #4  
Old June 26th, 2003, 02:52 PM
xs0 xs0 is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Ljubljana, Slovenia
Posts: 760 xs0 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Pop-up window

Depends... what are you trying to do?

If you include a variable in an URL, it will work:
http://.../something.php?variable=123

Or, you can use a <form>, if you want...

Reply With Quote
  #5  
Old June 26th, 2003, 03:54 PM
tkarkkainen's Avatar
tkarkkainen tkarkkainen is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: Finland
Posts: 2,323 tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 20014 Folding Title: Starter FolderFolding Points: 20014 Folding Title: Starter Folder
Time spent in forums: 6 Days 10 h 53 sec
Reputation Power: 4
RE: RE: Pop-up window


Quote:
On another point

How can I set a PHP variable with a javascript?


If you want to do this you must refresh the page because javascript is client-side and php is server-side.

Reply With Quote
  #6  
Old June 26th, 2003, 06:46 PM
aplatts aplatts is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Southampton,Hampshire,UK
Posts: 5 aplatts User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Pop-up window

Sorted, posted the vars from the calling window into the URL!!!!

Thanks

ALL

Reply With Quote
  #7  
Old June 26th, 2003, 06:47 PM
aplatts aplatts is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Southampton,Hampshire,UK
Posts: 5 aplatts User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Pop-up window

Sorted, posted the vars from the calling window into the URL!!!!

Thanks

ALL

Reply With Quote
  #8  
Old August 23rd, 2003, 08:08 PM
fher98 fher98 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 4 fher98 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Pop-up window

Hi aplatts... I have the same Q:... I have a user list... and when I click on their name it needs to open a popup with this users details inside it... then work around with their data.. my Q: How can I get a link on the username that opens the pop up?

Reply With Quote
  #9  
Old August 29th, 2003, 04:10 PM
CodeKadiya CodeKadiya is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Colombo,Sri Lanka
Posts: 2,313 CodeKadiya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
Send a message via Yahoo to CodeKadiya
RE: Pop-up window

Check out this great tutorial code. Then you will get a idea of popups in javascript.

http://codewalkers.com/seecode/366.html

Reply With Quote
  #10  
Old September 1st, 2003, 07:48 AM
nazly nazly is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Colombo,SriLanka
Posts: 1,325 nazly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 18 sec
Reputation Power: 3
Send a message via Yahoo to nazly
RE: Pop-up window

Quote:

Q: How can I get a link on the username that opens the pop up?



You can pass the user id through the GET method to the page that opens in the new window

<script language="JavaScript">
function openNewWin(usrId){ args="width=600,height=400,resizable=no,scrollbars=yes,s tatus=0";
window.open("userpage.php?userId="+usrId,"Newwin",args);
}
</script>
.
.
.
<a href="javascriptpenNewWin('C001')">John</a>

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Pop-up window


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT