/    Sign up×
Community /Pin to ProfileBookmark

Form variables to window launched by Javascript

Code to create a window; (This works fine with other uses .i.e just to get a window open)

[CODE]
<script language=”JavaScript” type=”text/javascript”>
//<!–
function openwins(page) {
sitewindow = window.open(page,’newwin’,’resizable=1,left=0,top=0,toolbar=no,menubar=no,scrollbars=yes,width=450,height=200′)
}
//–>
</script>
[/CODE]

This code is supposed to launch the window and get the POST data from the form (form here is simplified version of actual form. The <form …> line is the same however.

[CODE]
<form name=’contact’ action=”javascript:openwins(‘myfile.php’)” method=’POST’ >
<input type=”text” name=’var1′>
</form>
[/CODE]

Anyhow it appears that the code launches the window with the file myfile.php fine. How ever it reports errors which indicates no data was received. If I just have <form ACTION = “myfile.php” method=”POST”> then every thing works as expected.

So is there a way of launching a window and still get the POST data to the file launched in that manner?

One other question. How do I mark a message thread as resolved? I have another thread that is resolved that I would like to mark as such.

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@QuidamJan 16.2009 — I suck at JS, so I'll answer your second question.

At the top of the thread, you have "Thread tools".

Click on it, and a menu will come up where you can mark it as resolved.
Copy linkTweet thisAlerts:
@DasherauthorJan 16.2009 — Thanks -- found mark as resolved

Now! How about my original question?
×

Success!

Help @Dasher spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.15,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...