Current location: Hot Scripts Forums » General Web Coding » JavaScript » how do I update form, and hidden values in a form from a popup window?


how do I update form, and hidden values in a form from a popup window?

Reply
  #1 (permalink)  
Old 12-06-05, 03:46 AM
lordmerlin lordmerlin is offline
Newbie Coder
 
Join Date: Jul 2003
Location: South Africa
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
how do I update form, and hidden values in a form from a popup window?

Hi

I hope I ask the right question, and in the right place

I have a form, which is used to get add info to a MySQL, written in PHP. I need to be able to update three fields, which i want to pass from a popup window.

I can crate the popup windows from a button on the main page, and the popu p window then queries the DB, pulling up all the records I need.

What I'm not sure of accomplishing, is this:

The main page has on text field, which needs to be updated with a value from the popup, and two hidden fields, which will basically hold the table row id, and another table's row id, thus two hidden fields.

How would I do this? In the popup window, I want the info to be displayed as links, which when clicked on, it will close the window automatically.
Something like this: <a href="# onclick(--what do I put here--); self.close();>John Doe</a>

Does this make sense?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 12-06-05, 07:48 PM
cyber1 cyber1 is offline
Newbie Coder
 
Join Date: Dec 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
JS has something called the the window object opener.

This is the description:
Sets or returns a reference to the window that created the window

So, to fill a field in the opener ie. the parent window
inside your function in the popup call like this

thisbio = (form.biosrc.value)
opener.editform.bio.value = thisbio

thisbio is contents of the field you want to move from the popup to the opener
editform is the name of the form on the opener
bio is the field to fill from the popup in the opener

the last line in your function
self.close();
if you want the popup to close as soon as you send the contents


-bill

Last edited by cyber1; 12-06-05 at 07:50 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 12-13-05, 03:05 PM
MukhtarDiab MukhtarDiab is offline
Newbie Coder
 
Join Date: Apr 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Could i do somethings like this code but in deference case;
i want to upload images from my computer and returm the path of image uploaded to the text box like this code :
[img] imagepath [/img]

which mean send a value from page to page

could i able?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hidden gliding admin login form patriksthlm JavaScript 1 08-09-05 01:40 PM
Protecting hidden field on HTML Form with PHP imlek Script Requests 2 08-23-04 12:01 AM
Help with multipart update form into MySQL DB... jimb575 PHP 0 07-01-04 03:42 PM
hidden fields not passsing values! aleksgurl Perl 1 11-07-03 01:20 AM
passing array to hidden fields in form on next page? seala ASP 2 09-04-03 03:40 PM


All times are GMT -5. The time now is 10:53 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.