php and javascript

They have: 2 posts

Joined: Feb 2002

hi all,

i currently have a web-based email system on my server. When composing an email I have a form on the page that has the standard to: and cc: inputs. I have a link on the side that says 'addresses', when clicked, this will open up another window which takes the users addresses from the db and places them on the page with two check boxes next to each name - one for to: and one for cc:. The user can select which emails go into the to: and/or the cc: - and when they hit the submit button the checked emails go into the corresponding input boxes on the original page and all is well.

however, I found that if they want to add another email and they click on addresses again and selected an email and submit it, it will send the new email, but the others, of course, will be gone. I need a way to send info to a javascript openwindow function through a link - it cant be a form submission because there is already one form on the page. The compose page is a php page which calls a function to write out the openwindow javascipt function. So php is generating the javascript function and im wondering if I could do this by writing another javascript function inside the javascipt that opens up the new window?

does anyone get this or am i just staying up too late these days?

thanks

They have: 10 posts

Joined: Feb 2002

Well, I'm at a loss here. umm.. We all know we can't modify the source of the page after it's been loaded.. soo.. Sticking out tongue You could try a cookie that gets deleted when the "send" button is clicked? Just make sure to give it a unique ID in case they start typing more than one email at once.

That's the only thing I can think of. Anyone got any suggestions?

They have: 447 posts

Joined: Oct 1999

i'm kind of confused by what exactly you want to do. if you want to send values to the openwindow function just put them in the url that and either parse them out with javascript, or have the php page print javascript variables ...

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.